Sie sind auf Seite 1von 37

Hypothesis Testing with One Sample

Definitions
A hypothesis test is a process that uses sample statistics to test a claim
about the value of a population parameter.
A verbal statement, or claim, about a population parameter is called a
statistical hypothesis.
A null hypothesis H0 is a statistical hypothesis that contains a statement
of equality such as , =, or .
A alternative hypothesis Ha is the complement of the null hypothesis.
It is a statement that must be true if H0 is false and contains a statement
of inequality such as >, , or <.
To write the null and alternative hypotheses, translate the claim made
about the population parameter from a verbal statement to a
mathematical statement.
Example:
A manufacturer claims that its rechargeable batteries have an average life
of at least 1,000 charges.
Null hypothesis
H0:   1000 (Claim)
Condition of equality
Ha:  < 1000 Complement of the
null hypothesis

Always begin the hypothesis test assuming that the null hypothesis is true.
At the end of the test, one of two decisions will be made:
1. reject the null hypothesis, or
2. fail to reject the null hypothesis.

A type I error occurs if the null hypothesis is rejected when it is true.

A type II error occurs if the null hypothesis is not rejected when it is false.
Actual Truth of H0
Decision H0 is true H0 is false

Do not reject H0 Correct Decision Type II Error

Reject H0 Type I Error Correct Decision

Level of Significance
In a hypothesis test, the level of significance is your maximum allowable
probability of making a type I error. It is denoted by  .
Commonly used levels of significance are:  = 0.10,  = 0.05,  = 0.01
By setting the level of significance at a small value, you are saying that you
want the probability of rejecting a true null hypothesis to be small.

The probability of making a type II error is denoted by ,


After stating the null and alternative hypotheses and specifying the level of
significance, a random sample is taken from the population and sample statistics
are calculated.
The statistic that is compared with the parameter in the null hypothesis is
called the test statistic.(TS).

Population Test statistic Standardized test


parameter statistic
μ X z
2 S2 t (n < 30) ; z (n  30)
p p̂ Binomial
If the null hypothesis is true, a P-value (or probability value) of a hypothesis test
is the probability of obtaining a sample statistic with a value as extreme or more
extreme than the one determined from the sample data.
The P-value of a hypothesis test depends on the nature of the test.
There are three types of hypothesis tests – a left-, right-, or two-tailed test. The
type of test depends on the region of the sampling distribution that favors a
rejection of H0. This region is indicated by the alternative hypothesis.
Left-tailed Test : If the alternative hypothesis contains the less-than inequality
symbol (<), the hypothesis test is a left-tailed test.

H0: μ  k
Ha: μ < k
P is the area to
the left of the test
statistic.

z
Test -3 -2 -1 0 1 2 3
statistic
Right-tailed Test : If the alternative hypothesis contains the greater-than symbol
(>), the hypothesis test is a right-tailed test.

H0: μ  k P is the area to


Ha: μ > k the right of the
test statistic.

z
-3 -2 -1 0 1 2 3
Two-tailed Test : If the alternative hypothesis contains the not-equal-to symbol
(), the hypothesis test is a two-tailed test. In a two-tailed test, each tail has an
area of P. H0: μ = k
P is twice the area Ha: μ  k
P is twice the area
to the right of the
to the left of the positive test
negative test statistic.
statistic.

z
-3 -2 -1 0 1 2 3
Definition: The critical region, also called the rejection region, is that set
of values of the test statistic for which the null hypothesis is rejected.
The statistical test of the null hypothesis H0 is completely specified once
the test statistic and the critical region are specified. If TS denotes the test
statistic and C denotes the critical region, then the statistical test of the null
hypothesis H0 is as follows:
“Reject H0 if TS is in C
Do not reject H if TS is not in C
The rejection of the null hypothesis H0 is a strong statement that H0 does
not appear to be consistent with the observed data. The result that H0 is not
rejected is a weak statement that should be interpreted to mean that H0 is
consistent with the data.
Example ;Suppose a test of H0: μ = 0 against Ha: μ  0 resulted in rejection of
H0 at the 5 percent level of significance. Which of the following statements is
(are) accurate?
(a) The data proved that μ is significantly different from 0, meaning that it is far
away from 0.
(b) The data were significantly strong enough to conclude that μ is not equal to 0.
(c) The probability that μ is equal to 0 is less than 0.05.
Digression : Standard Normal Probabilities

