Sunteți pe pagina 1din 32

THE SINGLE-

SAMPLE CASE
(THE BINOMIAL TEST)
The Binomial Test

In statistics, the binomial test is an


exact test of the statistical significance of
deviations from a theoretically expected
distribution of observations into two
categories.

2
Assumptions for Binomial Test:

1. The 2. Each trial 3. The probability 4. The trials are


experiment results in an of success, independent; that
consists of n outcome that denoted by p, is, the outcome on
repeated trials. may be classified remain constant one trial does not
as a success or a from trial to trial. affect the outcome
failure. on other trials.

3
Example:
You flip a coin 2 times and count the
number of times the coin lands on
heads.

 The experiment consists of repeated


trials. We flip a coin 2 times.

 Each trial can result in just two possible


outcomes - head or tail.

 The probability of success is constant -


0.5 on every trial.

 The trials are independent; that is,


getting heads on one trial does not
affect whether we get heads on other4
trials.
Function & Rationale

There are many populations which are


conceived as consisting of only two
classes.

Examples of such classes are:


▫ male and female
▫ literate and illiterate
▫ member and non-member
▫ married and single
▫ institutionalized and
ambulatory
for such cases all of the possible observations from the population will fall into one of two
discrete categories. Such a population is usually called a binary population or dichotomous
population.

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

It is also assumed that each probability is constant regardless of the number


of objects sampled or observed.

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 .

For convenience in discussing the binomial


distribution, we shall denote the outcome as
“success” and the outcome as “failure”. In
addition in a series of N observations,

Is the number of “successes” or the number of


outcomes of the type 8
METHOD!!!
▪  
In a sample of size N, the probability of obtaining k objects in one category and
objects in the other category is given by

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:

N = the number of rolls (5)


k = the observed number of sixes (2)
p = the expected proportion of sixes
q=

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.

Using the formula;

b(x; n, P) = nCx * Px * (1 - P)n - x 

Therefore, the binomial probability is:

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

B. Suppose now that we want


to know the probability of
obtaining two or fewer sixes
when a fair die is rolled five
times.

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:

From Eq. (4.1)

▪ The probability of obtaining 0 sixes is


▪ The probability of obtaining one six is
▪ The probability of obtaining two sixes
is
Now we denote the probability of obtaining 2
or fewer sixes.
Using Eq. 4.2 we have

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:

Suppose we observe seven successes and three-failures.

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.

Because of the symmetry of the binomial distribution when p = ,


P[ Y ≥ k] = P[ Y ≤ N – k]. Thus this example,
P[ Y ≤ 3] = P[ Y ≥ 7] = .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:

The probabilities given in Table D are one-tailed. A one-tailed test is used


when we have predicted in advance which of the two categories should
contain the smaller number of cases.

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,

For N = 10 and k = 7 the two tailed probability associated with the


occurrence under Ho is 3.444

2
2
� The following example illustrates the use of binomial test in
a study in which Ho: p = .


Example:

In a study of the effects of stress an experimenter taught 18 college students


2 different methods of tying the same knot. Half of the subjects (randomly
selected from the group of 18) learned method A first, and half learned
method B first. Later--- at midnight, after a 4-hour final examination ---each
subject was asked to tie the knot. The prediction was that stress would
induce regression, i.e., that the subjects would revert to the first learned
method of tying the knot. Each subject was categorized according to whether
the subject used the knot-tying method learned first or the one learned
second when asked to tie the knot under stress.

23
Table 4.1
Knot-tying method chosen under
stress

Method Chosen

First-learned Second-learned Total

Frequency 16 2 18

2
4
Hypothesis:

Ho: p = q = ½ there is no difference between the probability of using


the first-learned method under stress (p)
and the probability of using the second-learned method
under stress (q).

Ha: p > q when under stress, the probability of using


the first-learned method is greater than the probability of
using the second-learned method.

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:

Reject Ho if the probability associated with k ≤ 2 is less than or equal to α = .01

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

A Table A shows that a value z as extreme as -3.06 has one-tailed probability


associated with its occurrence under of .0011.
M
P
L
E
S
3
0
Summary of the Procedure:
1
1 Determine N = the total of cases observed.

Determine the freq. of the observed occurrences in each of


2
2 the two categories.

The method of finding the probability of occurrences under of the observed


values, or values even more extreme, depends upon the sample size.

(a) If N 35, Appendix table D gives one-tailed probabilities under of various


values as small as an observed Y. Specified , and determine whether the test
3
3 should be one- tailed or two-tailed.

(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:

1. 80% of people who purchase pet insurance are women. If 9 pet


insurance owners are randomly selected, find the probability that
exactly 6 are women.

2. A die is tossed three times. What is the probability of ;

a) No fives turning up?


b) 1 five?
c) 3 five?

3
2

S-ar putea să vă placă și