Probability of Two Students with Same Birth Date in a Group of 15

  • Thread starter Thread starter Bassalisk
  • Start date Start date
  • Tags Tags
    Matlab Probability
Bassalisk
Messages
946
Reaction score
2

Homework Statement


Write a code in MATLAB witch calculates the probability of having 2 students with same birth date, in group of let's say 15. Assumption: year has 365 days, and birth dates are uniformly distributed.


Homework Equations


The Attempt at a Solution



Now, i understand that this is a combination. We have 15 students, and 365 possible birth dates. So that's 36515. Those are all possible outcomes. Now I don't understand, how do you get the probability that 2 people have same birth date.

Please don't shoot at me the formula for binomial coefficients etc. I know there are formulas, I even have the solution, but I kinda don't understand it.

After we determine the analytical form of this problem, then I will try to code it into matlab. Although the main point of this is to get familiar with MATLAB and probability possibilities.

Keep in mind that I just started learning matlab, and this is my first exercise to code some probability into matlab.

Thank you
 
Physics news on Phys.org
Bassalisk said:

Homework Statement


Write a code in MATLAB witch calculates the probability of having 2 students with same birth date, in group of let's say 15. Assumption: year has 365 days, and birth dates are uniformly distributed.


Homework Equations


The Attempt at a Solution



Now, i understand that this is a combination. We have 15 students, and 365 possible birth dates. So that's 36515. Those are all possible outcomes. Now I don't understand, how do you get the probability that 2 people have same birth date.

Please don't shoot at me the formula for binomial coefficients etc. I know there are formulas, I even have the solution, but I kinda don't understand it.

After we determine the analytical form of this problem, then I will try to code it into matlab. Although the main point of this is to get familiar with MATLAB and probability possibilities.

Keep in mind that I just started learning matlab, and this is my first exercise to code some probability into matlab.

Thank you

You say "I even have the solution, but I kinda don't understand it." Well, what is the formula, and what don't you understand about it?

RGV
 
Ray Vickson said:
You say "I even have the solution, but I kinda don't understand it." Well, what is the formula, and what don't you understand about it?

RGV

Since I am really new to this, I googled "probability two same", and stumbled upon birthday problem.

I understood it. It is in place.

How do I translate that into MATLAB? Do I simply put in the formula, and calculate it?

And in general, do you have any links, or recommendations, where statistics and probability is taken into matlab?

I am VERY new to this.I have 4-5 more problems that I have to solve using simulations in matlab(all probability) and it would be inefficient to post each problem.
 
There are two things I don't understand about this problem. First, when finding the nth root of a number, there should in theory be n solutions. However, the formula produces n+1 roots. Here is how. The first root is simply ##\left(r\right)^{\left(\frac{1}{n}\right)}##. Then you multiply this first root by n additional expressions given by the formula, as you go through k=0,1,...n-1. So you end up with n+1 roots, which cannot be correct. Let me illustrate what I mean. For this...
Back
Top