Probability Question - Getting x heads from n coin tosses

In summary, the conversation discussed the calculation of probability using a binomial distribution to determine the likelihood of getting a certain number of heads in a given number of coin tosses. The formula for this was P={n \choose x}\left(\frac{1}{2}\right)^n, where n represents the number of trials and x represents the number of successes (in this case, heads). It was also noted that the probability of getting exactly 50 heads is unlikely, and that it is more probable to get between 40 and 60 heads in 100 trials. To calculate the probability of getting 90 or more heads, the sum of individual probabilities for each number of heads from 90 to 100 is taken. The conversation
  • #1
rede96
663
16
Hi I was hoping someone could help me with a simple probability question. I wanted to know how I could work out using just one coin the probability of getting x number of heads from n number of coin tosses.

Thanks
 
Mathematics news on Phys.org
  • #2
What you're looking for is called a binomial distribution.

To get exactly x successes (we consider heads as being successes and tails as failures in this case) in n trials, the probability is

[tex]P={n \choose x}p^x(1-p)^{n-x}[/tex]

where p is the probability of success which in this case is 1/2, giving us

[tex]P={n \choose x}\left(\frac{1}{2}\right)^x\left(\frac{1}{2}\right)^{n-x}={n \choose x}\left(\frac{1}{2}\right)^n[/tex]

And if you'll notice, 1/2^n is the probability of getting all heads (or no heads) so what P represents is the probability of getting all heads, multiplied by the number of ways that you can choose x from n.
 
  • #3
Thank you very much for your help, but just because I am not too great with the notation you have written, can you show me an example.

Say the probability of getting 90 heads from 100 coin tosses?

From your formula is this (100 / 90) x 0.590?
 
  • #4
rede96 said:
Thank you very much for your help, but just because I am not too great with the notation you have written, can you show me an example.

Say the probability of getting 90 heads from 100 coin tosses?

From your formula is this (100 / 90) x 0.590?

No no, that first part isn't a division.

[tex]{n \choose x}=\frac{n!}{x!(n-x)!}[/tex]

Where the exclamation marks mean factorial. e.g. [itex]5!=1\times 2\times 3\times 4\times 5 = 120[/itex] so

[tex]{100 \choose 90} = \frac{100!}{90!(100-90)!} = \frac{100!}{90!\times10!}[/tex]

and since
90! = 1*2*3*4*...*88*89*90
100! = 1*2*...*89*90*91*...*99*100

