You are on page 1of 86

Chapter 7

Hypothesis Testing with One Sample


7.1 Introduction to Hypothesis Testing
7.2 Hypothesis Testing for the Mean (Large Samples)
7.3 Hypothesis Testing for the Mean (Small Samples)
7.4. Hypothesis Testing for two means (independent sample)
7.5. Hypothesis Testing for Proportions
7.6 Hypothesis Testing for Variance and Standard Deviation

7.1

Introduction to
Hypothesis Testing

A statistical test of hypothesis consists of five parts:


1. The null hypothesis
2. The alternative hypothesis
3. The test statistic and its P-value
4. The reject region
5. The conclusion

Hypothesis Tests
A hypothesis test is a process that uses sample statistics to
test a claim about the value of a population parameter.
Eg. 1. If a manufacturer of rechargeable batteries claims that the
batteries they produce are good for an average of at least 1,000
charges, a sample would be taken to test this claim.

We want to test these statement (hypothesis) is true


Null hypothesis (Ho): assumed to be true (no difference; innocent)
Alternative hypothesis (Ha): Alternative Possibility Reject Ho.
When one of these hypotheses is false, the other must be true.

Stating a Hypothesis
H subzero or H naught
A null hypothesis H0 is a statistical hypothesis that
contains a statement of equality such as , =, or .
H sub-a
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 <.
Writing hypotheses: translate the claim from a verbal
statement to a mathematical statement.

Stating a Hypothesis
Example 1:

A manufacturer claims that its rechargeable batteries have


an average life greater than 1,000 charges.
> 1000 Ha
H0: 1000 Condition of equality
Ha: > 1000 (Claim)

Right-tailed test

Complement of the
null hypothesis

P is the area to
the right of the
test statistic.

-3

-2

-1

1
2
Test
statistic

Stating a Hypothesis
Example 02. A cigarette manufacturer claims that less than
one-eighth of the US adult population smokes cigarettes.

H0: p 0.125
Ha: p < 0.125 (Claim)

Left-tailed test

P is the area to
the left of the
test statistic.

-3

-2

-1

Test
statistic
z

Stating a Hypothesis
Example 03. A local telephone company claims that the
average length of a phone call is 8 minutes.

H0: = 8 (Claim)
Ha: 8

Two-tailed test
P is twice the

P is twice the

area to the right


of the positive
test statistic.

area to the left


of the negative
test statistic.

-3

-2

-1

Test
statistic
z

Test
statistic
z

Stating a Hypothesis
Exercise:
Write the claim as a mathematical sentence. State the null and
alternative hypotheses and identify which represents the claim.

One college claims that 94% of their graduates find


employment within six months of graduation.
p = 0.94
H0: p = 0.94 (Claim)
Ha: p 0.94
Complement of the
null hypothesis

Condition of
equality

Types of Errors

Always begin the hypothesis test assuming that the Ho is true.


At the end of the test, one of two decisions will be made:
1. reject Ho, or
2. fail to reject Ho (accept the Ho)

There are two possible types of errors that can be made in a


statistical test:
- Type I error rate =P reject
Ho when in fact Ho is true

Type II error rate = P accept


Ho when in fact Ho is false

Your
Decision

Actual Fact

Ho is true Ho is false

Accept Ho

Correct

Type II
Error

Reject Ho

Type I
Error

Correct

Types of Errors & Level of Significance


E.g. Compare varieties,
Ho: Varieties are not different
Ha: Varieties are different.

Type 1 error: Reject Ho when in fact Ho is correct


(The mistake to conclude Vars are dif. when in fact Vars are not dif.).
Type 2 error: Accept Ho when in fact Ho is not correct
(we conclude that Vars are not dif when in fact Vars are dif.)
Alpha : Level of significant: maximum allowable probability of
making a type I error.
Commonly used levels of significance: =0.10; =0.05; =0.01

- Set small ( = 0.01) we want only 1% of making Type I error (


small we want to be more carefully in conclude Varieties are dif.).
Or There is 1% of mistake (making type 1 error) when we conclude
Var are dif but they actually are not dif.

Statistical Tests
x
After stating the
Ho and Ha 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 Ho is called the test statistic.
Population
parameter

Test
statistic
X

p
2

p
s2

Standardized test
statistic
z (n 30)
t (n < 30)
z

X2

P-values and Reject Region


