Hypothesis Testing
Hypothesis Testing
A type II error occurs if the null hypothesis is not rejected when it is false.
In our justice system, Type I errors are
regarded as more serious.
As a consequence, the system is set up so that
the probability of a Type I error is small.
This is arranged by placing the burden of proof
on the prosecution (the prosecution must
prove)
Judges must find the defendant guilty only if
there is evidence beyond a reasonable doubt.
Of course, the judge does not know which
hypothesis is correct.
A decision must be made on the basis of the
evidence presented by both the prosecution
and the defence.
There are only two possible decisions Convict
or acquit the defendant.
In statistical parlance, convicting the
defendant is equivalent to rejecting the null
hypothesis in favour of the alternative (Enough
evidence)
Acquitting a defendant is phrased as not
rejecting the null hypothesis in favour of the
alternative (Not enough evidence to convict),
There are two possible errors. A Type I error
occurs when we reject a true null hypothesis.
A Type II error is defined as not rejecting a
false null hypothesis.
EXERCISE
You are contemplating doing Msc in Finance
and Investment after completing your undergrad
studies. If you succeed, a life of fame, fortune,
and happiness awaits you. If you fail, you’ve
wasted 2 years of your life.
Required
Identify the hypotheses, define Type I and Type II
errors, and discuss the consequences of each
error. In setting up the hypotheses, you will have
to consider where to place the “burden of proof.”
Statistical Hypothesis Testing
Example:
Statesville college claims that 94% of their graduates find employment within six months
of graduation. What will a type I or type II error be?
The statistic that is compared with the parameter in the null hypothesis is called
the test statistic.
Confidence Interval
Test of significance (P Value Approach)
a) Confidence Intervals
15
Confidence Interval for the Mean – Example using
the t-distribution
17
Example
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.
H0: μ k
H a: μ < k
P is the area to
the left of the test
statistic.
z
-3 -2 -1 0 1 2 3
Test
statistic
Right-tailed Test
2. If the alternative hypothesis contains the greater-than symbol (>), the hypothesis test
is a right-tailed test.
H0: μ k
H1: μ > k
P is the area to
the right of the
test statistic.
z
-3 -2 -1 0 1 2 3
Test
statistic
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.
1
2
H0: μ = k
H1: μ k
P is twice the area
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
Test Test
statistic statistic
Hypothesis Testing for the
Mean (Large Samples)
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 .
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 the null hypothesis.
b.) Because 0.0256 is > 0.01, Do not reject the null hypothesis.
Finding the P-value
After determining the hypothesis test’s standardized test statistic and the test statistic’s
corresponding area, do one of the following to find the P-value.
Example:
The test statistic for a right-tailed test is z = 1.56. Find the P-value.
The test statistic is the sample mean x and the standardized test statistic is z.
x μ σ
z standard error σx
σ n 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
Continued.
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?
x μ 1002 1000
z
σ 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?
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-Test for a Mean μ (n < 30, Unknown)
Using the t-Test for a Mean μ (Small Sample)
In Words In Symbols
The test statistic is the sample proportionp̂ and the standardized test statistic is z.
pˆ μ pˆ p p
z ˆ
σ 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
Continued.
Hypothesis Test for Proportions
Example continued:
Statesville college claims that more than 94% of their graduates find employment
within six months of graduation. In a sample of 500 randomly selected graduates,
475 of them were employed. Is there enough evidence to support the college’s claim
at a 1% level of significance?
Because the test is a two-tailed test and = 0.05, the critical values are ± 1.96.
Continued.
Hypothesis Test for Proportions
Example continued:
A cigarette manufacturer claims that one-eighth of the US adult population smokes
cigarettes. In a random sample of 100 adults, 5 are cigarettes smokers. Test the
manufacturer's claim at = 0.05.
Robust
ror Coef. Std. Err. z P>|z| [95% Conf. Interval]
sigma_u .08080804
sigma_e .17627914
rho .17364884 (fraction of variance due to u_i)
END