(I've highlighted the common factors in blue)

Then in 100! / 90! we can cancel the first 90 factors, leaving us with 100! / 90! = 91*92*...*99*100
So finally,

[tex]\frac{100!}{90!10!} = \frac{91*92*...*99*100}{1*2*3*...*9*10}[/tex]

So to find the chance of 90 heads out of 100 coin tosses, we have

[tex]\frac{91*92*...*99*100}{1*2*3*...*9*10}*\frac{1}{2^{100}}\approx 1.36*10^{-17}[/tex]

or in other words, very, very unlikely. You're more likely to win the next two jackpot lotteries than to have this event occur.

Also keep in mind that what we've calculated is the chance to get exactly 90 heads. Not more, or less. Even getting exactly 50 heads is an unlikely scenario. You're very likely to get between 40 and 60 heads in 100 trials though.

If you want to calculate these results more easily, use a calculator:

http://www.wolframalpha.com/input/?i=(n+choose+x)+/+2^n,+n=100,+x=90

Just change the value of n and x in the calculation prompt to whatever you wish, and then choose approximate value in the substitution result.
 
  • #5
Ah ok. Thank you! Sorry Math was never my strong subject.

So using the link (thanks!) (binomial(n, x))/2^n~~1.36554×10^-17 =

17310309456440 / 1267650600228229401496703205376 which is appx 1.36 x 10-17

So just out of curiosity, what if I just wanted to ask: what is the probability that I will get 90 or over from a 100 flips? Which would probably be more applicable in my situation.
 
  • #6
rede96 said:
Ah ok. Thank you! Sorry Math was never my strong subject.

So using the link (thanks!) (binomial(n, x))/2^n~~1.36554×10^-17 =

17310309456440 / 1267650600228229401496703205376 which is appx 1.36 x 10-17

So just out of curiosity, what if I just wanted to ask: what is the probability that I will get 90 or over from a 100 flips? Which would probably be more applicable in my situation.

Well, since we already know how to calculate the probability of getting exactly x heads in 100 tosses (for any x) then the probability of getting 90 or more heads is going to be the sum of all of the singular probabilities.

Chance to get 90 or more heads = chance for 90 heads + chance for 91 heads + ... + chance for 100 heads

In statistics, we denote the probability P to have an event X occur as P(X) and particular events where, say, we want 90 heads are denoted by P(X=90), and events such as 90 or more heads is denoted by [itex]P(90\leq X \leq 100)[/itex].

Anyway, with that math lesson aside, I'll give you a link for wolfram to calculate those events.

For some reason it wouldn't give an approximate solution, so I you'll have to plug the values in for yourself.

http://www.wolframalpha.com/input/?i=(sum(i=90+to+i=100)+(100+choose+i))+/+2^100

Where it should be

(sum(i=x to i=y) (n choose i)) / 2^n, n=100, x=90, y=100

which basically says, in n trials, count the probability of x up until y heads occurs. So in your case, you wanted to calculate 90 or more heads, so it's x=90 to y=100 heads.
 
  • #7
Thanks very much for your help and I don't mind the Math lesson. Wish I had more time to go back to school!

So I assume that if I wanted to find the probability of say it landing heads in the range of 40 to 60 times, I would just substitute i = 40 to i = 60 in the above formula?

This seems to make sense and I get a high probability of .999 when I work it out. So am guessing that is correct?
 
  • #8
rede96 said:
Thanks very much for your help and I don't mind the Math lesson. Wish I had more time to go back to school!

So I assume that if I wanted to find the probability of say it landing heads in the range of 40 to 60 times, I would just substitute i = 40 to i = 60 in the above formula?

This seems to make sense and I get a high probability of .999 when I work it out. So am guessing that is correct?

Yes, although .999 is too high. If you use Excel, I found the BINOMDIST function recently, which you might find useful. That gives P(40-60) = 0.965.

=BINOMDIST(60,100, 0.5, TRUE)-BINOMDIST(39,100, 0.5, TRUE)

TRUE means it's cumulative.
 
  • #9
PeroK said:
Yes, although .999 is too high. If you use Excel, I found the BINOMDIST function recently, which you might find useful. That gives P(40-60) = 0.965.

=BINOMDIST(60,100, 0.5, TRUE)-BINOMDIST(39,100, 0.5, TRUE)

TRUE means it's cumulative.

Yes, I think I did the 0.999 between 30 and 70 and not 40 and 60. But the formula you posted was a great help. Thanks.
 

FAQ: Probability Question - Getting x heads from n coin tosses

1. What is the probability of getting exactly x heads from n coin tosses?

The probability of getting exactly x heads from n coin tosses can be calculated using the binomial distribution formula: P(x) = (nCx)(p^x)(q^(n-x)), where nCx represents the number of combinations of x successes out of n trials, p is the probability of getting a head, and q is the probability of getting a tail (q = 1-p). For example, if you toss a fair coin 10 times and want to know the probability of getting exactly 3 heads, the calculation would be P(3) = (10C3)(0.5^3)(0.5^7) = 0.1172 or 11.72%.

2. What is the probability of getting at least x heads from n coin tosses?

The probability of getting at least x heads from n coin tosses can be calculated by adding the probabilities of getting exactly x, x+1, x+2,..., n heads. This can also be calculated using the cumulative binomial distribution function on a calculator or statistical software.

3. How does changing the number of coin tosses affect the probability of getting x heads?

The probability of getting x heads from n coin tosses is affected by the number of tosses in two ways. First, as the number of tosses increases, the number of possible outcomes also increases, resulting in a decrease in the probability of getting exactly x heads. Second, as the number of tosses increases, the probability of getting at least x heads also increases.

4. Can the probability of getting x heads ever be greater than 1?

No, the probability of an event can never be greater than 1. This is because the probability of an event represents the likelihood of that event occurring, and a probability of 1 means that the event is certain to occur. Therefore, the probability of getting x heads from n coin tosses will always be between 0 and 1.

5. How does changing the probability of getting a head affect the probability of getting x heads from n coin tosses?

The probability of getting x heads from n coin tosses is directly affected by the probability of getting a head. As the probability of getting a head increases, the probability of getting x heads also increases, and vice versa. This can be seen in the binomial distribution formula, where p is raised to the power of x.

Similar threads

Back
Top