Queuing theory and Poisson process

  Рет қаралды 83,675

Mathemaniac

Mathemaniac

Жыл бұрын

Queuing theory is indispensable, but here is an introduction to the simplest queuing model - an M/M/1 queue. Also included is the discussion on Poisson process, which is the underlying assumption for the M/M/1 queue.
Second channel video on variance of Poisson distribution: • Poisson distribution (...
To me, this is mainly a "prequel" which serves as a prerequisite for the next video, even though the next video is not as long.
For the files created for this video, please visit www.mathemaniac.co.uk/download and enter the password:
queuingmodelM/M/1
and follow the instructions on the website. If you can't enter the website, watch the latest video! It always changes when a new video is up.
Sources:
Different queues:
M/M/1 queue: en.wikipedia.org/wiki/M/M/1_q...
M/M/c queue: en.wikipedia.org/wiki/M/M/c_q...
M/M/∞ queue: en.wikipedia.org/wiki/M/M/%E2...
M/G/1 queue: en.wikipedia.org/wiki/M/G/1_q...
M/G/k queue: en.wikipedia.org/wiki/M/G/k_q...
G/M/1 queue: en.wikipedia.org/wiki/G/M/1_q...
G/G/1 queue: en.wikipedia.org/wiki/G/G/1_q...
Jackson Network: en.wikipedia.org/wiki/Jackson...
More general queues: en.wikipedia.org/wiki/Kendall...
The (transient) solution: Computer Networks and Systems. New York, NY: Springer New York. p. 72 (uses moment-generating function and Laplace transforms); for more details, see Gross, D. and Harris, C.M., Fundamentals of Queueing Theory, Wiley, New York, 1974, 1985. (Section 3.11.2)
Other related sources:
Markov Chains: www.statslab.cam.ac.uk/~james...
Birth-and-death chain: en.wikipedia.org/wiki/Birth%E...
Bessel functions (for the solution to the differential equations): en.wikipedia.org/wiki/Bessel_...
Other than commenting on the video, you are very welcome to fill in a Google form linked below, which helps me make better videos by catering for your math levels:
forms.gle/QJ29hocF9uQAyZyH6
If you want to know more interesting Mathematics, stay tuned for the next video!
SUBSCRIBE and see you in the next video!
If you are wondering how I made all these videos, even though it is stylistically similar to 3Blue1Brown, I don't use his animation engine Manim, but I use PowerPoint, GeoGebra, and (sometimes) Mathematica to produce the videos.
Social media:
Facebook: / mathemaniacyt
Instagram: / _mathemaniac_
Twitter: / mathemaniacyt
Patreon: / mathemaniac (support if you want to and can afford to!)
Merch: mathemaniac.myspreadshop.co.uk
Ko-fi: ko-fi.com/mathemaniac [for one-time support]
For my contact email, check my About page on a PC.
See you next time!

Пікірлер: 113
@mathemaniac
@mathemaniac 11 ай бұрын
This video primarily serves as the prerequisite of the next video, which is going to be out soon. The prerequisite only includes Poisson distribution, but I thought it might be a little less textbook-like if I associate this with queuing theory.
@adityakulkarni8352
@adityakulkarni8352 4 ай бұрын
Thank you so much for such a clear and simple explanation. Please upload the next video!!! Thanks again.
@FardeenKhan-mb1fs
@FardeenKhan-mb1fs 11 ай бұрын
This is what i am waiting for.
@mathemaniac
@mathemaniac 11 ай бұрын
I see what you did there.
@gczhu5125
@gczhu5125 10 ай бұрын
In a queue? 😅😅
@jankinsics
@jankinsics 25 күн бұрын
Same here. Debugging a queueing problem in production.
@hamsterdam1942
@hamsterdam1942 11 ай бұрын
This video actually shows why, out of all things, Poisson distribution appears when studying radioactive decay
@johnchessant3012
@johnchessant3012 11 ай бұрын
Mathemaniac and 3b1b both uploading probability videos on the same day? Awesome!
@16876
@16876 11 ай бұрын
1 hour apart
@ridazouga4144
@ridazouga4144 11 ай бұрын
No kiddding
@mathemaniac
@mathemaniac 11 ай бұрын
Haha, I honestly haven't communicated with Grant whatsoever.
@MarshallLevin
@MarshallLevin 11 ай бұрын
What are the odds?
@libberator5891
@libberator5891 11 ай бұрын
I just have some video editing feedback. Some people (like myself) keep subtitles on. So don't use the bottom ~10% for important information, like the results of certain equations. It gets blocked, and having to toggle subtitles off and on just to see parts of the video can get annoying. Consider where the viewers' vision typically rest and put things you want to bring their attention to near the center of the screen. Having to look towards the peripherals can be distracting and just extra work, making information transfer harder. Anyways, keep up the good work!
@ryancantpvp
@ryancantpvp 11 ай бұрын
Normally I would watch the entire video before commenting, but I was so surprised by how the first few minutes of the video explained how probability works with time, and that’s something I’ve been wondering for a while. Great content as always!
@dwivedys
@dwivedys 11 ай бұрын
This is an unbelievably amazing video!!
@ariebaudoin4824
@ariebaudoin4824 11 ай бұрын
nice video, i have an exam on ODE's this friday, so i was immediately thinking about how to write the ODE in terms of a matrix, we didnt have infinitely big systems, so it was really fun to see one
@flanbenflen9069
@flanbenflen9069 7 ай бұрын
This is, simply put, extraordinary.
@uhah1235
@uhah1235 11 ай бұрын
Very clear explanation. Thank you, your the best ❤, keep making awesome videos like that !
@klikkolee
@klikkolee 11 ай бұрын
The derivations at 9:40 neglect the possibility of a customer arriving and a customer leaving in the same time step. These events were assumed to be independent, so it cannot also be assumed that they cannot coincide. If the queue is in state 3, and a customer arrives and a customer leaves in the same time step, the queue is still in state 3 -- not state 2. The term should have a factor of 1-λ/n to stipulate that a customer did not arrive on that time step. Similarly, the term for the state 1 => 2 transition should have a factor of 1-μ/n to stipulate that a customer did not depart on that time step -- since otherwise the queue would still be in state 1. And there should be another state 2 term for if a customer arrives and a customer departs in the same time step when already in state 2. So the equation should be: p_2(t+1/n)=p_2(t)((1-λ/n)(1-μ/n)+(λ/n)(μ/n)) + p_3(t)(μ/n)(1-λ/n) + p_1(t)(λ/n)(1-μ/n) In state 0, the events cannot be independent -- a customer can only depart in that time step if they arrived in that time step (were served within a single time step). The only way to interpret the departure probability in this scenario is as the probability that a customer departs given that a customer arrives. This however results in the same term for the probability for their intersection as when they were independent. The equation for state 0 becomes: p_0(t+1/n)=p_2(t)((1-λ/n)+(λ/n)(μ/n)) + p_1(t)(μ/n)(1-λ/n)
@klikkolee
@klikkolee 11 ай бұрын
If instead it is assumed that the events cannot coincide, and that λ/n and μ/n are still the total probabilities of the events, then we get the following relationships: let A be the event for arrival and D be the event for departure: P(A∩D)=P(D∩A)=0 P(A)=P(A∩D)+P(A∩¬D) P(A)=P(A∩¬D) P(D)=P(D∩A)+P(D∩¬A) P(D)=P(D∩¬A) P(¬A∩¬D)=1-(P(A∩¬D)+P(¬A∩D)+P(A∩D)) P(¬A∩¬D)=1-(P(D)+P(A)) This still results in a discrepancy from the derivation in the video, since the state-n no-transition term is based on the P(¬A∩¬D)=(1-P(D))(1-P(A)) of independent events instead of the P(¬A∩¬D)=1-(P(D)+P(A)) of mutually exclusive events. Also note that the mutually-exclusive condition imposes the condition of P(D)+P(A) ≤ 1
@alucs6362
@alucs6362 11 ай бұрын
I was also thinking this and was looking for a comment talking about it. Note, however, that even if we assume they can coincide in the finite n case, the contribution is of order O(1/n^2) and so becomes negligible as we take the limit - this means the final result is still correct (as somebody else said elsewhere in the comments, Mathemaniac does leave a note at 8:29 which notes this, though they don't mention it in the narration)
@klikkolee
@klikkolee 11 ай бұрын
@@alucs6362 I watch youtube with captions on. the note was covered up!
@alucs6362
@alucs6362 11 ай бұрын
@@klikkolee Understandable! I had also not seen it before I read this other comment (I originally going to comment that I assume they hadn't included it because it was negligible in the limit, but no need to assume in this case!)
@deinauge7894
@deinauge7894 11 ай бұрын
All equations (from start to finish) are wrong for finite n, as every term that vanishes for n->inf is neglected.
@alejandrom.4680
@alejandrom.4680 11 ай бұрын
Wonderful explicative video!! I will do Probability and Statistics next semester so it will be handy in some months.
@fibbooo1123
@fibbooo1123 11 ай бұрын
Awesome video!
@racpa5
@racpa5 11 ай бұрын
Love your math videos.
@PhysicsRaja-ul3kc
@PhysicsRaja-ul3kc 11 ай бұрын
Great video as usual man...
@MissPiggyM976
@MissPiggyM976 11 ай бұрын
Very well done, thanks!
@danielchin1259
@danielchin1259 11 ай бұрын
The trick of *invariant distribution* is so profoundly generalizable, once you get used to it, you'll start to use it every where.
@AlirezaAroundItaly
@AlirezaAroundItaly 5 күн бұрын
Amazing video , thank you so much
@mohammedel-naggar9394
@mohammedel-naggar9394 11 ай бұрын
great job in explaining it. I didn't understand it from MIT.
@zaringers
@zaringers 11 ай бұрын
It’s excellent, thank you!
@antonkot6250
@antonkot6250 9 ай бұрын
Probably the best math video I've seen in couple of years (with lambda over mu probability :) )
@multidimensionalminds
@multidimensionalminds 9 ай бұрын
You can watch "Science of Queues and Psychology of Waiting: Revealing the Secrets of Queueing Theory"
@user-is6zh9nl6r
@user-is6zh9nl6r 3 ай бұрын
beautiful and helpful. Thanks
@gurulinggbiradar6982
@gurulinggbiradar6982 2 ай бұрын
cleared my mind. thank you
@Tomyb15
@Tomyb15 11 ай бұрын
Curiously for me, I recently learned about this and queuing theory last semester (2022) in a course about simulating processes. A bit late for the finals but I passed the class anyway!
@Taha-uc1if
@Taha-uc1if 11 ай бұрын
great explanation
@samirelzein1095
@samirelzein1095 11 ай бұрын
very very nice job!
@CarlosRodriguez-mx2xy
@CarlosRodriguez-mx2xy 10 ай бұрын
Just Beautiful !!
@ayushsawarni490
@ayushsawarni490 10 ай бұрын
This is beautiful ❤️
@baonguyen-ct6nj
@baonguyen-ct6nj 11 ай бұрын
in the equation at 9:34, shouldn't the 2 departures from p2 to p1 and p3 at time = t be incorporated to the state at time = t+1? I don't understand why they are excluded.
@josephjepson6756
@josephjepson6756 11 ай бұрын
I liked the piano music while doing math manipulation. It was relaxing.
@sceKernelDestroy
@sceKernelDestroy 11 ай бұрын
Fantastic video! I think I finally learned that concept after having seen it from a far a bunch of times :) Just a tiny bit of feedback: I personally thought that when you talked about the limiting case for the differential equations it was a bit confusing how you described the process of rewriting this in terms of a difference quotient, because somehow it sounded (even though it was completely right of course) weird that you would change the two terms on the right hand side differently. Maybe this is like a pedagogical thing? Maybe you could have done subtraction (as a whole) and then multiplication for both terms instead of seemingly doing one set of operations (subtraction and multiplication) on one term and another set of operations (just multiplication) on the other term. Hope I got across what I meant to convey, and again: Love the video! Keep up the great work👍
@multidimensionalminds
@multidimensionalminds 9 ай бұрын
Hi, you can watch "Science of Queues and Psychology of Waiting: Revealing the Secrets of Queueing Theory"
@xX_swagger_Xx
@xX_swagger_Xx Ай бұрын
you explained this way better than my professor
@PaPa-kr5yt
@PaPa-kr5yt 11 ай бұрын
Hey thank you for the great content again 😀
@superuser8636
@superuser8636 7 ай бұрын
No surprise I went to a strong ratio/root test with absolute convergence for a window which you explain later in the video as a trained eye from Calc 2 can see from taking the limit and evaluating the expression that plugging infinity into the LHS before setting up the Diffeq that it will evaluate to 0 without diffeq or stats but you make a great explanation with visuals. Kudos 🎉❤
@NIXNYKYO
@NIXNYKYO 11 ай бұрын
Thanks!
@opexideas-karolbak1483
@opexideas-karolbak1483 Ай бұрын
I came across a description that the relationship [VA/system flow time] is called "flow efficiency". Is there a name for the relationship [Servie Time/system flow time], maybe flow utilization??? (assuming VA/unit is an effective part of Service Time.)
@tsunningwah3471
@tsunningwah3471 11 ай бұрын
amazingvideo
@ANunes06
@ANunes06 11 ай бұрын
All of this made perfect sense to me in class and I hated doing it with a passion. These feelings were unrelated. I just hate the procedure, despite how obvious it is.
@scalex1882
@scalex1882 11 ай бұрын
At 03:35 you divide the numerator of the factorial fraction by n from (lambda/n)^k but it seems you forgot to apply the ^k to the denominator. Where is the (1/n^(k-1))??
@forresthu6204
@forresthu6204 11 ай бұрын
Thanks
@etienneparcollet727
@etienneparcollet727 11 ай бұрын
The equations of transition are not valid at finite n, as multiple hops cases are not included. What Would have been needed is explicitly saying that the remainder is o(1/n).
@nektariosorfanoudakis2270
@nektariosorfanoudakis2270 11 ай бұрын
With several service desks, it's obvious that the customers would requeue in order to decrease their wait time, so it's not that insane that customers from "within" the queue may be served, not just the head. We need an infinite amount of desks and an infinite amount of customers who can teleport to the queue of their choice when it becomes shorter than the one they're currently at, no problem!
@tissuepaper9962
@tissuepaper9962 11 ай бұрын
not true, there's no guarantee or requirement that every queue provides the same service, so customers won't necessarily rearrange themselves. for example, in a store like Walmart there are checkouts, self-checkouts, customer service checkouts, electronics checkouts, gun checkouts, and tobacco checkouts, all of which provide slightly different services and multiple of which may be visited by a single customer in a single trip to the store. These different queues form a Jackson network.
@HoSza1
@HoSza1 11 ай бұрын
So according to maths, do I switch to the other queue or just stay I this one which was shorter but goes also seemingly slower???
@mathemaniac
@mathemaniac 11 ай бұрын
Interestingly, related but not exactly the same phenomenon is discussed so widely that there is a name: wait/walk dilemma. The wiki article says, "The wait/walk dilemma occurs when waiting for a bus at a bus stop, when the duration of the wait may exceed the time needed to arrive at a destination by another means, especially walking."
@fresheFresse
@fresheFresse 11 ай бұрын
When evaluation state k and looking at probability contributions to pk(t + 1/n): Why is the contribution from state k+1 not pk+1(t)(u/n)(1-lambda/n)? In other words when we are in state k+1 shouldn't there only be a contribution when a departure happens AND no new arrival comes in the interval? Same for the contribution from k-1
@fresheFresse
@fresheFresse 11 ай бұрын
A lot of these contributions might cancel out though
@ryancantpvp
@ryancantpvp 11 ай бұрын
I’m guessing it’s because 8:29 mentions how that possibility is negligible.
@jakoolaboo
@jakoolaboo 11 ай бұрын
@Mathemaniac Please respond and free us from this hell
@jakoolaboo
@jakoolaboo 11 ай бұрын
I think you are absolutely right!
@MiroslawHorbal
@MiroslawHorbal 11 ай бұрын
I'm thinking the same thing
@cykkm
@cykkm 11 ай бұрын
Why the other vid is on the 2nd channel, if you don't mind my asking? I note there are math education videos like here, and your opinion vids, generally with the property that they are anything else. Is it really better to split the education videos between the two? They are harder to find there.
@mathemaniac
@mathemaniac 11 ай бұрын
Mainly because I can't find a narrative that pushes variance here - it is not really needed anywhere later on in the video, and it is probably also an extra minute or two, which is not really good for audience retention. I mean, a few probability videos on the channel also have the same property: the Stein's paradox and the random walk ones also have a "more technical" video on the second channel. I can't put the second video on this channel either because the second video will tank the performance of the video, making the channel performing worse than it already is.
@marcelob.5300
@marcelob.5300 11 ай бұрын
Great
@DrJRMCFC
@DrJRMCFC 11 ай бұрын
Queuing theory is also heavily used in telecommunications
@mathemaniac
@mathemaniac 11 ай бұрын
Yes! I don't know enough to put this into the video, but it is in a couple of textbooks about computing systems as well!
@et2124
@et2124 11 ай бұрын
@mathemaniac at around 15:56 -> try to make the volume of the music match the volume of your voice Other than that, all good, like:)
@1.4142
@1.4142 11 ай бұрын
Probability videos by Mathemaniac and 3b1b within the same hour? What are the chances!
@Jarretinha
@Jarretinha 11 ай бұрын
And both about probability! Hard to assume independence...
@alex_zetsu
@alex_zetsu 11 ай бұрын
A memoryless arrival is a reasonable approximation a lot of the time but memoryless service rate... less so.
@habukichan
@habukichan 11 ай бұрын
can I ask what was the song while evaluating the limit? thanks 🙏🙏
@orngng
@orngng 11 ай бұрын
hopeful freedom by asher fulero
@benhsu42
@benhsu42 11 ай бұрын
Question for the 10 minute mark: isn't there a fourth way we arrive at p_k: we start at p_k, and someone leaves, and someone arrives: p_k(t)*lambda/n*mu/n (as distinguished from no one coming and no one leaving)
@SolomonUcko
@SolomonUcko 11 ай бұрын
Wouldn't a more typical service model be that each customer, when they get to the front of the queue, leaves in an constant amount of time from when they arrive, or some probability distribution? How would that work out?
@ethgraham
@ethgraham 5 ай бұрын
Modeled by an M/G/k queue where arrivals are memory less and service time is a general distribution. Makes practical sense but is harder to analyze mathematically
@tsunningwah3471
@tsunningwah3471 6 ай бұрын
good shit
@tomkerruish2982
@tomkerruish2982 11 ай бұрын
That queue seems to be composed of anonymous people. Queue anon... nah, it couldn't be. Could it?🤪
@maggotroot
@maggotroot 11 ай бұрын
why dont you use colors matching to a concept? Now there are too many of them and they, generally, just look random.
@leonard8336
@leonard8336 11 ай бұрын
music is quite loud
@RevolutionibusOrbiumCoelestium
@RevolutionibusOrbiumCoelestium 11 ай бұрын
What about the possibility that any customer arriving delays the service as they are being a “Karen”? How do you account for that?
@MrBricks148
@MrBricks148 11 ай бұрын
Whoa just watched the video that finds the relationship between ums and public speakers that uses the same maths. What are the chances :p
@InquilineKea
@InquilineKea 11 ай бұрын
ben hoffman once tld me to study this more
@tuongnguyen9391
@tuongnguyen9391 9 ай бұрын
I wish there could be time stamp
@maxresnick7753
@maxresnick7753 7 ай бұрын
wen next video
@Sky-pg6xy
@Sky-pg6xy 11 ай бұрын
I prefer the name “line-up theory” lol
@Phlosioneer
@Phlosioneer 11 ай бұрын
A good follow-up for people who want to see queue theory in practice is the defunctland fastpass/shapeland video: kzbin.info/www/bejne/b6rNi6N4ppaLeKc (it *does* get mathy)
@nicolasrosat5485
@nicolasrosat5485 11 ай бұрын
Merci !
@tsunningwah3471
@tsunningwah3471 6 ай бұрын
ninin
@eswyatt
@eswyatt 11 ай бұрын
For an actual explanation: Khan Academy
@steveunderwood3683
@steveunderwood3683 11 ай бұрын
25 minutes on queuing, and I didn't hear the name Erlang even once.
@multidimensionalminds
@multidimensionalminds 9 ай бұрын
You can watch "Science of Queues and Psychology of Waiting: Revealing the Secrets of Queueing Theory"
@tsunningwah3471
@tsunningwah3471 11 ай бұрын
se x
@tsunningwah3471
@tsunningwah3471 6 ай бұрын
b b b b
@tsunningwah3471
@tsunningwah3471 6 ай бұрын
vvvvvvv swex
@tsunningwah3471
@tsunningwah3471 6 ай бұрын
diu
@mrofnoctonod
@mrofnoctonod 2 ай бұрын
None of this means anything in Africa where queuing is not taught from childhood as a societal norm.
@thomasjames1067
@thomasjames1067 10 ай бұрын
There's something fishy about this process
@merchamyn
@merchamyn 10 ай бұрын
Oui Poisson
@xenonmob
@xenonmob 11 ай бұрын
jesus bro pay a narrator at this point. unbearable
@Lolwutdesu9000
@Lolwutdesu9000 11 ай бұрын
What about the time interval tending towards zero?
@multidimensionalminds
@multidimensionalminds 9 ай бұрын
You can watch "Science of Queues and Psychology of Waiting: Revealing the Secrets of Queueing Theory"
@benhsu42
@benhsu42 11 ай бұрын
Thanks!
The weirdest paradox in statistics (and machine learning)
21:44
Mathemaniac
Рет қаралды 1 МЛН
Queueing theory (simple)
8:37
Liz Thompson
Рет қаралды 10 М.
Increíble final 😱
00:37
Juan De Dios Pantoja 2
Рет қаралды 88 МЛН
Is it Cake or Fake ? 🍰
00:53
A4
Рет қаралды 19 МЛН
What is a Poisson Process?
11:30
Iain Explains Signals, Systems, and Digital Comms
Рет қаралды 55 М.
Tree-house Numbers - Numberphile
12:25
Numberphile
Рет қаралды 102 М.
Queueing - Probability of N customers in system
10:55
Ron Lembke
Рет қаралды 14 М.
A problem so hard even Google relies on Random Chance
12:06
Breaking Taps
Рет қаралды 1,1 МЛН
The Boundary of Computation
12:59
Mutual Information
Рет қаралды 959 М.
14. Poisson Process I
52:44
MIT OpenCourseWare
Рет қаралды 148 М.
The Concept So Much of Modern Math is Built On | Compactness
20:47
Morphocular
Рет қаралды 374 М.
Queuing Theory (Operations Management)
11:25
Dr Ogunseyin
Рет қаралды 25 М.