Hypothesis-Testing 3
Hypothesis-Testing 3
Hypothesis-Testing 3
• Research Hypothesis
▪ a statement of what the researcher believes will be
the outcome of an experiment or a study
• Statistical Hypothesis
▪ a formal structure used to statistically (based on a
sample) test the research hypothesis
• Examples of Research Hypotheses
H 0 : 0.18 or H 0 : = 0.18
H1 : 0.18
The Hypothesis Testing
• Claim: The population mean age is 50 years.
▪ H0: μ = 50, H1: μ ≠ 50
• Sample the population and find sample mean.
Population
Sample
• Suppose the sample mean age is 20 years.
• Acceptance Region
▪ When the statistical outcome falls into this region,
H0 is accepted.
▪ Size of this region is (1-α).
Critical Values
Acceptance Region
Distribution of the test statistic (1- a)
Region of Region of
Rejection Rejection
a/2 a/2
Critical Values
0
Upper-tail test or Right Tail Test
Example:
H0: μ ≤ 50 Vs H1: μ > 50
a 1- a
0
Lower-tail test or Left Tail Test
Example:
H0: μ ≥ 50 Vs H1: μ < 50
Example:
• A survey, done 10 years ago, of CPAs in the U.S.
found that their average salary was $74,914.
• A sample of 112 CPAs produced a mean salary of
$78,695.
• Assume that = $14,530.
• An accounting researcher would like to test
whether over the years
▪ this average has increased?
▪ this average has decreased?
▪ this average has changed?
Hypothesis Testing for μ
(σ known)
Example:
• A survey, done 10 years ago, of CPA’s (Certified Public Accountant)
in the U.S. found that their average salary was $74,914.
• An accounting researcher would like to test whether over the
years
▪ this average has increased?
• Right or Upper Tail Test (H0: μ ≤ 74914, H1: μ > 74914)
▪ this average has decreased?
• Left or Lower Tail Test (H0: μ ≥ 74914, H1: μ < 74914)
▪ this average has changed?
• Two Tail Test (H0: μ = 74914, H1: μ ≠ 74914)
• A sample of 112 CPAs produced a mean salary of $78,695.
• Assume that = $14,530.
• Has the average salary of CPAs in the U.S. increased?
• Right or Upper Tailed Test
• (H0: μ ≤ 74914, H1: μ > 74914)
• Test Statistic x - 78695 - 74914
Zc = = = 2.7539
n 14530 112
(0.025)
(0.025) (0.95)
-1.96 1.96
0
Do not reject H0 1.28 Reject H0
tα
• For left tail test (H0: μ ≥ μ0, H1: μ < μ0): -tα
• P( T > -tα) = 1- α Rejection T~t(n-1)
Region (α)
• P(T < -tα ) = α
Acceptance
Region (1- α)
-tα
• For two tail test (H0: μ = μ0, H1: μ ≠ μ0): tα/2
T~t(n-1)
Rejection Rejection
Region (α/2) Acceptance Region (α/2)
Region (1- α)
- tα/2 tα/2
• P(- tα/2 < T< tα/2 ) = 1- α
• P(T > tα/2 ) = α/2 P( T < -tα/2 ) = α/2
• We reject H0 in the favor of H1 at α x100% level
• If |Tc| > tα/2 (for two tailed test)
• If Tc > tα (for right tailed test)
• If Tc < -tα (for left tailed test)
• Example:
• A sample of 25 people is taken.
• The length of time to prepare dinner is recorded in
minutes, as given below:
• 44.0 51.9 49.7 40.0 55.5 33.0 43.4 41.3
45.2 40.7 41.1 49.1 30.9 45.2 55.3 52.1
55.1 38.8 43.1 39.2 58.6 49.8 43.2 47.9
46.6
• Is there any evidence that the population mean time
to prepare dinner is greater than 40 minutes?
• Use a level of significance of 0.05.
• The data is approximately normally distributed
• Computed value of Test Statistic = 4.04388267
• Example:
• An engineer has developed a new, energy-efficient lawn
mower engine.
• He claims that the engine will run continuously for an
average of 300 minutes on a single gallon of regular
gasoline.
• Suppose a simple random sample of 50 engines is tested.
• The engines run for an average of 295 minutes, with a
standard deviation of 20 minutes.
• Test the null hypothesis that the mean run time is 300
minutes against the alternative hypothesis that the mean
run time is not 300 minutes.
• Use a 0.05 level of significance.
• Computed Value of Test Statistic = -1.76777
• p – value Approach in t Distribution:
• Let tc be the computed value of test statistic
• Let T ~ t(n-1)
• Then p – value is given by the following probability
▪ For two tailed tests:
• 2P(T > |tc|)
▪ For right tailed tests:
• P(T > tc)
▪ For left tailed tests:
• P(T < tc)
• Decision: H0 is rejected in the favor of H1 at α x100% level of
significance, if
• p – value < α
• In case of t distribution, p – value may not always be
obtained from the table. (Use Excel)
Hypothesis Testing of
Population Proportion π
• Example:
• A manufacturer believes that exactly 8% of its products
contain at least one minor flaw.
• The company wants to test this belief.
• A sample of 200 products resulted in 33 items have at
least one minor flaw.
• Population is divided into 2 mutually exclusive and
exhaustive classes “A” and “Ac”
• π = Actual proportion of individuals in class “A”
• A sample is selected from this population
• p= sample proportion of individuals in class “A”
• We want to test:
▪ H0: P ≤ P0, H1: P > P0 (Right or Upper Tail Test)
▪ H0: P ≥ P0, H1: P < P0 (Left or Lower Tail Test)
▪ H0: P = P0, H1: P ≠ P0 (Two Upper Tail Test)
• Test Statistic p-P
Zc =
PQ n
• Assumption: Sample is large.
• n ≥ 30 or nP ≥ 5 as well as nPQ ≥ 5
• Zc ~ N(0,1)
• So, N(0,1) distribution is used to obtain critical value.
• Decision rules are the same as discussed earlier.
• p – value approach can also be used.
• Example:
• A marketing company claims that it receives 8%
responses from its mailing.
• To test this claim, a random sample of 500 were
surveyed with 30 responses.
• Test at the a = 0.05 significance level.
• H0: π = 0.08 H1: π ≠ 0.08 Reject H0 Reject H0
• π = 0.08, 1- π = 0.92
• n = 500, p = 0.06 0.025 Accept H0 0.025
• α = 0.05, z
0
• Critical Value = ± 1.96 -1.96 1.96