P-value of a hypothesis test: a probability calculated using the
test statistic (or the probability of observing a test statistic as
extreme as or more extreme than the observed value, if in fact
Ho is true.
Reject Region: The set consisting of values that support the
alternative hypothesis and lead to rejecting Ho is called reject
region. The other, consisting of values that support the null
hypothesis is called the acceptance region.

/2: level of

/2: level of

significance

significance
z

-3

-2

-1

-z/2

z/2

Left-tailed Test
1. 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.

-3

-2

-1

Test
statistic
z

Right-tailed Test
2. If the alternative hypothesis contains the greater-than
symbol (>), the hypothesis test is a right-tailed test.
H0: k
Ha: > k
P is the area to
the right of the
test statistic.

-3

-2

-1

Test
statistic z

Two-tailed Test
3. 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
Ha: k
P is twice the

P is twice the

area to the right


of the positive
test statistic.

area to the left


of the negative
test statistic.

-3

-2

-1

Test
statistic
z

Test
statistic
z

Making a Decision
Decision Rule Based on P-value
To use a P-value to make a conclusion in a hypothesis test,
compare the P-value with .
1. If P , then reject H0.
2. If P > , then fail to reject H0.

For most the research, you want to have small P to accept Ha


meaning that the treatment are significant.

Claim
Decision

Claim is H0

Claim is Ha

Reject H0

There is enough evidence


to reject the claim.

There is enough evidence


to support the claim.

Do not reject H0

There is not enough evid


ence to reject the claim.

There is not enough evid


ence to support the claim
.

Interpreting a Decision
Example:
You perform a hypothesis test for the following claim. How
should you interpret your decision if you reject H0? If you fail
to reject H0?

H0: (Claim) A cigarette manufacturer claims that about


one-eighth of the US adult population smokes
cigarettes.

If H0 is rejected conclude there is sufficient evidence to


indicate that the manufacturers claim is false.
If you fail to reject H0, conclude there is NOT sufficient
evidence to indicate that the manufacturers claim is false.

Steps for Hypothesis Testing


1. State the claim mathematically and verbally. Identify the
null and alternative hypotheses.

H 0: ?

H a: ?

2. Specify the level of significance.

This sampling distribution


is based on the assumption
that H0 is true.

=?

3. Determine the standardized


sampling distribution and
draw its graph.

4. Calculate the test statistic


and its standardized value.
Add it to your sketch.

z
Test statistic

Continued.

Steps for Hypothesis Testing


5. Find the P-value.

6. Use the following decision rule.


Is the P-value
No

Fail to reject H0.

Yes

Reject H0.

7. Write a statement to interpret the decision in the context of


the original claim.

These steps apply to left-tailed, right-tailed, and


two-tailed tests.

7.2

Hypothesis Testing for the


Mean (Large Samples)
Population
parameter

p
2

Test
statistic
X

p
s2

Standardized test
statistic
z (n 30)
t (n < 30)
z

X2

1. Using P-values to Make a Decision


Decision Rule Based on P-value
To use a P-value to make a conclusion in a hypothesis test,
compare the P-value with .
1. If P , then reject H0.
2. If P > , then fail to reject H0.

Recall that when the sample size is at least 30, the


sampling distribution for the sample mean is normal.

Using P-values to Make a Decision


Example:
The P-value for a hypothesis test is P = 0.0256. What is
your decision if the level of significance is
a.) 0.05,
b.) 0.01?
a.) Because 0.0256 is < 0.05, you should REJECT Ho at
=0.05 ACCEPT Ha
b.) Because 0.0256 is > 0.01, you should fail to reject the
null hypothesis at =0.01 ACCEPT H0

Finding the P-value


After determining the hypothesis tests standardized test statistic
(Observed z or test statistic) and the test statistics corresponding area
(P), do one of the following to find the P-value.
a. For a left-tailed test, P = (Area in left tail).
b. For a right-tailed test, P = (Area in right tail).

c. For a two-tailed test, P = 2(Area in tail of test statistic).


Example: The test statistic for a right-tailed test is z = 1.56. Find the
P-value
In Table 3, P-value= P(z>1.56) = 1-P(z<1.56) =1.9406 = 0.0594
P-value = 0.0594
0

1.56

The area to the right of z = 1.56


is 1 .9406 = 0.0594.

Finding the P-value


Example:
a) The Observed test statistic for a two-tailed test is z = 2.63.
Find the P-value.
In Table 3, P-value = 2P(z<-2.63) = 2(0.0043) = 0.0086
0.0043
2.63

z
0

Example:
b) The Observed test statistic for a two-tailed test is z = 3.03.
Find the P-value.
In Table 3, P-value = P(z>3.03) + P(z<-3.03)
=2P(z<-3.03) = 2(0.0012) = 0.0086

Using P-values for a z-Test


Z-test for the mean: is a statistical test for a population mean.
Requirement of z-test:
-For any population when the sample size n 30.
-Population is normal and is known

The test statistic is the sample X mean and the standardized


test statistic (Observed z) is z.

z x
n

