Documente Academic
Documente Profesional
Documente Cultură
SAMPLE CASE
(THE BINOMIAL TEST)
The Binomial Test
2
Assumptions for Binomial Test:
3
Example:
You flip a coin 2 times and count the
number of times the coin lands on
heads.
5
We could denote the possible values of the random variable by using any pair of values ,
but it is most convenient to denote each outcome as either 1 or 0. We shall assume further
that the probability of sampling an object from the first category is p, and the probability of
sampling an object from the other category is p – 1 = q.
That is,
P[X = 1] = p
and
P[X=0] = 1 – p = q
6
THE BINOMIAL
DISTRIBUTION
Is used to determine the probabilities of the possible outcomes we might
observed if we sampled from a binomial population.
▪
If our hypothesis is , we can calculate the
“
probabilities of the various outcomes when we
assume that is true. The test will tell us whether
it is reasonable to believe that the proportions (or
frequencies) of the two categories in our sample
could have been drawn from a population with the
hypothesized values of and .
Eq.(4.1) and
where:
Y = binomial random variable
k = The number of successes that result from the binomial experiment.
Probability mass function of binomial distribution
the proportion of observations expected where or probability of success on an
individual trial
the proportion of observations expected where or The probability of failure on
an individual trial. 9
EXAMPLE
A. Suppose a fair die is rolled five times.
What is the probability that exactly two of
the rolls will show “six”?
1
0
A. Suppose a fair die is rolled five times. What is the probability
that exactly two of the rolls will show “six”?
▪
Given:
▪
Solution:
Y = is the random variable The probability that exactly two of the five
(the outcome of five tosses of the die) rolls will show six is given by:
The application of the formula to the problem shows us that the probability of
obtaining exactly two “sixes” when rolling a fair die five times is . 1
1
Suppose a binomial experiment consists of n trials and results in x successes. If the probability
of success on an individual trial is P, then the binomial probability is:
b(x; n, P) = nCx * Px * (1 - P)n - x
Where:
x = The number of “successes” that result from the binomial experiment
(pass or fail, heads or tails etc.)
P = Probability of a success on an individual trial
n = The number of trials in the binomial experiment.
Q = (This is equal to 1 - P.)
The probability of failure on an individual trial.
12
EXAMPLE:
Suppose a die is tossed 5 times. What is the probability of getting
exactly 2 fours?
Solution:
This is a binomial experiment in which the number of trials is equal to 5, the number of
successes is equal to 2, and the probability of success on a single trial is 1/6 or about 0.167.
b(x; n, P) = nCx * Px * (1 - P)n - x
1
b(2; 5, 0.167) = 5C2 * (0.167) * (0.833)
2 3 3
b(2; 5, 0.167) = 0.161
Now when we test hypothesis, the question is usually not , “What is the
probability of obtaining exactly the values which were observed?” Rather,
we usually ask, “What is the probability of obtaining values as extreme or
more extreme than the observed value when we assume the data are
generated by a particular process?”
▪
To answer questions of this type, the probability desired is
In other words, we sum the probability of the observed outcome with the
probabilities of outcomes which are even more extreme.
1
4
EXAMPLE
1
5
B. Suppose now that we want to know the probability of obtaining
two or fewer sixes when a fair die is rolled five times.
▪
Given:
▪
Solution:
1
6
That is, the probability of obtaining two or fewer sixes is the sum of three probabilities. If we use Eq.
(4.1) to determine the three probabilities, we have
And this,
We have determined that the probability under (the assumption of a fair die) of obtaining of
two or fewer sixes when a die is rolled five times is .
Small
Samples
▪
In the one sample case, when binary categories are used, a
common hypothesis is Ho: p = . Table D gives the one-tailed
probabilities associated with the occurrence of various values as
extreme as k under the null hypothesis Ho: p = . When referring to
table D let k equal the smaller number of the observed
frequencies. This table is useful when N ≤ 35. Table D gives the
probabilities associated with the occurrence of various values as
small as k for various N’s.
18
Example:
Given:
N = 10
k=7
Table D shows that the one-tailed probability of occurrence under Ho: p = for Y ≤ 3 when
N = 10 to be .172.
1
9
Table D
Table of probabilities associated with values as small as (or smaller than) observed values of k in the binomial test.
Entries are P[ Y≤ k]. Note that entries may also be read as P[Y ≥ N – k] as small as (or smaller than observed values of k in the binomial test
Given in the body of the table are one-tailed probabilities under Ho for the binomial test when p = q = ues
Given in the body of the table are one-tailed probabilities under Ho for the binomial test when p = q =
2
0
2
1
Note:
When the prediction is simply that the two frequencies will differ, a two
tailed test would be used. For a two-tailed test, the probabilitiy values in
table D would be doubled.
Thus,
2
2
� The following example illustrates the use of binomial test in
a study in which Ho: p = .
�
Example:
23
Table 4.1
Knot-tying method chosen under
stress
Method Chosen
Frequency 16 2 18
2
4
Hypothesis:
Statistical Test:
The binomial test is chosen because the data are in two discrete categories and the design is of the one-
sample type.
Significance
Level:
2
5
let α = .01
N = is the number of cases = 18
Criterion:
Decision:
In this experiment all but two of the subjects didn’t used the first-learned method when asked to tie the knot
under stress (late at night after a long final examination) These data are shown in Table 4.1. In this case, N is
the number of independent observations = 18, k is the smaller frequency = 2. Table D shows that for N =
18, the probability associated with k ≤ 2 is 0.001.
We reject Ho since the region of rejection consist of all values of Y, which are so small that probability
associated with k ≤ 2 is 0.001 is less than the α = .01.
Conclusion: 2
Thus we conclude that p > q, that is, that people under stress revert to the first-learned of two methods. 6
Table D cannot be used when N is larger than 35. However, it can be shown
L that, as N increases the binomial distribution tends towards the normal
A distribution. The distribution of the variable Y approaches a normal
distribution The tendency is rapid when p is close to 0 or 1. That is the greater
R the disparity between p and q, the larger must be N is usefully close to to the
G normal distribution.
E When the size of the sample ‘n’ is greater than 25 and the probability ‘p’ of
obtaining the first category is around 0.50, then product of the term ‘npq’ is at
least 9. In this case, the binomial distribution approximates the normal
S distribution in the binomial test of significance. Because of this approximation,
A a normal curve z-test is used as an approximation. Within these limitations the
sampling distribution of Y is approximately normal, with mean Np and
M variance Npq therefore maybe tested by :
P
L z= = eq(4.3)
E Where z is approximately normally distributed with mean o and standard
S deviation of 1.
L
The approximation for normal distribution becomes better if a correction
A for “continuity” is used. The correction for continuity consist of reducing
by .5, the difference between the observed value of Y and its expected
R value = Np. Therefore, when Y we add .5, and when Y we subtract .5
G from Y. That is the observed difference is reduced by .5
Thus z becomes
E
Eq.(4.4) z=
S
Where Y + .5 is used when Y < Np and Y - .5 is used when Y > Np.
A
M
P
L
E
S
L
To show how good this approximation is when
A p = even for N < 25, we can apply it to the knot-tying data discussed
earlier. In that case, N = 18, Y = 2, and p=q= . For this data Y < Np that
R is, 2 < 9.
G z= eq(4.4)
E
z=
S z = -3.06
(b) If N 35, test by using eq (4.4) gives the probability associated with the
occurrences under of values as large as an observed z.
If the probability associated with the observed value Y or an extreme value is equal
4
4 to or less than reject . Otherwise do not reject .
31
Seatwork:
3
2