The second solution was very cool. I'm not much into probability, but the idea of finding a subtree isomorphic to the total infinite tree seems to be present in many other areas of math! Nice video.
@VisuallyExplained3 жыл бұрын
Glad you liked it!
@mauisstepsis55244 ай бұрын
Same idea comes from calculating stopping time in DTMC.
@luisguillermo62162 жыл бұрын
This video is really cool, great job! For the follow up questions I got 1) 3 (estimating when total probability hits 0.5) 2) 42 (by recursion) 3) 3 (by recursion, analogous to a 3 sided dice)
@VisuallyExplained2 жыл бұрын
1) is close, but not quite right. 2) is correct, nice! 3) is a very tricky one. When you condition by the event E = { all throws up to the first 6 are even}, it is not the same as throwing a 3-sided dice. One way to think about it is that a 6 is much more likely to occur than a 2 or a 4 when you condition by E.
@raphaelpetrovich2 жыл бұрын
@@VisuallyExplained @Luis Guillermo ### 1) Median import random as rd import statistics as st lengths=[] for i in range (100000): a=0 p=[] while a != 6: a = rd.randint(1, 6) p.append(a) lengths.append(len(p)) st.median(lengths) ###Answer 4 ### 2) two consecutive 6s import random as rd import statistics as st lengths=[] for i in range (100000): a=0 p=[0,-1] while p[-1] != 6 or p[-2] != 6: a = rd.randint(1, 6) p.append(a) lengths.append(len(p)) st.mean(lengths)-2 ###Answer 42 ### 3) all throws up to the first 6 are even import random as rd import statistics as st lengths=[] for i in range (100000): a=0 p=[] while a != 6: a = rd.randint(1, 6) if a%2 == 0: p.append(a) else: break if len(p) != 0: lengths.append(len(p)) st.mean(lengths) ###Answer 1.5
@peterhindes565 ай бұрын
I still got 36 with recursion and with the two rolls at once analogy :( How did you do it?
@MathAndPhysics3 жыл бұрын
Nice video! I must admit I also used the brute force method using an infinite series, but I really enjoyed your more elegant solutions.
@tejkiranv40563 ай бұрын
@VisuallyExplained Is the answer 2nd follow-up question (the median value) 2 throws? For example, take 100 throws, out of these, 16.6 throws would yield 6 in first throw. Around 41.6 throws would yield 6 in their second attempts. And since we want the 50th throw (or rather avg of 50th and 51st), it would be 2.
@bharadwajeddanapudi850710 ай бұрын
Quick question: why is it for the 2nd solution that the formula has two E(T)s. Surely the 2nd E(T) would be one less than the initial E(T) because you have one less throw to deal with in comparison to the very beginning of the event.
@cernejr2 жыл бұрын
Nice video. However the music is giving me a headache, I had to watch on mute with CC.
@VisuallyExplained2 жыл бұрын
Sorry about that, I will keep your comment in mind for next videos.
@darklordvadermort2 жыл бұрын
during first solution, why do you take the derivative of the geometric series formula or what's the justification for that? it needed to look more similar to what you had with the k out in front? is there a reason why taking the derivative preserves the identity of the formula?
@VisuallyExplained2 жыл бұрын
Taking the derivative of a formula will of course change that formula, but if you have two formulas f(x) and g(x) that are equal to each other (i.e., f(x) = g(x)), and you take the derivatives of both, then you get two new formulas that are again equal to each other (i.e., f'(x) = g'(x)). This is exactly what's happening at 3:48. But maybe what you are asking is why do we even take derivatives in the first place. Then yes, you are right, taking the derivatives of both sides make the LHS more similar to the expression we want to reach ultimately. Hope that answers your question!
@jakubjan442 жыл бұрын
Simply beautiful
@BrianAmedee3 жыл бұрын
3rd solution was my favourite. I froth the law of large numbers. Did you make this using manim?
@VisuallyExplained3 жыл бұрын
The law of large numbers is truly magical! The video was made with manim for the most part. I have also used Blender for the 3d animation at the beginning.
@weisanpang71733 ай бұрын
Is the answer to follow up question#1 = 4 ?
@samirelzein10952 жыл бұрын
Keep going...
@eastcoasterner Жыл бұрын
How many times do you throw the dice until the probability of not getting a 6 is 0? For example, if I throw the dice 10 times, there's still a pretty good chance of not getting a 6. But if I throw the dice 100 times, there's a very small chance of not getting a 6. If I throw the dice 1000 times, it's extremely unlikely that I won't get a 6 at least once. Also can this be used for other percentages? For example, if I have a 30% chance of getting a certain outcome, then after 3000 attempts, is it possible to only get that outcome 24% of the time?
@aripocki Жыл бұрын
The probability can never reach 0! The chances of not rolling a 6 would get very small as you roll more times, but there's always a possibility
@peterhindes565 ай бұрын
@@aripocki but be careful not to use the gamblers fallacy, the probability is of rolling a 6 if you decide to roll n times, not the probability that the next roll will be 6
@youtub38083 жыл бұрын
Awesome work
@VisuallyExplained3 жыл бұрын
Thank you! Cheers!
@depressedguy946711 ай бұрын
How to find median of distribution
@hamzaich70342 жыл бұрын
maaan you are amazing
@VisuallyExplained2 жыл бұрын
Thanks man! :)
@zeroheisenburg34802 жыл бұрын
For the 2nd solution, why aren't we multiplying 1/6 by 1 instead of zero? Isn't it supposed to be (1 throw) * (probability of getting 6)?
@VisuallyExplained2 жыл бұрын
Good question. That's because we have already counted the first throw, it's the first term (" 1 + ...") in the right hand side). Alternatively, if you prefer, you can write E[T] = 1/6*(1+0) + 5/6 * (1+E[T])
@zeroheisenburg34802 жыл бұрын
@@VisuallyExplained Thanks for the quick reply. This form is easier to interpret for me. Since watching this video, I've been looking up why we can just stick (1 + E[T]) into the expectation equation. I know it make senses intuitively, but is it based on any formal properties? I've been googling terms like "Recursive expectation"/"recursive markov chain", this pattern of solving problems do appear, but they tend to not explain why it works, as it seems trivial. I do see some mention of "Law of total expectation" and "Law of iterated expectation", but I wasn't able to see any direct correlation to why we can just put (1+E[T]) there. Do you have any suggestions which topic should I search for to find out more? Thanks.
@VisuallyExplained2 жыл бұрын
@@zeroheisenburg3480 Sure. Look up "Markov Chains" and "Hitting time". I think this will answer your questions.
@theProf-xc5pe3 ай бұрын
hmm close but no cigar
@WellActualllyyy2 жыл бұрын
i don’t get where the 6 came from in the last solution
@VisuallyExplained2 жыл бұрын
Start with the equation 100 = 1/6 * 100 * E[T], simplify both side by 100 to get 1 = 1/6 E[T], then multiply both side by 6 to get 6 = E[T].