standard error
x
n

When n 30, the sample standard deviation s can be


substituted for .

Using P-values for a z-Test


Using P-values for a z-Test for a Mean
In Words

In Symbols

1. State the claim mathematically


and verbally. Identify the null
and alternative hypotheses.

State H0 and Ha.

2. Specify the level of significance.

Identify .

3. Determine the observed Z (test


statistic)

z x
n

4. Find the area that corresponds


to z.

Use Table 3 in
Appendix
Continued.

Using P-values for a z-Test


Using P-values for a z-Test for a Mean

In Words

In Symbols

5. Find the P-value.


a. For a left-tailed test, P = (Area in left tail).
b. For a right-tailed test, P = (Area in right tail).
c. For a two-tailed test, P = 2(Area in tail of test statistic).
6. Make a decision to reject or fail to Reject H0 if P-value .
reject the null hypothesis.
Otherwise, fail to reject
H0.
7. Interpret the decision in the
context of the original claim.

Hypothesis Testing with P-values


Example:
A manufacturer claims that its rechargeable batteries are good
for an average of more than 1,000 charges. A random sample of
100 batteries has a mean life of 1002 charges and a standard
deviation of 14. Is there enough evidence to support this claim
at = 0.01?

H0: 1000

Ha: > 1000

(Claim)

The level of significance is = 0.01.

The observed z is
z x 1002 1000
n
14 100
1.43

Continued.

Hypothesis Testing with P-values


Example continued:
A manufacturer claims that its rechargeable batteries are good
for an average of more than 1,000 charges. A random sample of
100 batteries has a mean life of 1002 charges and a standard
deviation of 14. Is there enough evidence to support this claim
at = 0.01?
H0: 1000
Ha: > 1000 (Claim)
z=1.43 Table 3, P= P(z>1.43) = 1-P(Z<1.43) =0.0764.
The area to the right of
z = 1.43 is P = 0.0764.
0

1.43

P-value > = 0.01


fail to reject H0.

At the 1% level of significance, there is not enough evidence to


support the claim that the rechargeable battery has an average life
of at least 1000 charges.

2. Rejection Regions and Critical Values


A rejection region (or critical region) of the sampling
distribution is the range of values for which the null hypothesis
is not probable. If a observed test statistic (z) falls in this
region, the null hypothesis is rejected. A critical value z (zc)
separates the rejection region from the nonrejection/acceptance
region.
Example:
Find the critical value and rejection region for a right tailed test
with = 0.01.

= 0.01
0

2.33

The rejection region is to the


right of z = 2.33.

2. Rejection Regions and Critical Values


Fail to reject Ho.

Fail to reject Ho.


Reject Ho.

Reject Ho.

zc

0
-2.33 -1.64 -1.28
0.01 0.05 0.10

Left-Tailed Test

1.28 1.64 2.33


0.10 0.05 0.01

Right-Tailed Test
Fail to reject Ho.

Reject Ho.

Reject Ho.

zc

-2.57 -1.96 -1.64 0


0.01 0.05 0.1

1.64 1.96 2.57


0.1 0.05 0.01

Two-Tailed Test

zc

Rejection Regions and Critical Values


Finding Critical Values in a Normal Distribution
1. Specify .
2. Decide the test is left-, right-, or two-tailed.
3. Find the critical value(s) z. If the hypothesis test is
a. left-tailed, find the z-score that corresponds to
b. right-tailed, find the z-score that corresponds to 1 ,
c. two-tailed, find the z-score that corresponds to and 1
.

4. Sketch the standard normal distribution. Draw a


vertical line at each critical value and shade the
rejection region(s).

Rejection Regions for a z-Test


Decision Rule Based on Rejection Region
To use a rejection region to conduct a hypothesis test,
calculate the standardized test statistic, z. If the
standardized test statistic
1. is in the rejection region, then reject H0.
2. is not in the rejection region, then fail to reject H0.
Fail to reject Ho.

Fail to reject Ho.

Reject Ho.

z < z

Reject Ho.
z

Fail to reject Ho.

Left-Tailed Test
Reject Ho.

z < -z/2z/2

z/2

z>z

Right-Tailed Test
Reject Ho.

z > z/2

Two-Tailed Test

Rejection Regions for a z-Test


Using Rejection Regions for a z-Test for a Mean

In Words

In Symbols

1. State the claim mathematically


and verbally. Identify the null
and alternative hypotheses.

State H0 and Ha.

2. Specify the level of significance.

Identify .

3. Sketch the sampling distribution.


4. Determine the critical value(s).

z (Table 3)

5. Determine the rejection regions(s).


Continued.

Rejection Regions for a z-Test


Using Rejection Regions for a z-Test for a Mean

