1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Probability Question - Getting x heads from n coin tosses

  1. Mar 3, 2015 #1


    User Avatar
    Gold Member

    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.

  2. jcsd
  3. Mar 3, 2015 #2


    User Avatar
    Homework Helper

    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.
  4. Mar 3, 2015 #3


    User Avatar
    Gold Member

    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?
  5. Mar 3, 2015 #4


    User Avatar
    Homework Helper

    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:


    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.
  6. Mar 3, 2015 #5


    User Avatar
    Gold Member

    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.
  7. Mar 3, 2015 #6


    User Avatar
    Homework Helper

    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.


    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.
  8. Mar 5, 2015 #7


    User Avatar
    Gold Member

    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?
  9. Mar 5, 2015 #8


    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    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.
  10. Mar 8, 2015 #9


    User Avatar
    Gold Member

    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.
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Similar Discussions: Probability Question - Getting x heads from n coin tosses
  1. X^n +y^n (Replies: 5)

  2. Coin flip question. (Replies: 3)