clear all
x=-3:0.01:3;
y=normcdf(x);
y1=normpdf(x);
plot(x,y)
hold
plot(x,y1,'r')
grid
Let us look at the outcome of TS in the example considered:
• H0 is rejected at the 5% level of significance. This means that the TS resulted
in sample mean which leads to the value of standard normal variable
abs(Z)>1.96. Thus we conclude that sample mean is significantly far away from
the value assumed in H0. In particular, the probability of rejecting H0 when it is
true (that is making an error of type 1) is less than 5%.
Depending on the value of TS we can further extend the level of confidence.
•If on the other hand, TS yields a
value which is closer to the value
assumed in H0 and falls in “don’t
reject” region all we can say is that
the sample data is consistent with
the “null hypothesis”. It yields
insufficient information for rejecting
it. We may have made an error of
Type 2 in not rejecting H0. However,
without furher knowledge on the true
value of the population mean we can
not estimate Type 2 error probability.
Tests concerning the Mean of Normal Population : Known Variance
Suppose that X1, . . . , Xn are a sample from a normal distribution having
an unknown mean μ and a known variance σ2, and suppose we want to
test the null hypothesis that the mean μ is equal to some specified value
against the alternative that it is not. That is, we want to test
H0: μ = μ 0
against the alternative hypothesis
Ha: μ  μ0
for a specified value μ0.
Since the natural point estimator of the population mean μ is the sample mean
1 n
X   Xi it would seem reasonable to reject the hypothesis that the
n i 1

population mean is equal to μ0 when X is far away from μ0. That is, the critical
region of the test should be of the form

C  X i , i  1, n,  0  X  c 
for a suitable value of c.
Suppose we want the test to have significance level α. Then c must be
chosen so that the probability,
P( X   0  c)  
X 
so using the standardized variable Z  
n
X    we can write
/ n 
 n c

P ( X   0  c )  P Z   
  
Since the probability that the absolute value of a standard normal exceeds
some value is equal to twice the probability that a standard normal
exceeds that value
 n c  n c 

P ( X   0  c )  2 P Z   
  or P Z  
    2
 

Since zα/2 is defined to be such that PZ  z / 2   it follows that
2
c 
n  z / 2  c  z / 2
 n
 n c
Hence the condidition P( X   0  c)  P Z    
  

P Z  z  / 2   can be written as,
2
 
X    z / 2  X    z / 2
n n
Thus since the hypothesis is H0 :  = 0 and the critical region is

X   0  c we conclude that, Reject H0 if n


X    z / 2

Do not reject H0 otherwise
Example : Suppose that the received signal of intensity is a normal
random variable with mean μ and standard deviation 4. In other words,
the value of the signal emitted is altered by random noise, which is
normally distributed with mean 0 and standard deviation 4. It is
suspected that the intensity of the signal is equal to 10.
Test whether this hypothesis is plausible if the same signal is
independently received 20 times and the average of the 20 values received
is 11.6. Use the 5 percent level of significance.
A- : If μ represents the actual intensity of the signal emitted, then the null
hypothesis we want to test is H0: μ = 10 against the alternative Ha: μ  10.
We are interested in testing this at significance level 0.05. To begin, we
compute the value of the statistic
n 20
X   (11.6  10)  1.79
 4
