You are on page 1of 45

HYPOTHESIS TESTS INVOLVING A

SAMPLE MEAN OR PROPORTION


To measure is to know. If In data, we trust.
you’re not measuring it, Without data, you’re just
you can’t improve it. another guy with an
- Lord Kelvin opinion.
- W. Deming
Is there a difference?
 Between Group A and Group B?
 Two Independent Samples
 Between before and after?
 Two Dependent Samples
NULL AND ALTERNATIVE HYPOTHESIS

 Null hypothesis (H0)


 “Business as usual, nothing out of the ordinary is
happening” statement
 Either rejected or “fails to be rejected”

 Assumed to be true unless proven otherwise through an


overwhelming statistical evidence
 Alternative hypothesis (H1)
A statement that holds if H0 is false.
NULL AND ALTERNATIVE HYPOTHESIS

Null Hypothesis Alternative Hypothesis


Nondirectional
H0: µ = $10 H1: µ ≠ $10 ( µ is $10, or it isn’t)

Directional
H0: µ ≥ $10 H1: µ < $10 ( µ is at least $10, or it is
less)

( µ is at no more than
H0: µ ≤ $10 H1: µ > $10
$10, or it is more)
Directional and Non-directional Testing
Directional and Non-directional Testing
Errors in Hypothesis Testing

Statistics - Hypothesis Test


Null Hypothesis True Null Hypothesis False

Correct, (1 – β)
Reject Null Hypothesis Type I Error, α
Power of the test

Fail to Reject Null


Correct Type II Error, β
Hypothesis
Errors in Hypothesis Testing
Errors in Hypothesis Testing

Power of
β α the test
BASIC PROCEDURES IN HYPOTHESIS TESTING

1. Formulate the null and alternative hypotheses.


 Directional
 nondirectional
2. Select the significance level
 10%, 5%, or 1%
 Maximum chance of being wrong
3. Select the test statistic and calculate its value
 Population mean
 Large sample (n ≥ 30)? Use z-test
 Small sample (n < 30)? Use t- test
 Population proportion
 nπ ≥ 5 and n(1 – π) ≥ 5? Use z-test for population proportion
BASIC PROCEDURES IN HYPOTHESIS TESTING

4. Identify critical value(s) for the test statistic and


state the decision rule.
5. Compare calculated and critical values and reach
a conclusion about the null hypothesis.
6. Make the related business decision.
The test statistic
𝑥ഥ − 𝜇0 𝜎
 𝑧= where 𝜎𝑥ҧ = and 𝜇0 is from H0. (σ known)
𝜎𝑥ഥ 𝑛

𝑥ഥ − 𝜇0 𝑠
 𝑡= ; df = n – 1 and 𝑠𝑥ҧ = and 𝜇0 is from H0
𝑠𝑥ഥ 𝑛
(σ unknown).

𝑝 − 𝜋0 𝜋0 (1 − 𝜋0 )
 𝑧= where 𝜎𝑝 = and 𝜋0 is from H0.
𝜎𝑝 𝑛
 A researcher wants to carry out a hypothesis test
involving the mean for a sample of size n = 18. She
does not know the true value of the population
standard deviation, but is reasonably sure that the
underlying population is approximately normally
distributed. Should she use a z-test or a t-test in
carrying out the analysis? Why?
 A research firm claims that 62% of women in the
40-49 age group save in a 401(k) or individual
retirement account. If we wished to test whether this
percentage could be the same for women in this
age group living in New York City and selected a
random sample of 300 such individuals from New
York, what would be the null and alternative
hypothesis? Would the test be a z-test or a t-test?
Why?
TESTING A MEAN, σ KNOWN
 Two-tail testing
 One-tail testing
Two-tailed test, σ Known
 A quality-assurance inspector periodically examines
the output of a machine to determine whether it is
properly adjusted. When set properly, the machine
produces nails having a mean length of 2.000
inches, with a standard deviation of 0.070 inches.
For a sample of 35 nails, the mean length is 2.025
inches. Using the 0.01 level of significance, examine
the null hypothesis that the machine is adjusted
properly. Determine and interpret the p-value for
the test.
Two-tailed test, σ Known
 Formulate the null and alternative hypothesis
 H0: µ = 2.000 inches
 H1: µ ≠ 2.000 inches
 Select the significance level
α = 0.01
 Select the test statistic and calculate its value.
𝑥ഥ − 𝜇0 𝑥ഥ − 𝜇0 2.025 −2.000
𝑧 = = 𝜎 = .070
𝜎𝑥ഥ
𝑛 35

 z = 2.11
Two-tailed test, σ Known
 Identify Critical values for the test statistic and state
