Está en la página 1de 110

Chapter 7

Inferences Based on a Single Sample:


Tests of Hypotheses
Hypothesis Testing
Fundamentals of Hypothesis Testing
There two types of statistical inferences
Estimation and
Hypothesis Testing

Hypothesis Testing: A hypothesis is a claim


(assumption) about one or more population
parameters.
Average price of a six-pack in the U.S. is μ = $4.90
The population mean monthly cell phone bill of this
city is: μ = $42
The average number of TV sets in U.S. Homes is
equal to three; μ = 3
Hypothesis Testing

I believe the
Reject
population mean
hypothesis!
Population age is 50
Not close.
(hypothesis).
 

 
 Random
 sample
Mean 
X = 20
Hypothesis Testing

HYPOTHESIS TESTING A procedure based on


sample evidence and probability theory to determine
whether the hypothesis is a reasonable statement.
Fundamentals of Hypothesis Testing
It Is always about a population parameter, not about a
sample statistic
Sample evidence is used to assess the probability that
the claim about the population parameter is true
H 0 :μ  3 and X=2.79
A. It starts with Null Hypothesis, H0

1. We begin with the assumption that H0 is true and any


difference between the sample statistic and true
population parameter is due to chance and not a real
(systematic) difference.
2. Similar to the notion of “innocent until proven guilty”
3. That is, “innocence” is a null hypothesis.
Fundamentals of Hypothesis Testing
B. Next we state the Alternative Hypothesis, H1
1. Is the opposite of the null hypothesis
1. e.g., The average number of TV sets in U.S. homes is
not equal to 3 ( H1: μ ≠ 3 )
2. Challenges the status quo
3. May or may not be proven
4. Is generally the hypothesis that the researcher is trying
to prove. Evidence is always examined with respect to
H1, never with respect to H0.
5. We never “accept” H0, we either “reject” or “not reject”
it
Formulate the Hypothesis

NULL HYPOTHESIS A statement about the value of a population


parameter developed for the purpose of testing numerical evidence. It is
represented by H0.

ALTERNATE HYPOTHESIS A statement that is accepted if the sample


data provide sufficient evidence that the null hypothesis is false. It is
represented by H1 or Ha

H0 may usually be considered the skeptic’s hypothesis:


Nothing new or interesting happening here!
Ha may usually be considered the researcher’s
hypothesis.
10-8
Important Things to Remember about H0 and H1

H0 is the null hypothesis; H1 is the alternate hypothesis.


The purpose of hypothesis testing is to decide which of the
two hypotheses to support: H0 or Ha?
H0 and H1 are mutually exclusive and collectively exhaustive.
H0 is always presumed to be true.
H1 has the burden of proof.
A random sample (n) is used to “reject H0.”
If we conclude “do not reject H0,” this does not necessarily
mean that the null hypothesis is true, it only suggests that
there is not sufficient evidence to reject H0; rejecting the null
hypothesis, suggests that the alternative hypothesis may be
true given the probability of Type I error.
Equality is always part of H0 (e.g. “=”, “≥”, “≤”).
Inequality is always part of H1 (e.g. “≠”, “<”, “>”).
Summary:
In the process of hypothesis testing, the null hypothesis
initially is assumed to be true
Data are gathered and examined to determine whether the
evidence is strong enough with respect to the alternative
hypothesis to reject the assumption.
In another words, the burden is placed on the researcher
to show, using sample information, that the null
hypothesis is false.
If the sample information is sufficient enough in favor of
the alternative hypothesis, then the null hypothesis is
rejected. This is the same as saying if the persecutor has
enough evidence of guilt, the “innocence is rejected.
Of course, erroneous conclusions are possible, type I and
type II errors.
Step 1: Formulate the Hypothesis
The test of the null hypothesis is a one-tailed test, when
the alternative hypothesis is expressed directionally. Null
Hypothesis: not more than 40% if internet users shop via
the Internet. p
H0: 0.40
H1: p > 0.40

If that is not the case, then a two-tailed test would be


required, and the hypotheses would be expressed as:
Null Hypothesis: 40% if internet users shop via the
Internet.
H0: p = 0.40
H1:p  0.40
What Are the Hypotheses?

Is the population average amount of TV viewing different


from 12 hours?

State the question statistically:   12