Since 1.79<1.96 = z 0.025 we do not reject H0 at 0.05 significance level.
In other words, we conclude that the data are not inconsistent with the null
hypothesis that the value of the signal is equal to 10. The reason for this is that
a sample mean 11.6 would occur over 5 percent of the time when H0 is true,
i.e.,  =10.
The p value is the smallest significance level at which the data lead to
rejection of the null hypothesis. It gives the probability that data as
unsupportive of H0 as those observed will occur when H0 is true.
A small p value (say, 0.05 or less) is a strong indicator that the null
hypothesis is not true. The smaller the p value, the greater the evidence for
the falsity of H0.
In practice, the significance level is often not set in advance; rather, the
data are used to determine the p value. This value is often either so large
that it is clear that the null hypothesis should not be rejected or so small
that it is clear that the null hypothesis should be rejected.
Example : Consider the previous example and determine the p values
(the smallest significance levels at which the data lead to rejection of the
null hypothesis) assuming TS yields sample means:
(a) 10.8 and (b) 7.8 .
A- n 20
(a) X   10.8  10  0.894 Since.
 4
P Z  0.894  2 PZ  0.894  0.38  p
But this p value is unreasonably large since a sample mean of 10.8 would
occur about 38 percent of the time when H0 is true,
(b) If the value of the sample mean were 7.8, then the absolute value of
the test statistic would be Z=2.46. Hence the p value would be,
P  Z  2.46  2 P  Z  2.46   0.014
Thus, H0 would be rejected at all significance levels above 0.014
and would not be rejected for lower significance levels.

Example : Consider the same example (σ = 4, n = 20, 0.05 significance level)


and determine the probability that the null hypothesis (that the signal intensity
is equal to 10) will not be rejected when the actual signal value is 9.2.

A- The significance-level-0.05 test of H0: =10 ; Ha : 10 is to reject H0


when 20
X  10  z0.025 1.96  X  10 1.753
4
That is, if X ≥ 11.753 or X ≤ 8.247 then H0 will be rejected.
Now, if the population mean is 9.2, then the standardized variable
would be X  9.2
Z
0.894
Thus, when the true value of the signal is 9.2, we can write
P  Rejection of H 0   P  X  8.247   P  X  11.753
 X  9.2 8.247  9.2   X  9.2 11.753  9.2 
 P    P  0.894 
 0.894 0.894   0.894 
 P( Z  1.066)  P ( Z  2.856)  0.1432+0.0021 = 0.1453

Thus we conclude that, when the true signal value is 9.2, there is an
85.47 percent chance that the 0.05 significance level test will not reject
the null hypothesis that the signal value is equal to 10.
Example : To test the hypothesis H0: μ = 105 against Ha: μ  105 a
sample of size 9 is chosen. If the sample mean is 100, find the p value if
the population standard deviation is known to be
(a) σ = 5 ; (b) σ = 10 ; (c) σ = 15
In which cases would the null hypothesis be rejected at the 5 percent
level of significance? What about at the 1 percent level?
What happens when the sample size is increased to 36?
P ( Z  a )  P ( Z  a )  P ( z  a )
 2 P ( Z  a )  2 1   ( a )
A- The p values are obtained as:

 100  105 
(a) P   Z  9  3   2 P  Z  3  2 1   (3)   0.0026  p
 5 
 100  105 
(b) P   Z  9  1.5   2 P  Z  1.5   2 1   (1.5)   0.1336  p
 10 
 100  105 
(c ) P   Z  9  1   2 P  Z  1  2 1   (1)   0.3174  p
 15 
Thus we conclude that the null hypothesis will be rejected for (b) and (c) at
5 % confidence level but will not be rejected for the case of (a) . (a) will not
be rejected also at 1% confidence level.
Increasing sample size fourfold increases the standard normal values twofold.
We then have
(a) 2 P  Z  6   0=
p P (b) 2 P  Z  3  0.0026  p (c) 2 P  Z  2   0.0456  p