In Words
6. Find the standardized test
statistic z .

In Symbols

z x or if n 30

n
use s.

7. Make a decision to reject or fail to If z is in the rejection


region, reject H0.
reject the null hypothesis.
Otherwise, fail to reject H0.
8. Interpret the decision in the
context of the original claim.

Testing with Rejection Regions


Example:
A local telephone company claims that the average length of
a phone call is 8 minutes. In a random sample of 58 phone
calls, the sample mean was 7.8 minutes and the standard
deviation was 0.5 minutes. Is there enough evidence to
support this claim at = 0.05?

H0: = 8 (Claim)

H a: 8

The level of significance is = 0.05.


0.025

0.025
z= 1.96

z= 1.96

Continued.

Testing with Rejection Regions


Example continued: A local telephone company claims that the
average length of a phone call is 8 minutes. In a random sampl
e of 58 phone calls, the sample mean was 7.8 minutes and the s
tandard deviation was 0.5 minutes. Is there enough evidence t
o support this claim at = 0.05?
= 0.05 /2 = 0.025 P=0.975 zc =1.96
H0: = 8 (Claim)

Ha: 8

The standardized test statistic is

The test statistic falls


in the rejection region,
so H0 is rejected.

z x 7.8 8
n 0.5 58
3.05.

zc = 1.96

zc = 1.96

At the 5% level of significance, there is enough evidence to reject


the claim that the average length of a phone call is 8 minutes.

7.3

Hypothesis Testing for the


Mean (Small Samples)
Population
parameter

p
2

Test
statistic
X

p
s2

Standardized test
statistic
z (n 30)
t (n < 30)
z

X2

Critical Values in a t-Distribution


Finding Critical Values in a t-Distribution
1. Identify the level of significance .
2. Identify the degrees of freedom d.f. = n 1.
3. Find the critical value(s) t using Table 4 in the row with
n 1 df. If the hypothesis test is
a. left-tailed, use One Tail, column with a sign,
b. right-tailed, use One Tail, column with a + sign,
c. two-tailed, use Two Tails, column with a and a +
sign.

Finding Critical Values for t


Example 1: Find the critical value t for a right-tailed test
given = 0.01 and n = 24.
d.f. = n 1 = 24 1 = 23.
To find t , use Table 4 with d.f. = 23 and 0.01 in the One Tail,
column. Because the test is a right-tail test, the critical
value is positive t = 2.500
Example 2: Find the critical values t0 and t0 for a two-tailed
test given = 0.10 and n = 12.
d.f. = n 1 = 12 1 = 11.

To find the critical value, use Table 4 with d.f. = 11 and 0.10
in the Two Tail, column. Because the test is a two-tail
test, one critical value is negative and one is positive.
t0 = 1.796 and t0 = 1.796

t-Test for a Mean (n < 30, Unknown)


The t-test for the mean is a statistical test for a population
mean. The t-test can be used when the population is normal
or nearly normal, is unknown, and n < 30.
The test statistic is the sample mean X and the standardized
test statistic is t.

t x
s n

d.f. = n 1 .

t-Test for a Mean (n < 30, Unknown)


Using the t-Test for a Mean (Small Sample)

In Words

In Symbols

1. State the claim mathematically


and verbally. Identify the null
and alternative hypotheses.

State H0 and Ha.

2. Specify the level of significance.

Identify .

3. Identify the degrees of freedom


and sketch the sampling
distribution.

d.f. = n 1.

4. Determine any critical values t.

Use Table 4

5. Determine any rejection region(s).


Continued.

t-Test for a Mean (n < 30, Unknown)


Using the t-Test for a Mean (Small Sample)

In Words
6. Find the standardized test
statistic.

7. Make a decision to reject or fail


to reject the null hypothesis.
8. Interpret the decision in the
context of the original claim.

In Symbols
t x
s
n
If t is in the rejection
region, reject H0.
Otherwise, fail to
reject H0.

Testing Using Critical Values


Example 1: A local telephone company claims that the average
length of a phone call is 8 minutes. In a random sample of 18
phone calls, the sample mean was 7.8 minutes and the standa
rd deviation was 0.5 minutes. Is there enough evidence to sup
port this claim at = 0.05?

H0: = 8 (Claim) Ha: 8 The test is a two-tailed test.


= 0.05. d.f. = 18 1 = 17. t0 = 2.111 and t0 = 2.110
The standardized test statistic is

The test statistic falls in


the nonrejection region,
so H0 is not rejected.

t x 7.8 8
s n
0.5 18
1.70.

t0 = 2.110

t0 = 2.110

At the 5% level of significance, there is not enough evidence to reject the


claim that the average length of a phone call is 8 minutes.