State the opposite statistically:  = 12
Select the alternative hypothesis: Ha:   12
State the null hypothesis: H0:  = 12
What Are the Hypotheses?

Is the average amount spent in the bookstore greater than


$25?

State the question statistically:   25


State the opposite statistically:   25
Select the alternative hypothesis: Ha:   25
State the null hypothesis: H0:   25
OUR PROBLEM

An insurance company is reviewing its current policy rates.


When originally setting the rates they believed that the
average claim amount was $1,800. They are concerned
that the true mean is actually higher than this, because
they could potentially lose a lot of money. They randomly
select 40 claims, and calculate a sample mean of $1,950.
Assuming that the standard deviation of all claims is $500,
and test to see if the insurance company should be
concerned.
OUR PROBLEM

Claim: µ > $1800, so


H0: µ = 1800
&
H1: µ > 1800
Reason for Rejecting H0

Illustration: Let say, we assume that average age in the


US is 50 years (H0=50). If in fact this is the true
(unknown) population mean, it is unlikely that we get a
sample mean of 20. So, if we have a sample that
produces an average of 20, them we reject that the null
hypothesis that average age is 50. (note that we are
rejecting our assumption or claim). (would we get 20 if
the true population mean was 50? Probably NO. That is
why we reject 50)
How Is the Test done?
We use the distribution of a Test Statistic, such as Z or t
as the criteria.
Basic Idea

Sampling Distribution
It is unlikely
that we would ... therefore, we
get a sample reject the
mean of this hypothesis that
value ...  = 50.
... if in fact this were
the population mean

20  = 50 Sample Means
H0

So, how much unlikely?


Step 2: State a Level of Significance

The significance level of a test:


Defined as the probability of rejecting the null hypothesis when
it is actually true.
This is denoted by the Greek letter “α”.
Also known as Type I Error.
We select this probability prior to collecting data and
testing the hypothesis.
A typical value of “α” is 0.05.
-> Significance level—the upper-bound probability of a Type I
error
1 -  ->confidence level—the complement of significance level
Step 2: State a Level of Significance

Type II Error
• Type II error occurs when, based on the sample
results, the null hypothesis is not rejected when it is
in fact false.
• The probability of type II error is denoted by β.
Type I vs Type II error

• Unlike α, which is specified by the researcher, the


magnitude of β depends on the actual value of the
population parameter (proportion).
Type I and II Errors:

The size of  , the rejection region, affects the risk of making


different types of incorrect decisions.
Type I Error
Rejecting a true null hypothesis when it should NOT be
rejected
Considered a serious type of error
The probability of Type I Error is 
It is also called level of significance of the test
Type II Error
Fail to reject a false null hypothesis that should have been
rejected
The probability of Type II Error is β
 Type I and Type II errors cannot happen at the same time
1. Type I error can only occur if H0 is true
2. Type II error can only occur if H0 is false
3. There is a tradeoff between type I and II errors. If the
probability of type I error (  ) increased, then the
probability of type II error ( β ) declines.
4. When the difference between the hypothesized
parameter and the actual true value is small, the
probability of type two error (the non-rejection region)
is larger.
5. Increasing the sample size, n, for a given level of ,
reduces β
Summary of Errors Involved in Hypothesis Testing

Inference Real State of Affairs


Based on
Sample Data H0 is True H0 is False
Correct decision Type II error
H0 is True Confidence level
= 1-  P (Type II error) = 
Correct decision
Type I error
H0 is False Significance level Power = 1-
= *

*Term  represents the maximum probability of


committing a Type I error
Step 3: Formulate a Decision Rule for the Test

A. Rejection Region Method:


Divide the distribution into rejection and non-rejection
regions
Defines the unlikely values of the sample statistic if the
null hypothesis is true, the critical value(s)
Defines rejection region of the sampling distribution
Rejection region(s) is designated by  , (level of
significance)
Typical values are .01, .05, or .10
 is selected by the researcher at the beginning
 provides the critical value(s) of the test
Rejection Region or Critical Value Approach:
Level of significance = 

Non-rejection region
Represents
H0: μ = 12 a /2 a /2 critical value

H1: μ ≠ 12
Two-tail test 0

H0: μ ≤ 12 a Rejection
H1: μ > 12 region is
Upper-tail test 0 shaded