Thus, in this case all tests will not reject the null hypothesis at 5 %
confidence level, but the hypothesis will be rejected for test (c) at 1%
confidence level.
Example : Traffic authorities claim that traffic lights are red for a time that is
normal with mean 30 seconds and standard deviation 1.4 seconds. To test this
claim, a sample of 40 traffic lights was checked. If the average time of the 40
red lights observed was 32.2 seconds, can we conclude, at the 5 percent level
of significance, that the authorities are incorrect? What about at the 1
percent level of significance?
A- In this case H0: =30, =1.4, n=40 and X =32.2. Hence,
 32.2  30 
P  Z  40  9.9   2 P  Z  9.9   0
 1.4 
Thus we can conclude that the authorities are incorrect both at 5% and
also at 1% significance levels.

One-Sided Tests
(a) Right handed tests: In many situations, the hypothesis we are
interested in testing is that the mean is less than or equal to some
specified value μ0 versus the alternative that it is greater than that value.
That is, we are often interested in testing
H 0 :   0 versus H a :   0
Since we would want to reject H0 only when the sample mean is much
larger than μ0 (and no longer when it is much smaller), it can be shown, in
exactly the same fashion as was done in the two-sided case, that the
significance-level-α test is to

 X    z
n
Reject H 0 if
 0 

Don't reject otherwise

The p value is then equal to the probability that a standard normal random
variable
 X  0  is at least as large as the value of z
n

The null hypothesis is then rejected at any significance level greater
than or equal to the p value.
(b) Left handed tests: In this case all we need to do is reverse the inequalities
for the right handed test.
We have assumed so far that the underlying population distribution is the
normal distribution. However, we have only used this assumption to
conclude that
X   
n
 0

has a standard normal distribution. But by the central limit theorem this
result will approximately hold, no matter what the underlying population
distribution, as long as n is reasonably large. A rule of thumb is that a
sample size of n ≥ 30 will almost always suffice.
Example :The following data come from a normal population having
standard deviation 4:
{105, 108, 112, 121, 100, 105, 99, 107, 112, 122, 118, 105}
Use them to test the null hypothesis that the population mean is less
than or equal to 108 at the
(a) 5 percent level of significance ;
(b) 1 percent level of significance;
(c) What is the p value?
A- Sample mean is obtained as 109.5, sample size is 12 and SD is 4. Hence, at
5% level of significance
Null hypothesis is 0=108
H 0 :   0 versus H a :   0

 X    z
n
Reject H 0 if  1.645
 0 

Don't reject otherwise

12
109.5  108  1.3  1.645  Don' t reject
4

p value  1   ( 1.3)  0.097


Example : The following sample of size n=6 is from a normal distribution
with SD=0.5. Test the null hypothesis that the population mean = 14.4 at 5
percent level of significance. {15.1, 14.8, 14.0, 15.2, 14.7, 14.5}.
A- The sample mean is calculated as 14.717, hence the standard normal variable is

 X     0.5 (14.717  14.4)  1.551


n 6
 0

P   Z  1.551   2 P  Z  1.551  2 1   (1.551)   0.1212  p

Thus there is about 12% probability for the sample mean to be 14.717 when
the actual value is 14.4. Hence, don’t reject the null hypothesis. Another
way of arriving to this conclusion is to note that the hypothesis is to be rejected
if the test statistics (TS) > 1.96 That is reject if

n
TS  X  o is greater than 1.96