the decision rule
Confidence Level z α α/2
90% 1.645 0.10 0.05
95% 1.96 0.05 0.025
98% 2.33 0.02 0.01
99% 2.58 0.01 0.005

a two-tail test at α = 0.01, zcrit = ±2.58


 For
 Decision Rule
 Reject H0 if calculated z < -2.58 or > +2.58, otherwise
do not reject.
Two-tailed test, σ Known
 Compare calculated and critical values and reach a
conclusion about the null hypothesis.
 Calculated z = 2.11 is within the nonrejection region.
 Thus, we fail to reject H0 at the 0.01 level of
significance.
 Make the related business decision.
 The machine is adjusted properly.
Two-tailed test, σ Known
 To determine the p-value;
 Look up the calculated test statistic on the appropriate
distribution — in this case, the standard normal curve.
 At z = 2.11, corresponding area is .9826
 Thus, the area in the rejection region is 1-.9826 = .0174
 The p-value is 2*.0174 = .035
 To interpret the p-value, compare it to α. If the p-value
is less than (or equal to) α, reject the null hypothesis in
favor of the alternative hypothesis. If the p-value is
greater than α, do not reject the null hypothesis.
 The p-value is greater than α, still, we fail to reject the
null hypothesis.
One-Tail Testing of a Mean, σ Known

 For a sample of 12 items from a normally


distributed population for which the standard
deviation is σ = 17.0, the sample mean is 230.8. At
the 0.05 level of significance, test H0: µ ≤ 220
versus H1: µ > 220. Determine and interpret the p-
value for the test.
One-Tail Testing of a Mean, σ Known

 Formulate the null and alternative hypothesis


 H0: µ ≤ 220
 H1: µ > 220
 Select the significance level
α = 0.05
 Select the test statistic and calculate its value.
𝑥ഥ − 𝜇0 𝑥ഥ − 𝜇0 230.8 −220
𝑡 = = 𝑠 = 17
𝑠𝑥ഥ
𝑛 12

 t = 2.20
One-Tail Testing of a Mean, σ Known

 Identify critical values for the test statistic and state


the decision rule
 Atdf = 12 – 1 = 11and α = 0.05; t-crit = 1.796
 Decision Rule
 Reject H0 if calculated t > tα, otherwise do not reject.
One-Tail Testing of a Mean, σ Known

 Compare calculated and critical values and reach a


conclusion about the null hypothesis.
 Calculated t = 2.20 falls under the rejection region.
 Thus, we reject H0 at the 0.05 level of significance.

 Make the related business decision.


Upper-tailed, Lower-tailed, Two-tailed Tests
The research or alternative hypothesis can take one of three forms. An investigator might
believe that the parameter has increased, decreased or changed. For example, an
investigator might hypothesize:
1.H1: μ > μ 0 , where μ0 is the comparator or null value (e.g., μ0 =191 in our example
about weight in men in 2006) and an increase is hypothesized - this type of test is
called an upper-tailed test;
2.H1: μ < μ0 , where a decrease is hypothesized and this is called a lower-tailed test;
or
3.H1: μ ≠ μ 0, where a difference is hypothesized and this is called a two-tailed test.
The exact form of the research hypothesis depends on the investigator's belief about the
parameter of interest and whether it has possibly increased, decreased or is different
from the null value. The research hypothesis is set up by the investigator before any
data are collected.
Two-Tail Testing, σ Unknown
 The average length of a flight by regional airlines
in the United States has been reported as 464
miles. If a simple random sample of 30 flights by
regional airlines were to have 𝑥ҧ = 479.6 miles and
s = 42.8 miles, would this tend to cast doubt on the
reported average of 464 miles? Use a two-tail test
and the 0.05 level of significance in arriving at your
answer.
Two-tailed test, σ Unknown
 Formulate the null and alternative hypothesis
 H0: µ = 464 miles
 H1: µ ≠ 464 miles
 Select the significance level
α = 0.05
 Select the test statistic and calculate its value.
𝑥ഥ − 𝜇0 𝑥ഥ − 𝜇0 479.6 −464
𝑡 = = 𝑠 = 42.8
𝑠𝑥ഥ
𝑛 30

 𝑡 = 2.00
Two-tailed test, σ Unknown
 Identify critical values for the test statistic and state
the decision rule
 Fora two-tailed test at df = 30-1, α/2 = 0.025, tcrit =
±2.045
 Decision Rule
 RejectH0 if calculated t < -2.045 or > +2.045,
otherwise do not reject.
Two-tailed test, σ Unknown
 Compare calculated and critical values and reach a
