Académique Documents
Professionnel Documents
Culture Documents
Pilani Campus
X p 1 p p p
p ~ N p, ~ N 0,1
n
n
p 1 p
n
Taking two points z 2 symmetrically about the origin, we get
p p
P z 2 z 2 1
p 1 p
n
Here 1 is known as confidence level.
3 BITS Pilani, Pilani Campus
Confidence Interval on p
p 1 p p 1 p
P p z 2 p p z 2 1
n n
As p is unknown, above confidence bounds are not statistics. So replace p by
unbiased estimator p, and then the CI on p having confidence level 1 is
p 1 p p 1 p
p z 2 , p z 2 .
n n
The endpoints of the confidence interval is called confidence limits.
Testing of Hypothesis
Chapter 9
BITS Pilani, Pilani Campus
Objectives
• Understanding hypothesis testing
• Power of a test
A criminal trial:
In a trial, jury must decide between two hypotheses. The null hypothesis
is
H0: The defendant is innocent
The alternative hypothesis or research hypothesis is
H1: The defendant is guilty
The jury do not know which hypothesis is true. They must make a
decision on the basis of evidence presented.
In the language of statistics convicting the defendant is called rejecting the null
hypothesis in favor of the alternative hypothesis. That is, the jury is saying
that there is enough evidence to conclude that the defendant is guilty (i.e.,
there is enough evidence to support the alternative hypothesis).
If the jury acquits it is stating that there is not enough evidence to support the
alternative hypothesis. Notice that the jury is not saying that the defendant is
innocent, only that there is not enough evidence to support the alternative
hypothesis. In the same logic, we do not say that we accept the null
hypothesis, rather we say that “we fail to reject the null hypothesis” from
available information from sample.
Critical
Value
Accept H0 Reject H0
H 0 : 0 H 0 : 0 H 0 : 0
H 1 : 0 H 1 : 0 H 1 : 0
One-tailed One-tailed Two-tailed
(lower-tail) (upper-tail)
Or Or
(Left-tailed) (Right-tailed)
• Probability of Type I error is = P(H0 is rejected|H0 is true).
This is also called the level of significance.
• Probability of Type II error is b =P(H0 is accepted|H0 is false)
Step 3. Collect the sample data and compute the test statistic.
/ n
(b) when population variance is unknown: Tn1 X 0
p0 1 p0
Z pˆ p0
n
H 0 : 0
H 1 : 0
Do Not
Reject H0
(Acceptance
Region)
H 0 : 0
H 1 : 0
29 BITS Pilani, Pilani Campus
Examples: Hypothesis Testing
Ex. A department store manager determines that a new billing system will be
cost effective only if the mean monthly account is more that $170. A random sample
of 400 monthly accounts is drawn, for which the sample mean is $178. It is known
that the accounts are approximately normally distributed with s.d. of $65.
At 5%, can we conclude that the new system will be cost-effective?
Sol.
Step1:Here H 0 : 170 one-tailed (right-tailed) test; test for and known
H1 : 170
x 0 178 170
Step 2: From sample data, we formulate zcalculated 2.46
65 400
n
Step 3: At 95% confidence level, z0.05 1.64 from single tailed test of Z-table
Step 4: As zcalculated z0.05 reject the null hypothesis (i.e., accept H1 )
33 BITS Pilani, Pilani Campus
Examples: Hypothesis Testing
Ex. A drug is given to 10 patients, and the increments in their blood pressure
were recorded as 3, 6, 2, 4, 4, 1, 6, 0, 0, 2. Is it reasonable to believe that the
drug has no effect on change of the mean blood pressure? Test at 95% confidence
level, assuming that the population is normal with variance 1.
Sol.
Step 1: Formulate the hypothesis: H 0 : 0, H1 : 0
Two-tailed test for and is known.
x 0 0.4 0
Step 2: From sample data, we formulate z calculated 1.265
n 1 10
Step 3: At 95% confidence level, z0.025 1.96, z0.025 1.96
from two tailed test of Z-table, we find z 2
Step 4: As zcalculated does not fall in the rejection region, we fail to reject H 0 .
We can believe that the drug has no effect on change of the mean blood pressure
34 BITS Pilani, Pilani Campus
Examples: Hypothesis Testing
Ex. The mean weakly sales of a magazine was 146 units. After an advertisement
campaign, mean of weakly sales in 22 stores for a typical week increased to 154 with
a standard deviation of 15 units. Was the advertisement successful at 5% significance
level? It is given that the weakly sales of magazine follows normal distribution.
Sol.
Step 1: Formulate the hypothesis: H 0 : 146
H1 : 146
One-tailed test; test for and unknown.
x 0 154 146
Step 2: From sample data, we formulate tcalculated 2.501
S n 15 22
Step 3: For 0.05 and 21 dof , t21,0.05 1.721 from one tailed test of T-table
Step 4: As tcalculated t21, 0.05 reject the null hypothesis (i.e., accept H1 )
We can conclude that the advertisement was successful.
35 BITS Pilani, Pilani Campus
Examples: Hypothesis Testing