Example: It is known that the value received at a local receiving station is
equal to the value sent plus a random error that is normal with mean 0 and
standard deviation 2. If the same value is sent 7 times, compute the p value for
the test of the null hypothesis that the value sent is equal to 14, if the values
received are : {14.6, 14.8, 15.1, 13.2, 12.4, 16.8, 16.3} H0:=14 (=2,n=7)
Compute the probability that the null hypothesis (the value 14 is sent) will be
rejected, at the 5 percent level of significance, when the actual value sent is 15.
A- Sample mean is 14.742. The standard normal variable and p value are
calculated as, 7
14.743  14  0.983 p value  2 P(Z  0.983)  0.326
2
At 5% significance level H0 will be rejected when sample mean is in the interval
X  14  z0.025 1.96  X  14 1.481  X  12.52 or X  15.48
7
2
X  15 12.52  15 15.48  15
Then since, Z    3.28 ; Z   0.635
2/ 7 0.756 0.756
the probability of rejecting H0 when the actual value is 15 is
P  Z  3.28  P  Z  0.635  0.0005  0.2635  0.264
Example : Consider a test of H0: μ ≤ 100 versus Ha:μ > 100. Suppose that a
sample of size 20 has a sample mean of 108. Determine the p value of this
outcome if the population standard deviation is known to equal 15.
A- 20
Z 108  100   2.385
15
p value  P( Z  2.385)  1    2.385   1  .9914  0.0086
Case of Unknown Variance
The t Test for the Mean of a Normal Population
When σ is no longer assumed to be known, it is reasonable to estimate it by
the sample standard deviation S. In which case the T distribution needs to be
used, thus
 X  X
2

X    X   
n n
Z  T with S 
i

 0
S
0
n 1
Since the absolute value of such a random variable will exceed tn−1,α/2 with
probability α, it follows that a significance-level-α test of H0: μ = μ0 versus
Ha: μ  μ0 is, when σ is unknown
Reject H0 if |T| ≥ tn−1,α/2
Not reject H0 otherwise
Example :Among a clinic’s patients having high blood cholesterol levels of
at least 240 volunteers were recruited to test a new drug designed to reduce
blood cholesterol. A group of 40 volunteers were given the drug for 60 days,
and the changes in their blood cholesterol levels were noted. If the average
change was a decrease of 6.8 with a sample standard deviation of 12.1, what
conclusions can we draw? Use the 5 percent level of significance.
A-
Let us define the null hypothesis as Ho: the new drug has no effect

T
n
X   o   40 6.8  3.554 T39.0.025  z 0.025  1.96
S 12.1
Thus since, T>1.96 the null hypothesis should be rejected at 5% confidence level.
The p value, that is the upper limit of confidence level for not rejecting the null
hypothesis can be calculated as,

p value = 2P{T39 > 3.554} = 0.0001


Thus, at any significance level greater than 0.0001, we reject the hypothesis
argueing that the change in levels is due solely to chance.
Example: Considering the sample
6.1, 5.4, 4.8, 5.8, 6.6, 5.3, 6.1, 4.4, 3.9, 6.8, 6.5, 6.3
test H0: μ = 5.2 versus Ha: μ  5.2 at 5% confidence level.
A- We can calculate the sample mean and SD as X = 5.667 and S = 0.921.
12
T  5.667  5.2   1.76 t11,0.025  2.20 T11(1.76)0.05
0.921
Thus, the value of the test statistic is less than 2.20 and hence, the null
hypothesis should not be rejected. That is, the data are not conclusive enough
to enable us to conclude that μ  5.2, at the 5 percent level of significance.
Hypothesis Tests Concerning Population Proportions
(a) One-sided tests: We suppose that the population is very large (in
theory, of infinite size), and we let p denote the unknown proportion of
the population with the characteristic. We will be interested in testing the
null hypothesis
H0: p ≤ p0 against the alternative Ha: p > p0
for a specified value p0. Note that this is a right tailed test
If a random selection of n elements of the population is made, then the
indicator variable X, which represents the number with the
characteristic, will have a binomial distribution with parameters n
and p. Now it should be clear that we want to reject the null hypothesis
that the proportion is less than or equal to p0 only when X is sufficiently
large. Hence, if the observed value of X is XS, =M then the p value of
these data will equal the probability that at least as large a value would
have been obtained if p had been equal to p0 (which is the largest
possible value of p under the null hypothesis). That is, if we observe that
X is equal to XS, then N
N i
p value = ≥ P{X XS}   i  p 1  p 
N i

iM  

where X is a binomial random variable with parameters n and p0.