conclusion about the null hypothesis.
 Calculated t= 2.00 is within the nonrejection region.
 Thus, we fail to reject H0 at the 0.05 level of
significance.
 Make the related business decision.
 There is no reason to doubt the average of 464 miles.
One-Tail Testing of a Mean, σ Unknown

 A scrap metal dealer claims that the mean of his


cash sales is “no more than $80,” but an Internal
Revenue Service agent believes the dealer is
untruthful. Observing a sample of 20 cash
customers, the agent finds the mean purchase to be
$91, with a standard deviation of $21. Assuming
the population is approximately normally
distributed, and using the 0.05 level of significance,
is the agent’s suspicion confirmed?
One-tailed test, σ Unknown
 Formulate the null and alternative hypothesis
 H0: µ ≤ $80
 H1: µ > $80
 Select the significance level
α = 0.05
 Select the test statistic and calculate its value.
𝑥ഥ − 𝜇0 𝑥ഥ − 𝜇0 91 −80
𝑡 = = 𝑠 = 21
𝑠𝑥ഥ
𝑛 20

 𝑡 = 2.34
One-tailed test, σ Unknown
 Identify critical values for the test statistic and state
the decision rule
 Fora two-tailed test at df = 20-1, α = 0.05, tcrit =
1.729
 Decision Rule
 Reject H0 if calculated t > 1.729, otherwise do not
reject.
Two-tailed test, σ Unknown
 Compare calculated and critical values and reach a
conclusion about the null hypothesis.
 Calculated t= 2.34 is beyond the critical t and falls
within the rejection region.
 Thus, we reject H0 at the 0.05 level of significance.

 Make the related business decision.


 The agent’s suspicion is confirmed.
Testing a Proportion
 Two-tailed test
 One-tailed test
 In the past, 44% of those taking a public accounting
qualifying exam have passed the exam on their first
try. Lately, the availability of exam preparation
books and tutoring sessions may have improved the
likelihood of an individual’s passing on his or her
first try. In a sample of 250 recent applicants, 130
passed on their first attempt. At the 0.05 level of
significance, can we conclude that the proportion
passing on the first try has increased? Determine
and interpret the p-value for the test.
Two-tailed test for a Proportion
 Formulate the null and alternative hypothesis
 H0: π = .44
 H1: π ≠ .44
p =130/250 = .52
 Select the significance level
α = 0.05
 Select the test statistic and calculate its value.
𝑝 − π0 𝑝 − π0 .52 − .44
𝑧 = = =
σ𝑝 𝜋0 (1 − 𝜋0 ) .44(1−.44)
𝑛 250

 𝑧 = 2.55
Two-tailed test for a Proportion
 Identify critical values for the test statistic and state
the decision rule
 Fora two-tailed test at α/2 = 0.025, zcrit = ±1.96
 Decision Rule
 Reject H0 if calculated z > ±1.96, otherwise do not
reject.
Two-tailed test for a Proportion
 Compare calculated and critical values and reach a
conclusion about the null hypothesis.
 Calculated z= 2.55 is beyond the critical z and falls
within the rejection region.
 Thus, we reject H0 at the 0.05 level of significance.

 Make the related business decision.


 The new proportion of passers is not the same as the
old one.
 To determine the p-value
Z = 2.55; p =1 – 2(.4946) = .01
One-tailed test for a Proportion
 Formulate the null and alternative hypothesis
 H0: π ≤ .44
 H1: π > .44
p =130/250 = .52
 Select the significance level
α = 0.05
 Select the test statistic and calculate its value.
𝑝 − π0 𝑝 − π0 .52 − .44
𝑧 = = =
σ𝑝 𝜋0 (1 − 𝜋0 ) .44(1−.44)
𝑛 250

 𝑧 = 2.55
One-tailed test for a Proportion
 Identify critical values for the test statistic and state
the decision rule
 Fora two-tailed test at α = 0.05, zcrit = ±1.96
 Decision Rule
 Reject H0 if calculated z > ±1.96, otherwise do not
reject.
One-tailed test for a Proportion
 Compare calculated and critical values and reach a
conclusion about the null hypothesis.
 Calculated z= 2.55 is beyond the critical z and falls
within the rejection region.
 Thus, we reject H0 at the 0.05 level of significance.

 Make the related business decision.


 The new proportion of passers is now higher than .44.
One-tailed test for a Proportion
 To determine the p-value
Z = 2.55; p =1 – .9946 = .0054
 If p-value is less than (or equal to) α, reject the null
hypothesis in favor of the alternative hypothesis. If
the p-value is greater than α, do not reject the null
hypothesis.
 The p-value is less than α = 0.05, we reject the null
hypothesis.

You might also like