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

In summary: I might have a link to a video tutorial or something where I explain the problem and how to solve it.In summary, you have to find the probability that two people have the same birth date by using the binomial coefficients. You can find the formula online, or you can code it into matlab.
  • #1
Bassalisk
947
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
  • #2
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
 
  • #3
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.
 

1. What is probability and how is it used in matlab?

Probability is a measure of the likelihood of an event occurring. In matlab, probability is used to model and analyze uncertain or random phenomena, such as the outcome of a coin flip or the performance of a stock market. It can also be used to generate random numbers for simulations and to calculate statistical properties of a dataset.

2. How do you calculate probabilities in matlab?

Matlab has built-in functions for calculating probabilities, such as binopdf for binomial distribution, normpdf for normal distribution, and poisspdf for Poisson distribution. These functions take in parameters such as the mean and standard deviation and return the probability of a specific outcome or a range of outcomes.

3. Can matlab generate random numbers based on a probability distribution?

Yes, matlab has functions such as rand and randn that can generate random numbers based on uniform and normal distributions, respectively. It also has functions like binornd and poissrnd for generating random numbers from specific distributions with given parameters.

4. How can I visualize probability distributions in matlab?

Matlab has functions like histogram and plot that can be used to visualize probability distributions. You can also use the pdf function to plot the probability density function of a distribution and cdf function to plot the cumulative distribution function.

5. Can matlab be used for hypothesis testing and confidence intervals?

Yes, matlab has built-in functions like ztest, ttest, and chi2cdf that can be used for hypothesis testing. It also has functions like norminv and chi2inv for calculating confidence intervals based on probability distributions.

Similar threads

  • Calculus and Beyond Homework Help
Replies
31
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • Calculus and Beyond Homework Help
Replies
4
Views
1K
  • Calculus and Beyond Homework Help
Replies
1
Views
793
  • Set Theory, Logic, Probability, Statistics
Replies
6
Views
1K
  • Calculus and Beyond Homework Help
Replies
4
Views
2K
  • Precalculus Mathematics Homework Help
Replies
9
Views
3K
  • Calculus and Beyond Homework Help
Replies
13
Views
3K
Replies
11
Views
5K
  • Calculus and Beyond Homework Help
Replies
2
Views
995
Back
Top