The p value can now be computed either by using the normal
approximation or by running a code, which computes the binomial
probabilities.
The null hypothesis should then be rejected at any significance level that
is greater than or equal to the p value.
Example : A noted educator claims that over half the adult U.S.
population is concerned about the lack of educational programs shown on
television. To gather data about this issue, a national polling service
randomly chose and questioned 920 individuals. If 478 (52 percent) of
those surveyed stated that they are concerned at the lack of educational
programs on television, does this prove the claim of the educator?
A- To prove the educator’s claim, we must show that the data are strong
enough to reject the hypothesis that at most 50 percent of the population
is concerned about the lack of educational programs on television. That
is, if we let p denote the proportion of the population that is concerned
about this issue, then we should use the data to test
H0: p ≤ 0.50 versus Ha: p > 0.50 .
Since 478 people in the sample were concerned, it follows that the p
value of these data computed using a binomial code for (n=920,
p=0.5) is
p value = P{X ≥ 478} = 0.1243
% Binomial (n,p,k)
% Calculates the probability of k successes and the cumulative
% probability for binomial distribution (n,p)
clear all
n = input ('enter n ');
p nk
p = input (' enter p ' ) ; P( X  k  1)  P( X  k )
k = input (' enter k , 1<k<=n '); 1  p k  1
q=1-p;
prob(1)=q^n % zero success;
sum=prob(1); Inputs
for j=2:k+1 enter n 920
m=j-2; enter p 0.5
prob(j) = prob(j-1)*p/q * (n-m)/(m+1); enter k , 1<k<=n 477
sum = sum + prob(j);
end P(X478)
1-sum Output:
1-sum=0.1243
For such a large p value we cannot conclude that the educator’s claim has
been proved. Although the data are certainly in support of that claim, since
52 percent of those surveyed were concerned by the lack of educational
programs on television, such a result would have had a reasonable chance of
occurring even if the claim were incorrect, and so the null hypothesis is not
rejected.

On the other hand, since the sample size is large enough we could have
approximated the p value by using the normal approximation to binomial
probabilities.
Since np = 920(0.50) = 460 and np(1 − p) = 460(0.5) = 230, this would
have yielded the following:
 X  460 478  460 
p value  P( X  478)  P    P( Z  1.187)  0.117
 230 230 

Note that when one uses continuity correction and replaced 478 by 477.5
one obtains p value as 0.1242 which is a much better approximation to
the exact value of 0.1243.
Example : A computer chip manufacturer claims that at most 2 percent of
the chips it produces are defective. An electronics company, impressed by
that claim, has purchased a large quantity of chips. To determine if the
manufacturer’s claim is plausible, the company has decided to test a sample
of 400 of these chips. If there are 13 defective chips (3.25 percent) among
these 400, does this disprove (at the 5 percent level of significance) the
manufacturer’s claim?
A- If p is the probability that a chip is defective, then we should test the null
hypothesis H0: p ≤ 0.02 against Ha: p > 0.02
That is, to see if the data disprove the manufacturer’s claim, we must take that
claim as the null hypothesis. Since 13 of the 400 chips were observed to be
defective, the p value is equal to the probability that such a large number of
defectives would have occurred if p were equal to 0.02 (its largest possible
value under H0). Therefore,
p value = P{X ≥ 13} = 0.0619 where X is binomial (400, 0.02)
and so the data, though clearly not in favor of the manufacturer’s claim,
are not quite strong enough to reject that claim at the 5 percent level of
significance. 12
 400 
1    0.02i 0.984001

i 0  i 
Let us also calculate this probability using normal approximation to the binomial
distribution..

  np  400 0.02  8
SD  np 1  p   8 ( 0.98 )  2.8

 X 
P  X  13  P  Z 
5
  1.786 
 SD 2.8 
 1   ( 1.786 )  1  0.963  0.037

Hence when using approximate analysisi we would have rejected the