Testing Using P-values


Example 2: A manufacturer claims that its rechargeable batteries ha
ve an average life greater than 1,000 charges. A random sample of 10
batteries has a mean life of 1002 charges and a standard deviation of
14. Is there enough evidence to support this claim at = 0.01?
Usinghttp://www.danielsoper.com/statca
H0: 1000 Ha: > 1000 (Claim) lc3/calc.aspx?id=8,

= 0.01.

d.f. = 10 1 = 9

The standardized test statistic is

t x 1002 1000
s n
14 10

Or http://stattrek.com/onlinecalculator/t-distribution.aspx

you can determine that P = 0.33


P > = 0.01
H0 would fail to be rejected.

0.45
0

0.45

At the 1% level of sig, there is not enough evidence to support the claim that
the rechargeable battery has an average life of at least 1000 charges.

Statistical Significance
The critical value approach and the P-value approach
always reach the same conclusion.
The P-value approach is often preferred because:
+ Computer printouts usually calculate P-value
+ after calculating the P-value, you can make a decision at
any significance level.
If the Ho hypothesis is rejected at =0.05, what should be
conclusion at significance level of 0.1?

7.4

Hypothesis Testing

for two means


(independent sample)

Independent and Dependent Samples


Independent samples: Two samples are independent if the
sample selected from one population is not related to the
sample selected from the second population.

Dependent samples (paired samples or matched samples):


Two samples are dependent if each member of one sample
corresponds to a member of the other sample.

Independent Samples

Dependent Samples

Hypothesis
For a two-sample hypothesis test,
1. the null hypothesis H0 is a statistical hypothesis that
usually states there is no difference between the
parameters of two populations. The null hypothesis always
contains the symbol , =, or .
1. the alternative hypothesis Ha is a statistical hypothesis that
is true when H0 is false. The alternative hypothesis always
contains the symbol >, , or <.

Test Statistic
For a two-sample hypothesis test,
1. If Both n130; n2 30 Use Z test

X1 X 2
S12 S 22

n1 n2

1. If n< 30, Both have normal Distribution Use t-test

x x 2 1 2
t 1

x x
1

Variances equal
Variances not equal
x x
1

s12 s 22

n1 n2

and d.f = smaller of n1 1 or


n2 1.

x x 1 1
n1 n2
1

and d.f =
n1
+ n2 2.

Two sample Z-test for Means


Example: Diary Intake
Is there any difference I average Whether one is larger than
another:
Data
- A random sample of size n1 from Population 1 with 1 & variance 12
- A random sample of size n2 from Population 1 with 2 & variance 22

Hypothesis : H0: 1- 2 =0 versus


- Two tailed Ha: 1- 2 # 0 or

- Left tailed Ha: 1- 2 < 0 or


- Right tailed Ha: 1- 2 > 0

Test statistic: Z

with critical value and/or p value based on the


standard normal distribution.

X1 X 2
S12 S 22

n1 n2

Two sample Z-test for Means


Is there any difference in average daily intakes of dairy products by
men and women ? Use = 0.05.
A two-sided test is appropriate.

Avg. Daily
Intakes

H0: 1- 2 =0 vs. Ha: 1- 2 # 0

Two tailed test

Test statistic:

X1 X 2
S12 S 22

n1 n2

Men

Women

Sample size

50

50

Sample mean

756

762

Sample Std Dev

35

30

756 762
352 30 2

50 50

0.92

Two sample Z-test for Means


P value approach:
P (|z |> .92) =2 P(z<-0.92) = 2(.1788) = .3576 > = 0.05
cannot reject H0 at level 0.05

Critical value approach: z/2 = 1.96


observed |z| = 0.92 < 1.96
cannot reject H0 at level 0.05

Two Sample t-Test for the Means


Using a Two-Sample t-Test for the Difference Between
Means (Small Independent Samples)

In Words

In Symbols

1. State the claim mathematically.


Identify the null and alternative
hypotheses.

State H0 and Ha.

2. Specify the level of significance.

Identify .

3. Identify the degrees of freedom


and sketch the sampling
distribution.

d.f. = n1+ n2 2 or
d.f. = smaller of n1 1
or n2 1.

4. Determine the critical value(s).

Use Table 4
Continued.

Two Sample t-Test for the Means


Using a Two-Sample t-Test for the Difference Between
Means (Small Independent Samples)

In Words

In Symbols

5. Determine the rejection regions(s).

6. Find the standardized test statistic.

x1 x 2 1 2
x x
1

7. Make a decision to reject or fail to


reject the null hypothesis.
8. Interpret the decision in the
context of the original claim.

If t is in the rejection
region, reject H0.
Otherwise, fail to
reject H0.