H0: μ ≥ 12
a
H1: μ < 12
Lower-tail test 0
Test statistics
TEST STATISTIC A value, determined from sample
information, used to determine whether to fail to reject or
reject the null hypothesis.
To test hypotheses about population means we use the z or
t-statistic.
x  µ0 x  µ0 x
z  t
x s n s n
Based on the selected level of significance, the critical value
is the dividing point between the region where the null
hypothesis is rejected and the region where it is not rejected.
If the test statistic (t or z) is greater than or less than the
critical value (in the region of rejection), then reject the null
hypothesis.
Step 3: Formulate a Decision Rule for the Test

B. P-Value approach to Hypothesis


Testing:
1. The rejection region approach allows you to examine
evidence but restrict you to not more than a certain
probability (say  = 5%) of rejecting a true H0 by
mistake.
2. The P-value approach allows you to use the information
from the sample and then calculate the maximum
probability of rejecting a true H0 by mistake.
3. Another way of looking at P-value is the probability of
observing a sample information of “A=11.5” when the
true population parameter is “12=B”. The P-value is the
maximum probability of such mistake taking place.
P-Value Approach –
P-value=Max. Probability of (Type I Error), calculated from the
sample.
Given the sample information what is the size of blue are?

H0: μ = 12
H1: μ ≠ 12
Two-tail test 0

H0: μ ≤ 12
H1: μ > 12
Upper-tail test 0

H0: μ ≥ 12
H1: μ < 12
B. P-Value approach to Hypothesis Testing, Cont.

4. That is to say that P-value is the smallest value


of  for which H0 can be rejected based on the
sample information
5. Convert Sample Statistic (e.g., sample mean) to
Test Statistic (e.g., Z statistic )
6. Obtain the p-value from a table or computer
7. Compare the p-value with 
If p-value <  , reject H0
If p-value   , do not reject H0
Test of Hypothesis for the Mean

σ known σ Unknown

The test statistic is: The test statistic is:

X μ X μ
Z  t n-1 
σ S
n n
Steps to Hypothesis Testing

1. State the H0 and H1 clearly