hypothesis at 5% confidence level.
Once again, let p denote the proportion of members of a large population who
possess a certain characteristic, but suppose that we now want to test
H0: p ≥ p0 against Ha: p < p0
for some specified value p0, which is a left tailed test. That is, we want to test
the null hypothesis that the proportion of the population with the characteristic
is at least p0 against the alternative
that it is less than p0. If a random sample of n members of the population results
in XS of them having the characteristic, then the p value of these data is
given by M
N
p value = P{X ≤ XS}   i  p i 1  p 
N i

i 0  

where X is a binomial random variable with parameters n and p0. That is, when
the null hypothesis is that p is at least as large as p0, then the p value
is equal to the probability that a value as small as or smaller than the one
observed would have occurred if p were equal to p0.
Two-Sided Tests of p
Computation of the p value of the test data becomes slightly more involved
when we are interested in testing the hypothesis
H0: p = p0 against the two-sided alternative Ha: p  p0
for a specified value p0.
Again suppose that a sample of size n is chosen, and let XS denote the number
of members of the sample who possess the characteristic of interest. We will
want to reject H0 when =XS /n, the proportionp̂ of the sample with the
characteristic, is either much smaller or much larger than p0 or, equivalently,
when XS is either very small or very large in relation to np0. Since we want
the total probability of rejection to be less than or equal to α when p0 is indeed
the true proportion, we can attain these objectives by rejecting for both large
and small values of XS with probability,
when H0 is true, α/2. That is, if we observe a value such that the probability is
less than or equal to α/2 that XS would be either that large or that small when
H0 is true, then H0 should be rejected.
Therefore, if the observed value of X is XS, then H0 will be rejected if either
P{X ≤ XS} ≤ α/2 or P{X ≥ XS} ≤/2

where X is a binomial random variable with parameters n and p0.


Hence, the significance-level-α test
will reject H0 if Min{P{X ≤ XS}, P{X ≥ XS}} ≤ α/2
or, equivalently, if
2Min{P{X ≤ XS}, P{X ≥ XS}} ≤ α
where X is binomial (n, p0). From this, it follows that if XS members of a
random sample of size n have the characteristic, then the p value for the
test is
p value = 2Min{P{X ≤ XS}, P{X ≥ XS}}
The probabilities can be calculated either via a computer program for
binomials or using the normal approximation
Example : Historical data indicate that 4 percent of the components produced
at a certain manufacturing facility are defective. Manufacturing techniques
are modified and management is curious about whether it will result in any
change in this figure of 4 percent. If a random sample of 500 items indicated
16 defectives (3.2 percent), is this significant evidence, at the 5 percent level
of significance, to conclude that a change has occurred?
A- The p value of the observed data of 16 defectives in 500 items is
p value = 2Min{P{X ≤ 16}, P{X ≥ 16}}
where X is a binomial (500, 0.04) random variable. Since 500 × 0.04 = 20, we
see that p value
p value = 2P{X ≤ 16}
Since X has mean 20 and standard deviation [20 (0.96)]1/2 = 4.38, it is clear
that twice the probability that X will be less than or equal to 16—a value
less than 1 standard deviation lower than the mean—is not going to be
small enough to justify rejection. Indeed, it can be shown that
p value = 2P{X ≤ 16} = 0.432
and so there is not sufficient evidence to reject the hypothesis that the
probability of a defective item has remained unchanged.
Example : A standard drug is known to be effective in 72 percent of cases
in which it is used to treat a certain infection. A new drug has been
developed, and testing has found it to be effective in 42 cases out of 50.
Is this strong enough evidence to prove that the new drug is more
effective than the old one? Find the relevant p value.
A- The sample proportion is 42/50= 0.83 we should use the data to test
H0: p  0.72 versus Ha: p < 0.72 .
p value = P(X  42) where X is binomial random variable (50,0.72).
This probability is calculated as 0.0365. That is there is about 3.65%
probability for having more than or equal to 42 effective cases when
the effectiveness were 72%. Thus we do not reject the claim that the
new drug is more effective with 5 % level of significance.

Das könnte Ihnen auch gefallen