Two Sample t-Test for the Means


Example:
A random sample of 17 police officers in Brownsville has a
mean annual income of $35,800 and a standard deviation
of $7,800. In Greensville, a random sample of 18 police
officers has a mean annual income of $35,100 and a
standard deviation of $7,375. Test the claim at = 0.01
that the mean annual incomes in the two cities are not the
same. Assume the population variances are equal.

H0: 1 = 2
Ha: 1 2

=
(Claim) 0.005

d.f. = n1 + n2 2
= 17 + 18 2 = 33

=
0.005
-3

-2

-1

t0 = 2.576

t0 = 2.576

Continued.

Two Sample t-Test for the Means


Example continued:

H0: 1 = 2
Ha: 1 2 (Claim)

-3

-2

-1

t0 = 2.576

t0 = 2.576

The standardized error is


x x
1

n1

n2

n1 1 s12 n2 1 s 22

17 1 78002 18 1 73752

n1 n2 2

17 18 2

n1

n2
1
1

17 18

7584.0355(0.3382)
2564.92

Continued.

Two Sample t-Test for the Means


Example continued:

H0: 1 = 2
Ha: 1 2 (Claim)

-3

-2

-1

t0 = 2.576

t0 = 2.576

The standardized test statistic is


x1 x 2 1 2

x x
1

35800 35100 0
2564.92

0.273

Fail to reject H0.


There is not enough evidence at the 1% level to support
the claim that the mean annual incomes differ.

7.5

Hypothesis Testing
for Proportions
Population
parameter

p
2

Test
statistic
X

p
s2

Standardized test
statistic
z (n 30)
t (n < 30)
z

X2

z-Test for a Population Proportion


The z-test for a population is a statistical test for a population
proportion. The z-test can be used when a binomial
distribution is given such that np 5 and nq 5.
The test statistic is the sample proportion p and the
standardized test statistic is z.

p p
p
p

p
pq n

Hypothesis Test for Proportions


Using a z-Test for a Proportion p
Verify that np 5 and nq 5.

In Words

In Symbols

1. State the claim mathematically


and verbally. Identify the null
and alternative hypotheses.

State H0 and Ha.

2. Specify the level of significance.

Identify .

3. Sketch the sampling distribution.

4. Determine any critical values.

Use Table 3

Continued.

Hypothesis Test for Proportions


Using a z-Test for a Proportion p
Verify that np 5 and nq 5.

In Words

In Symbols

5. Determine any rejection regions.


6. Find the standardized test
statistic.

z p p
pq n

7. Make a decision to reject or fail to


reject the null hypothesis.

If z is in the rejection
region, reject H0.
Otherwise, fail to
reject H0.

8. Interpret the decision in the


context of the original claim.

Hypothesis Test for Proportions


Example: A college claims that more than 94% of their graduates find
employment within 6 months of graduation. In a sample of 500 rando
mly selected graduates, 475 of them were employed. Is there enough
evidence to support the colleges claim at a 1% level of significance?
Verify np & nq 5: np =(500)(.94)= 470; nq =(500)(.06)= 30 Normal
Distribution

H0: p 0.94

Ha: p > 0.94

(Claim) Right-tailed test


= 0.01P=0.99 Table 3, the critical value Z= 2.33.
p 475 / 500 0.95

0.95 0.94
z p p
pq n
(0.94)(0.06) 500

z 0.94

The test statistic falls in the


nonrejection region H0 is
not rejected.
0

2.33

At the 1% level of significance, there is not enough evidence to


support the colleges claim.

Hypothesis Test for Proportions


Example: A cigarette manufacturer claims that 1/8 of the US
adult population smokes cigarettes. In a random sample of 100
adults, 5 are cigarette smokers. Test the claim at = 0.05.
p 5 / 100 0.05

* Verify np & nq are at least 5.


np = (100)(.125)= 12.5 ; nq = (100)(.875) = 87.5
* H0: p = 0.125 (Claim)Ha: p 0.125 two-tailed test

* = 0.05 /2 =0.025 P=0.975 critical values Z/2 = 1.96.


* The test statistic is
0.05 0.125
z p p
pq n
(0.125)(0.875) 100
2.27

Reject H0.

z
z/2 = 1.96

z/2 = 1.96

At the 5% level of significance, there is enough evidence to


reject the claim that one-eighth of the population smokes.

Testing Difference between two Proportions


Goal: comparing the proportion of successes in two dif. binomial

populations
Data: a random sample of size n1 from binomial population 1 with
proportion p1 and a random sample of size n2 from binomial population
2 with proportion p2
The hypothesis of interest involves the difference, p1-p2, in the form:
H0: p1-p2 = 0 vs. Ha: one of the three alternatives
Two-sided: p1-p2 0
Left-sided: p1-p2 < 0
Right-sided: p1-p2 > 0