2. Identify the test statistic (two-tail, one-tail, and Z
or t distribution
3. Depending on the type of risk you are willing to
take, specify the level of significance,
4. Find the decision rule, critical values, and
rejection regions. If –CV<actual value (sample
statistic) <+CV, then do not reject the H0
5. Collect the data and do the calculation for the
actual values of the test statistic from the sample
Steps to Hypothesis testing, continued

Make statistical decision

Do not Reject H0 Reject H0

Conclude H0 may be true Conclude H1 is “true”


(There is sufficient evidence of
H1)

Make
management/business/admi
nistrative decision
Review of Hypo. Testing

What is HT?
Probability of making erroneous conclusions
Type I – only when Null Hypo is true
Type II – only when Null Hypo is false

Two Approaches
The Rejection or Critical Value Approach
The P-value Approach (we calculate the observed level of significance)

Test Statistics
Z- distribution if Population Std. Dev. is Know
t-distribution if the Population Std. Dev. is unknown
Tests About
a
Population Mean
Hypothesis Tests for the Mean

Hypothesis
Test for μ

Large Sample Small Sample


(n≥30)Populatio (n<30)Population
has normal dist.
n has any dist.

(z test) (t test)
 Known: use σ  Unknown: use s
 Unknown: use s
Large-Sample Test of Hypothesis about µ

H0: µ = µ0
x - µ0 x - µ0
Test Statistic: z= »
sx s n
Alternative
Hypothesis Rejection Region

H a :   0 z  z

H a :   0 z   z

H a :   0 z  z / 2 or z   z / 2

where z is chosen so that P(z > z) = 


Hypothesis Tests for the Mean

Hypothesis
Test for μ

Large Sample Small Sample


(n≥30)Populatio (n<30)Population
has normal dist.
n has any dist.

(z test) (t test)
 Known: use σ  Unknown: use s
 Unknown: use s
Small-Sample Test of Hypothesis about µ

H0: µ = µ0
x-m
Test Statistic: t =
s n
Alternative
Hypothesis Rejection Region

H a :   0 t  t ,n 1
H a :   0 t  t , n 1
H a :   0 t  t / 2, n 1 or t  t / 2,n 1
where t and t are based on (n – 1) degrees of freedom
OUR PROBLEM

An insurance company is reviewing its current policy rates.


When originally setting the rates they believed that the
average claim amount was $1,800. They are concerned
that the true mean is actually higher than this, because
they could potentially lose a lot of money. They randomly
select 40 claims, and calculate a sample mean of $1,950.
Assuming that the standard deviation of all claims is $500,
and test to see if the insurance company should be
concerned.

Set α = .05
OUR PROBLEM

Claim: µ > $1800, so


H0: µ = 1800
&
H1: µ > 1800
OUR PROBLEM

Test statistics is
OUR PROBLEM

For a significance level of α=0.05


Critical value is 1.645
OR
From the test statistics z = 1.897366596
p = 0.0288897188
OUR PROBLEM

Test statistics is z=1.9 > critical value=1.645


So reject Ho
Or p= 0.0288897188 < α=0.05
So reject Ho
OUR PROBLEM

Conclusion: The sample data support the claim that the


average claim is higher than $1800.
GetKahooh...
Connection to Confidence Intervals
While the confidence interval estimation and hypothesis
testing serve different purposes, they are based on same
concept and conclusions reached by two methods are
consistent for a two-tail test.

In CI method we estimate an interval for the population


mean with a degree of confidence. If the estimated interval
contains the hypothesized value under the hypothesis
testing, then this is equivalent of not rejecting the null
hypothesis. For example: let’s say that for a sample with
mean 5.20, the confidence interval is:
P(4.61 ≤ μ ≤ 5.78)=95%

Since this interval contains the Hypothesized mean ($4.90),


we do not (did not) reject the null hypothesis at  = .05

Did not reject and within the interval, thus consistent


results.
Width of CI
In general, with all other things being equal:
Smaller sample size  wider CIs
Higher confidence  wider CIs
Larger variability  wider CIs
Similarly,
Smaller sample size  smaller test statistics (z, or t)
(higher rejection chance)
Lower significance larger critical value (higher
rejection chance)
Larger variability  smaller test statistics (z, or t)
(higher rejection chance)
Hypothesis Test of a Population Mean, Known
Population Standard Deviation – Example

Jamestown Steel Company manufactures


and assembles desks and other office
equipment. The weekly production of the
Model A325 desk at the Fredonia Plant
follows the normal probability
distribution with a mean of 200 and
a standard deviation of 16. Recently,
new production methods have been
introduced and new employees hired. The
VP of manufacturing would like to
investigate whether there has been a
change in the weekly production of the
Model A325 desk. Use α=0.01 (1 %)
Example

Step 1: State the null and alternate hypotheses.


H0:  = 200
H1:  ≠ 200
(Note: The keyword in the problem “has changed.”)

Step 2: Select the level of significance.


α = 0.01 as stated in the problem.
Example

Select the test statistic.


Use z-distribution since σ is known.
Example
Formulate the decision rule.
Reject H0 if |z| >z/2
z > za /2
x-m
> za /2
s/ n
203.5 - 200
> z.01/2
16 / 50
1.55 is not > 2.58
Make a decision and interpret the result.
H0 is not rejected because 1.55 does not fall in the
rejection region.
Interpret the result.
We conclude that the population mean is not different
from 200. So we would report to the vice president of
manufacturing that the sample evidence does not show that the
production rate at the plant has changed from 200 per week.
10-52
Test of a Population Mean, Known Population
Standard Deviation – One-tail Example

Suppose in the previous problem the vice president wants to


know whether there has been an increase in the number of
units assembled. To put it another way, can we conclude,
because of the improved production methods, that the mean
number of desks assembled in the last 50 weeks was more
than 200?
Recall: σ=16, n=200, α=.01
One-Tailed Test versus Two-Tailed Test

10-54
One-tail Example
Step 1: State the null hypothesis and the
alternate hypothesis.
H0:  ≤ 200
H1:  > 200
(Note: The keyword in the problem “an increase.”)

Step 2: Select the level of significance.


α = 0.01 as stated in the problem.

Step 3: Select the test statistic.


Use z-distribution since σ is known.
One-tail Example
Step 4: Formulate the decision rule.
Reject H0 if z > z.
t > -ta ,n-1
x-m
za
s n
203.5 - 200
> z.01
16 50
1.55 is not > 2.326

Step 5: Make a decision. Because 1.55 does not fall in the


rejection region,
H0 is not rejected.
Step 6. Interpret the result. Based on the evidence, we
cannot conclude that the average number of desks assembled
increased in the last 50 weeks.
10-56
p-Value in Hypothesis Testing – Example

H0:  ≤ 200
H1:  > 200
Reject H0 if z >z,
where z = 1.55 and z = 2.33.

Reject H0 if p-value < :


0.0606 is not < 0.01.

Conclude: Fail to reject H0.


Testing for the Population Mean:
Population Standard Deviation Unknown

When the sample size is small (<30)


The population has approximately Normal distribution
The t-distribution is used as the test statistic, which is
computed using the formula:
Population Standard Deviation Unknown Example

The McFarland Insurance Company Claims Department


reports the mean cost to process a claim is $60. An
industry comparison showed this amount to be larger than
most other insurance companies, so the company instituted
cost-cutting measures. To evaluate the effect of the cost-
cutting measures, the Supervisor of the Claims Department
selected a random sample of 26 claims processed last
month. The sample information is reported below.
At the .01 significance level, is it reasonable to conclude that
a claim is now less than $60?
Example
Step 1: State the null hypothesis and the alternate
hypothesis.
H0:  ≥ $60
H1:  < $60
(Note: The keyword in the problem is “now less than.”)

Step 2: Select the level of significance.


α = 0.01 as stated in the problem.

Step 3: Select the test statistic.


Since σ is unknown, use a t-distribution with n-1 (26 – 1 =
25)
degrees of freedom.
t-Distribution Table (Portion)
Example
Step 4: Formulate the decision rule.
Reject H0 if t < -t,n-1.

Step 5: Make a decision. Because -1.818 does not fall in the


rejection region, H0 is not rejected at the .01 significance level. OR
p-value is around 0.04, which is >0.01.

Step 6: Interpret the result. We have not demonstrated that the


cost-cutting measures reduced the mean cost per claim to less than
$60. The difference of $3.58 ($56.42 - $60) between the sample
mean and the population mean could be due to sampling error.
10-62
One-Tailed t Test Example

Is the average capacity of batteries less than


140 ampere-hours? A random sample of 20
batteries had a mean of 138.47 and a
standard deviation of 2.66. Assume a normal
distribution. Test at the .05 level of
significance.
One-Tailed t Test Solution

H0: = 140 Test Statistic:


Ha: < 140 x   138.47  140
t   2.57
 =.05 s 2.66
df =20 – 1 = 19 n 20
Critical Value(s):
Decision:
Reject H0 Reject at  = .05
.05 Conclusion:
There is evidence population
-1.729 0 t average is less than 140
Large-Sample Test of Hypothesis
about a Population Proportion
Hypothesis Tests for the Proportion

Hypothesis Test
for p

Large Sample Small Sample


(np0 ≥ 15 and nq0 ≥ (np0 < 15 or nq0 <
15) 15)

(z test)
p̂ - p0
z=
p0 q0 / n
Conditions Required for a Valid Large-
Sample Hypothesis Test for p

1. A random sample is selected from a binomial


population.
2. The sample size n is large. (This condition will be
satisfied if both np0 ≥ 15 and nq0 ≥ 15.)
Large-Sample Test of Hypothesis about p

H0: p = p0
p̂ - p0 where s p̂ = p0 q0 n
Test Statistic: z =
s p̂
q0 = 1 - p0
Alternative
Hypothesis Rejection Region
z  z
Ha: p > p0
Ha : p < p 0 z   z
Ha: p ≠ p0 z  z / 2 or z   z / 2

where z is chosen so that P(z > z) = 


One-Proportion z Test Example

The present packaging


system produces 10%
defective cereal boxes.
Using a new system, a
random sample of 200
boxes had 11 defects.
Does the new system
produce fewer defects?
Test at the .05 level of
significance.
One-Proportion z Test Solution

H0: p = .10 Test Statistic:


11
Ha: p < .10 ˆp  p0 200  .10
z    2.12
 =.05 p0 q0 .10  .90 
n =200 n 200
Critical Value(s):
Decision:
Reject H0 Reject at  = .05
.05 Conclusion:
There is evidence new
-1.645 0 z system < 10% defective
One-Proportion z Test Example

You’re an accounting manager.


A year-end audit showed 4% of
transactions had errors. You
implement new procedures. A
random sample of 500
transactions had 25 errors. Has
the proportion of incorrect
transactions changed at the
.05 level of significance?
One-Proportion z Test Solution

H0: p = .04 Test Statistic:


25
Ha: p  .04 pˆ  p0
 .04
z  500  1.14
 =.05 p0 q0 .04  .96 
n =500 n 500
Critical Value(s):
Decision:
Reject H 0 Reject H 0
Do not reject at  = .05
.025 .025 Conclusion:
There is evidence
-1.96 0 1.96 z proportion is not 4%
Test of Hypothesis about a Population
Variance
Variance

Although many practical problems involve inferences


about a population mean (or proportion), it is sometimes
of interest to make an inference about a population
variance, 2.
Examples:
Investors use variance as a measure of risk.
Conditions Required for a Valid Hypothesis Test for 2

1. A random sample is selected from the target


population.
2. The population from which the sample is selected has a
distribution that is approximately normal.
Hypothesis Tests for the Variance

Hypothesis
Test for σ2

All samples &


population has normal
distribution

Test Statistic:

c 2 = (n -1)s 2 / (s 0 )2
Test of a Hypothesis about 2 (Variance)

H0:  = 0

Test Statistic: c2 =
( n - 1) s 2

s 02
Alternative
Hypothesis Rejection Region

Ha:  > 0   > 


Ha:  < 0  < 
Ha:  ≠ 0 c 2 < c(21-a 2) or c 2 > c(2a 2)

where 0 is the hypothesized variance and the distribution of


 is based on (n – 1) degrees of freedom.
Several 2 probability Distributions
Critical Values of Chi Square

It is not symmetrical like Normal or t-


distribution. So, be careful…
Finding Critical Value Example

What is the critical 2 value given:


Ha: 2 > 0.7
Reject
n=3
 =.05?  = .05
df = n - 1 = 2
0 5.991 2
2 Table Upper Tail Area
(Portion)
DF .995 … .95 … .05
1 ... … 0.004 … 3.841
2 0.010 … 0.103 … 5.991
Finding Critical Value Example

What is the critical 2 value given:


Ha: 2 < 0.7
n=3
What do you do
 =.05? if the rejection
region is on the
left?
Finding Critical Value Example

What is the critical 2 value given:


Ha: 2 < 0.7
n=3
 =.05?

df = n - 1 = 2
.103
Chi-Square (2) Test Example

Is the variation in boxes


of cereal, measured by
the variance, equal to
15 grams? A random
sample of 25 boxes had
a standard deviation of
17.7 grams. Test at the
.05 level of significance.
Chi-Square (2) Test Solution

H0:2 = 15
Test Statistic:
Ha:2  15
(25  1) 17.7 
2
(n  1) s 2
 =.05  
2

df =25 – 1 = 24
 2
0 152
= 33.42
Critical Value(s):
Decision:
/2 = .025 Do not reject at  = .05
Conclusion:
There is no evidence
0 12.401 39.364 2 2 is not 15
Calculating Type II Error Probabilities:
More about 
Type II Error

Recall that Type I Error, or the level of significance, is


defined as the probability of rejecting the null
hypothesis when it is actually true. It is denoted by
the Greek letter alpha, “”.

Type II Error is defined as the probability of


“accepting” the null hypothesis when it is actually
false. It is denoted by the Greek letter beta, “β”.
Type II Error

The Type II error probability  is calculated assuming


that the null hypothesis is false because it is defined as
the probability of accepting H0 when it is false.
The situation corresponding to accepting the null
hypothesis, and thereby risking a Type II error, is not
generally as controllable.
For that reason, we adopted a policy of nonrejection of
H0 when the test statistic does not fall in the rejection
region, rather than risking an error of unknown
magnitude.
Type II Error

EXAMPLE
A manufacturer purchases steel bars to make cotter pins.
Past experience indicates that the mean tensile
strength of all incoming shipments is 10,000 psi and
that the standard deviation, σ, is 400 psi. In order to
make a decision about incoming shipments of steel
bars, the manufacturer set up this rule for the quality-
control inspector to follow: “Take a sample of 100 steel
bars. At the .05 significance level if the sample mean
strength falls between the correct limits, accept the lot.
Otherwise the lot is to be rejected.”
Type II Error
Type II Error

Let’s say that the true mean is in fact 9000 psi


Then the prob of “not rejecting a sample” although the
mean is 9000 is
Type I and Type II Errors Illustrated
Type II Errors For Varying Mean Levels
Steps for Calculating  for a Large-Sample Test
about µ

1. Calculate the value(s) of x corresponding to the


border(s) of the rejection region. There will be one
border value for a one-tailed test and two for a two-
tailed test. The formula is one of the following,
corresponding to a test with level of significance :
Upper-tailed test:

 s 
x0  0  z  x  0  z 
 n 
Steps for Calculating  for a Large-Sample
Test about µ

 s 
Lower-tailed test: x0  0  z  x  0  z  
n

 s 
Two-tailed test: x0, L  0  z 2 x  0  z 2 
 n 

 s 
x0, U  0  z 2 x  0  z 2 
 n 
Steps for Calculating  for a Large-Sample
Test about µ

2. Specify the value of µa in the alternative hypothesis


for which the value of  is to be calculated. Then
convert the border value(s) of x0 to z-value(s) using
the alternative distribution with mean µa. The general
formula for the z-value is

x0   a
z
x
Steps for Calculating  for a Large-Sample
Test about µ

Sketch the alternative distribution (centered at µa)


and shade the area in the acceptance (nonrejection)
region. Use the z-statistic(s) and Table II in Appendix
D to find the shaded area, which is .
Power of Test

Probability of rejecting false H0


• Correct decision

Equal to 1 – 
Used in determining test adequacy
Affected by
• True value of population parameter
• Significance level 
• Standard deviation & sample size n
Two-Tailed z Test Example

Does an average box of


cereal contain 368 grams
of cereal? A random
sample of 25 boxes had x
= 372.5. The company
has specified  to be 15
grams. Test at the .05
level of significance. 368 gm.
Finding Power
Step 1

 
Hypothesis: n Reject H0
Do Not

H0: 0  368 15
25 Reject H0
Draw
Ha: 0 < 368  = .05

0 = 368 x
Finding Power
Steps 2 & 3

 
Hypothesis: n Reject H0
Do Not

H0: 0  368 15
25 Reject H0
Draw
Ha: 0 < 368  = .05

0 = 368 x
‘True’ Situation:
a = 360 (Ha)

Draw

 1–
Specify

a = 360 x
Finding Power
Step 4

 
Hypothesis: n Reject H0
Do Not

H0: 0  368 15
25 Reject H0
Draw
Ha: 0 < 368  = .05

0 = 368 x
 15
‘True’ Situation:
a = 360 (Ha)
 xL   0  z
n
 368  1.64
25
Draw
 363.065
 1– 
Specify
 = 360 363.065
a
x
Finding Power
Step 5

 
Hypothesis: n Reject H0
Do Not

H0: 0  368 15
25 Reject H0
Draw
Ha: 0 < 368  = .05

0 = 368 x
‘True’ Situation:
a = 360 (Ha)
 xL   0  z

 368  1.64
15
Draw n 25
 = .154
 
 363.065

Specify
z Table 1– =.846
 = 360
a
363.065
x
Properties of and Power

1. For fixed n and ,


the value of 
decreases, and the
power increases as
the distance
between the
specified null value
µ0 and the specified
alternative value µa
increases.
Properties of  and Power

2. For fixed n and


values of µ0
and µa, the
value of 
increases, and
the power
decreases as
the value of 
is decreased.
Properties of  and Power

3. For fixed n and values of µ0 and µa, the value


of  decreases, and the power increases as the
sample size n is increased.
Key Ideas

Key Words for Identifying the Target


Parameter

 – Mean, Average
p – Proportion, Fraction, Percentage, Rate,
Probability
2 – Variance, Variability, Spread
Key Ideas

Elements of a Hypothesis Test


1. Null hypothesis (H0)
2. Alternative hypothesis (Ha)
3. Test statistic (z, t, or 2)
4. Significance level ()
5. p-value
6. Conclusion
Key Ideas

Errors in Hypothesis Testing

Type I Error = Reject H0 when H0 is true


(occurs with probability )
Type II Error = Accept H0 when H0 is false
(occurs with probability )
Power of Test = P(Reject H0 when H0 is false)
=1–
Key Ideas

Forms of Alternative Hypothesis

Lower-tailed : Ha :  < 50

Upper-tailed : Ha :  > 50

Two-tailed : Ha :  ≠ 50
Key Ideas

Using p-values to Decide

1. Choose significance level ()


2. Obtain p-value of the test
3. If  > p-value, reject H0