The formula 1 - (365! / ((365-n)! * 365^n)) can be understood as follows: 365! / (365-n)! is similar to the permutation formula n!/(n-r)!, but it's used here to count the number of ways to arrange n birthdays out of 365 days. 365^n is used as a normalization factor, representing all possible birthday assignments if repetition were allowed. The division (365! / (365-n)!) / 365^n gives the probability of no shared birthdays. Subtracting from 1 gives the probability of at least one shared birthday.
@frankg7048Ай бұрын
But isn´t it easier to be understood that the event (for no one shares a birthday) is the number of ways the event(no one shares a birthday) divided by all events which can happen. Therefore the enumerator is "without replacement and order matters" with the formula n!/((n-r)! and for the denominator (all cases, which can happen) just 365^n. It might be important to understand why "without replacement" and "order matters" and here I am not sure, if I fully got the problem. Order matters, because the successor birthday takers are depending to the previous ones, meaning the first take 1st of January, the second cannot take this day anymore etc. Without replacement is clear, because another person cannot take a birthday of another person. For "order matters" I am not sure, because it should not be important if person A takes the 1st of January and person B takes the 2nd January or vice versa, therefore why is enumator not nCr?
@ItzGanked21 күн бұрын
these lectures are so good.
@saraiva4072 ай бұрын
17:41 I would use a simple recursive code in python, like: def fun(n): return 1 if (n==0 or n==1) else fun(n-1)*(366-n)/365 and then you can easily use it in a for loop to get the numbers. Of course, if you declare everything inside the for loop, the code is going to be more efficient, but it wouldn't be as simple to implement, and the n value isn't even that big to make such a difference 😅
yup! love it! thanks 4 Teach'n! just the Professionalism U bring to your Lectures, inspires! thanks!
@MrKeats-bm9dh2 ай бұрын
Love from India, Sir
@user-vg6kh1bj5i8 күн бұрын
When calculating the number of unique b-days it would seem to me that the order of the b-days does not matter so the formula nCr would be more appropriate. So, why not use nCr? BTW thanks for the great explanations in this video.
@gilofe5500Ай бұрын
Could you make a video about liquid time-constant neural networks and closed-form continuous-time neural networks?
@viddeshk80202 ай бұрын
What we can do in computational is that we can create a pseudo random number for data generation or take a dataset from kaggle use pandas dataframe to do simple birthday check based on columns
@muneerghure29332 ай бұрын
That was a hilarious statement at 19:38.
@Aikman942 ай бұрын
I am a Valentine's Day conception...
@ljdhhugbfvdhb2 ай бұрын
Greetings from Poland, Professor
@RichardGreen-u2s9 күн бұрын
Formula for sum of sequence is actually n/2(n+1). Not that it matters for the video.
@michaelseverance3412 ай бұрын
Dude… are you writing backwards the whole time? How did you do this?
@NateROCKS1122 ай бұрын
Flipping the video in post, most likely.
@juanjofernandez35182 ай бұрын
🎉🎉🎉
@arashamirian21224 күн бұрын
fine
@viddeshk80202 ай бұрын
1-p(no share) is kind of like there is still one person with one birthday
@YaofuZhou2 ай бұрын
Plot twist - Do not forget leap year.
@muhammedyasir2103Күн бұрын
I think Steve is left handed but since he is flipping the video to write on glass, he is shown right handed in these videos.. but in reality he is left handed. just an observation..
@bill_lumbergh2 ай бұрын
Birthdays are participation trophies
@dawudshekey2422Ай бұрын
n = 23 days_in_year = 365 prob_no_shared = 1.0 for i in range(n): prob_no_shared *= (days_in_year - i) / days_in_year prob_shared = 1 - prob_no_shared print(prob_shared)