x1 x2 to estimate the common


P
n1 n2 value of p under H0: p1 = p2

x1 and x2 are No of success in two samples respectively


Critical value & P value based on standard Z normal distribution

Testing Difference between two Proportions


E.g. Is there a sig. diff. between the
proportions of male and female college students
who said that they had played on a soccer team
during their K-12 years? use level 0.01 to
conduct a test
consider a two-sided test

Youth Soccer

Male

Female

Sample size

80

70

Played soccer

65

39

p1q1 p2 q2

n1
n2

SE

1 1
p q
n1 n2

p p
1

SE

SE

Since the p-value < = .01, H0 is rejected There is strong evidence to indicate
that the rates of participation are different for boys and girls.

Exercising

Exercise 1. Daily Yield


The daily yield of a chemical plant has averaged 880 tons for
several years. The quality control manager wanted to know if
this average has changed. She randomly selected 50 days and
recorded an average yield of 871 tons with a standard
deviation of 21 tons. Perform a test at the significance level
= 0.01

Exercise 2. Hourly Wage


Suppose that the national average hourly wage of
construction workers is $14. A random sample of 100 workers
in California shows the mean hourly wage to be $14.66, with
standard deviation $3. Is there sufficient evidence to conclude
that the average hourly wage in California is greater than the
national average ? Use = 0.01

Exercise 3. Internet
An Internet server claimed that its users averaged 13 hours
per day. To determine whether this was an overstatement, a
competitor conducted a survey of 250 customers and found
that the average time spent online was 10.5 hours per day
with a standard deviation of 5.2 hours.
Does the data provide sufficient evidence to indicate that the
average hours of users are less than that claimed by the first
Internet provider? Test at the 0.01 level of significance.

Exercise 4. Fitness activities


Regardless of age, about 20% of American adults participate in fitness
activities at least twice a week. A random sample
of 100 adults over 40 years old found 15 who exercised at least twice a
week. Is this evidence of a decline in participation after age 40? Use a
= .05.

Exercise 1. Daily Yield


The daily yield of a chemical plant has averaged 880 tons for
several years. The quality control manager wanted to know if
this average has changed. She randomly selected 50 days and
recorded an average yield of 871 tons with a standard
deviation of 21 tons. Perform a test at the significance level
= 0.01

P-value = 0.0024 < =0.01


we should reject H0

Exercise 2. Hourly Wage


Suppose that the national average hourly wage of construction
workers is $14. A random sample of 100 workers in California shows
the mean hourly wage to be $14.66, with standard deviation $3. Is
there sufficient evidence to conclude that the average hourly wage in
California is greater than the national average? Use = 0.01

H0: = 14 vs. Ha: > 14 (Claim)

right sided test.

Critical value: What is the value that cuts off


exactly at 0.01 in the right-tail of the
standard normal distribution? z = 2.33
Observed Z = 2.2 which does not exceed the critical value 2.33
we cannot reject H0 at evel 0.01.

There is no enough evidence for the claim that >14 at = 0.01

Exercise 3. Internet
An Internet server claimed that its users averaged 13 hrs/day. To
determine whether this was an overstatement, a competitor
conducted a survey of 250 customers and found that the average
time spent online was 10.5 hrs/day with a standard deviation of 5.2
hours. Does the data provide sufficient evidence to indicate that the
average hours of use are less than that claimed by the first Internet
provider? Test at the 0.01 level of significance.

H0: = 13 (Claim) vs. Ha: < 14


Left sided test.
Critical value approach:
- = .01 is set in the left tail of the distribution as -z = -2.33 .
- Observed value Z=-7.6<-2.33 H0 is rejected.
There is sufficient evidence that the average time is less than claimed
by the Internet provided at level 0.01.

P-value approach: for a left-sided test,


p-value=P(Z<-7.6) 0< = 0.01 H0 is rejected.

Exercise 4. Fitness activities


Regardless of age, about 20% of American adults participate in fitness
activities at least twice a week. A random sample of 100 adults over 40
years old found 15 who exercised at least twice a week. Is this evidence
of a decline in participation after age 40? Use a = .05.

H0: P = 0.2 vs. Ha: P < 0.2 (claim)


Left sided test.
Critical value approach:
0.05 -z=-1.64.

Observed test statistis Z=-1.25 >-1.64


can not reject H0 at level 0.05
There is not enough evidence to claim
a decline in participation after age 40 at
significance level 0.05

7.5

Hypothesis Testing
for Variance and
Standard Deviation

Critical Values for the 2-Test


