Beruflich Dokumente
Kultur Dokumente
0 ¼
1 2/4
2 ¼
---------------
Total 1
The X value 1 has the largest probability because it is associated with two
outcomes (TH and HT) while others have only one favorable outcome each. Also
note that the sum of probabilities is equal to 1, a fundamental rule of Probability
discussed in the previous instruction.
The above example is that of a discrete random variable. We will study more
complicated but useful and interesting examples of discrete random variables later.
Note that only in the case of discrete random variables we can talk of the
probability of a single value.
3
Let us first study Discrete Random Variables and Probability distributions. We will
study continuous random variables and distributions in Chapter 6.
2
In the above example x
2
0.25*(0-1) + 0.5*(1-1)2 + 0.25*(2-1)2 = 0.5.
If the above conditions are fulfilled, then the variable X defined as the number of
successes in n trials has a Binomial probability distribution and the probability of
any X value is given by the following formula:
x (n-x)
P(X= x) = π (1- π)
Similarly, the denominator involves two factorials. Although this formula looks a
little clumsy, the Binomial Distribution has some neat properties:
Example 1. Suppose a fair coin is tossed six times. Let us define X as the number
of heads which appear in the six tosses. Is it a binomial random variable? Can we
build the whole probability distribution? What is the mean or the expected value of
X? What is its Variance and standard deviation? What is the probability that there
will be at least one head? Exactly two heads? At most three heads? Less than four
heads? No head? Head in five tosses? All heads? Ok, let me help in this example.
First of all a toss of a coin is obviously a Bernoulli trial with only two outcomes,
one and only one of which must occur. Now six tosses of the same coin (or
similarly fair coins) can be safely assumed to be independent of each other
(whether done simultaneously with six coins or done successively in a row with the
same coin). And in each trial the probability of success (head) is the same. So X is
clearly a Binomial random variable. Here, n=6 and π =0.5.
As mentioned above these are the only two parameters needed to determine the
whole distribution. But before we derive the whole distribution we can easily
summarize it in two key characteristics. The mean µx= 6*0.5= 3 (three heads is
2
the expected value). Variance x = 6*0.5*(1-0.5) = 1.5 Standard Deviation
0 (6-0)
P(X = 0) = 0.5 (1- 0.5) = 0.56 = 0.0156 or less than 1.6%
chance.
This low probability is not surprising because the event is that all tosses have to
result tails. In the above calculation I used the rule that 0!=1!=1 ( a little strange
result, but that’s a basic mathematical rule). Also, any number to the power zero is
equal to one. Now I will quickly derive the other probabilities (leaving the details
for your exercise).
7
P(X=1)=……………= 0.0938
P(X=2)=……………= 0.2344
P(X=3)=……………= 0.3125
P(X=4)=……………= 0.2344
P(X=5)=……………= 0.0938
P(X=6)=……………= 0.0156
Note that the distribution is symmetrical around the mean value 3. The total of all
probabilities should be exactly one except for rounding (in the fourth decimal place
here). If you want you can practice drawing the graphical distribution with bars or
columns or probability polygon).
Now that we have done the dirty work of calculating probabilities using the clumsy
formula, I will tell you the secret of getting the answers quickly. Look at Tables on
pages 855 to 859 in the book (5th ed) and 853-857 (6th ed) for probabilities for up to
20 trials. Try to locate the above probabilities in the tables. You can also use the
computer to derive probabilities for any number of trials.
With MegaStat it is a piece of cake. Open Excel, then Add-Ins, then MegaStat, then
Probability, then Discrete probability distribution (gives binomial as default), then fill the
number of observations and probability of occurrence (π) and …that’s it folks. You get
everything you want to know about this distribution including a nice graphical presentation as
follows:
Binomial distribution
6 n
0.5 p
cumulative
X P(X) probability
0 0.01563 0.01563
8
1 0.09375 0.10938
2 0.23438 0.34375
3 0.31250 0.65625
4 0.23438 0.89063
5 0.09375 0.98438
6 0.01563 1.00000
1.00000
You can do it through regular excel too. Go to Excel. Click on Formulas (on top
row). Then click on “more functions” from the options which appear. Then select
“Statistical” then select Binomdist. In the dialogue box put the value of x you want
probability for, put number of trial, put the probability of success, and put zero for
cumulative (if you want individual probabilities instead of cumulative). Then you
get the probability for any value of X. You can repeat it for any number of values.
Does it sound a little more work compared to MegaStat? Of Course, MegaStat is
meant to make your life easier with the use of Excel. But one good thing about
9
Excel is that you can also get the cumulative probability (not a big deal once you
have all the probabilities). For example when you put 1 in the cumulative row in
the dialogue box for value four P(X=4) comes as 0.890625 with Excel. (Check it
by adding all the probabilities up to 4, the difference will be because of rounding).
Now the remaining questions asked above. Do I need now to teach you how to
answer those questions once you have all the probabilities? I don’t think so.
Remember, however, that you are dealing with a discrete distribution. Therefore, is
“at most 3” same as or different from “less than four”? Is it the same as or different
from “less than or equal to 3”? Think about it.
0.6875
7 n
0.35 p
cumulativ
e
X P(X) probabilit
10
y
0 0.04902 0.04902
1 0.18478 0.23380
2 0.29848 0.53228
3 0.26787 0.80015
4 0.14424 0.94439
5 0.04660 0.99099
6 0.00836 0.99936
7 0.00064 1.00000
1.00000
Those who email me the correct answer to this question (with details shown)
without asking for help will get up to three bonus points in the related Assignment.
Skip Poisson distribution in this chapter. But you can learn it for your enhanced
knowledge because Poisson distribution is used in some applications like queuing
(or waiting line) theory.