Finding Critical Values for the 2-Distribution
1. Specify the level of significance .
2. Determine the degrees of freedom d.f. = n 1.
3. The critical values for the 2-distribution are found in Table
6 of Appendix B. To find the critical value(s) for a
a. right-tailed test, use the value that corresponds to
d.f. and .
b. left-tailed test, use the value that corresponds to d.f.
and 1 .
c. two-tailed test, use the values that corresponds to
d.f. and and d.f. and 1 .

Finding Critical Values for the 2


Example:
Find the critical value for a left-tailed test when n = 19
and = 0.05.
There are 18 d.f. The area to the right of the critical
value is 1 = 1 0.05 = 0.95.
From Table 6, the critical value is 20 = 9.390.
Example:
Find the critical value for a two-tailed test when n = 26
and = 0.01.
There are 25 d.f. The areas to the right of the critical
values are = 0.005 and 1 = 0.995.
From Table 6, the critical values are 2L = 10.520 and
2R = 46.928.

The Chi-Square Test


The 2-test for a variance or standard deviation is a
statistical test for a population variance or standard
deviation. The 2-test can be used when the population is
normal.
The test statistic is s2 and the standardized test statistic
2

(n 1)s 2

follows a chi-square distribution with degrees of freedom


d.f. = n 1.

The Chi-Square Test


Using the 2-Test for a Variance or Standard Deviation

In Words

In Symbols

1. State the claim mathematically


and verbally. Identify the null
and alternative hypotheses.

State H0 and Ha.

2. Specify the level of significance.

Identify .

3. Determine the degrees of freedom


and sketch the sampling
distribution.

d.f. = n 1

4. Determine any critical values.

Use Table 6 in
Appendix B.
Continued.

The Chi-Square Test


Using the 2-Test for a Variance or Standard Deviation

In Words

In Symbols

5. Determine any rejection regions.


6. Find the standardized test
statistic.
7. Make a decision to reject or fail to
reject the null hypothesis.
8. Interpret the decision in the
context of the original claim.

(n 1)s 2

If 2 is in the
rejection region,
reject H0. Otherwise,
fail to reject H0.

Hypothesis Test for Standard Deviation


Example:
A college professor claims that the standard deviation
for students taking a statistics test is less than 30. 10
tests are randomly selected and the standard deviation
is found to be 28.8. Test this professors claim at the
= 0.01 level.

H0: 30

Ha: < 30

(Claim)

This is a left-tailed test with d.f.= 9 and = 0.01.


0.01

X2

Continued.

Hypothesis Test for Standard Deviation


Example continued:
A college professor claims that the standard deviation
for students taking a statistics test is less than 30. 10
tests are randomly selected and the standard deviation
is found to be 28.8. Test this professors claim at the
= 0.01 level.
Ha: < 30 (Claim)
H0: 30
2

= 2.088

0.01

X20

= 2.088


X2

(n 1)s 2

(10 1)(28.8)2

302
8.29

Fail to reject H0.

At the 1% level of significance, there is not enough evidence


to support the professors claim.

Hypothesis Test for Variance


Example:
A local balloon company claims that the variance for the
time its helium balloons will stay afloat is 5 hours. A
disgruntled customer wants to test this claim. She
randomly selects 23 customers and finds that the variance
of the sample is 4.5 seconds. At = 0.05, does she have
enough evidence to reject the companys claim?

H0: 2 = 5 (Claim)

H a: 2 5

This is a two-tailed test with d.f.= 22 and = 0.05.


1
0.025
2

1
0.025
2

X2L

X2R

X2

Continued.

Hypothesis Test for Variance


Example continued:
A local balloon company claims that the variance for the
time its helium balloons will stay afloat is 5 hours. A
disgruntled customer wants to test this claim. She
randomly selects 23 customers and finds that the variance
of the sample is 4.5 seconds. At = 0.05, does she have
enough evidence to reject the companys claim?
Ha: 2 5
H0: 2 = 5 (Claim)
The critical values are 2L = 10.982 and 2R = 36.781.
1
0.025
2

1
0.025
2

10.982

36.781

X2

Continued.

Hypothesis Test for Variance


Example continued:
A local balloon company claims that the variance for the
time one of its helium balloons will stay afloat is 5 hours. A
disgruntled customer wants to test this claim. She
randomly selects 23 customers and finds that the variance
of the sample is 4.5 seconds. At = 0.05, does she have
enough evidence to reject the companys claim?
Ha: 2 5
H0: 2 = 5 (Claim)
2

(n 1)s 2

(23 1)(4.5)
19.8 Fail to reject H0.
5

19.8

10.982

36.781

X2

At = 0.05, there is not enough


evidence to reject the claim that the
variance of the float time is 5 hours.

You might also like