Slides On Hypotheses Testing
Slides On Hypotheses Testing
!
! ± !!/! !" !"#$$%& !" ! ± !!/! !. ! (!)
!
100(1-α) % confidence interval estimator of population mean µ
!
! ± !!/!
!
!
The Length of this interval ! !!/!
!
Will be less than or equal to b when the sample size n is such that
! !
! ≥ ! !!/!
!
Review
A 100(1-α) upper confidence bound for μ is
!
! + !!
!
!
! − !!
!
!
! − !!!!,!
!
Review
Confidence interval estimate of p
!(! − !)
! ± !!/!
!
Ideally we should use t-distribution as we are using sample for
Estimation of error, but z-distribution is also fine as sample size is
generally large for estimation of p
Chi-Squared Distribution:
!
(! − 1)!
!! =
!!
Testing Statistical Hypotheses
Ø First, it may result from past experience or knowledge of the process or even from
previous tests or experiments. The objective of hypothesis testing, then, is usually to
determine whether the parameter value has changed.
Ø Second, this value may be determined from some theory or model regarding the process
under study. Here the objective of hypothesis testing is to verify the theory or model
Ø Third, the value of the population parameter results from external considerations, such
as design or engineering specifications, or from contractual obligations. In this situation,
the usual objective of hypothesis testing is conformance testing.
Testing Statistical Hypotheses
Suppose that a tobacco firm claims that it has discovered a new way of
curing tobacco leaves that will result in a mean nicotine content of a
cigarette of 1.5 milligrams or less.
Now a researcher is skeptical of this claim and indeed believes that the
mean will exceed 1.5 milligrams.
To disprove the claim of the tobacco firm, the researcher has decided to
test its hypothesis that the mean is less than or equal to 1.5 milligrams.
Testing Statistical Hypotheses
H0: μ ≤ 1.5
The alternative to the null hypothesis, which the tester is actually trying to
establish, is called the alternative hypothesis and is designated by H1. For
our example, H1 is the hypothesis that the mean nicotine content exceeds
1.5 milligrams, which can be written symbolically as
Depending on the value of this test statistic (TS), the null hypothesis will be
rejected or not.
The critical region, also called the rejection region (C), is that set of values of
the test statistic for which the null hypothesis is rejected.
Reject H0 if TS is in C
Do not reject H0 if TS is not in C
Testing Statistical Hypotheses
Reject H0 if TS is in C
Do not reject H0 if TS is not in C
Testing Statistical Hypotheses
H0: μ = 50 and H1: μ ≠ 50
Now take a sample, measure the sample average and decide:
Accept Reject
Reject
48 50 52
Ø The size of the critical region, and consequently the probability of a type I error α, can
always be reduced by appropriate selection of the critical values.
Ø Type I and type II errors are related. A decrease in the probability of one type of error
always results in an increase in the probability of the other provided that the sample size
n does not change.
Ø When the null hypothesis is false, β increases as the true value of the parameter
approaches the value hypothesized in the null hypothesis. The value of β decreases as the
difference between the true mean and the hypothesized value increases.
Power of a Statistical Test
as
H0: μ = μ0
against the alternative hypothesis
H1: μ ≠ μ0
for a specified value μ0.
Testing Statistical Hypotheses
Suppose we want the test to have significance level α.
Sample mean is the natural point estimator of the population mean μ, and
for population with known standard deviation,
!
! − !!
!
−!!/!
reject H0 reject H0
Do rot reject H0
Testing Statistical Hypotheses
Suppose that if a signal of intensity μ is emitted from a particular star, then the value received
at an observatory on earth is a normal random variable with mean μ and standard deviation 4.
In other words, the value of the signal emitted is altered by random noise, which is normally
distributed with mean 0 and standard deviation 4. It is suspected that the intensity of the signal
is equal to 10. Test whether this hypothesis is plausible if the same signal is independently
received 20 times and the average of the 20 values received is 11.6. Use the 5 percent level of
significance.
If μ represents the actual intensity of the signal emitted, then the null hypothesis we want
to test is
H0: μ = 10 against the alternative H1: μ ≠ 10
! !"
! − !! = !!. ! − !" = !. !"
! !
Now we are interested in testing this at significance level 0.05 it means our mean should be
within z0.025 range on either side of mean and we know that
z0.025 = 1.96 which indicate our value of 1.79 is within this range and hence the hypotheses
is not rejected
Testing Statistical Hypotheses
Since this value is less than z0.025 = 1.96, the null hypothesis is not rejected.
In other words, we conclude that the data are consistent with the null
hypothesis that the value of the signal is equal to 10.
The reason for this is that a sample mean as far from the value 10 as the
one observed would occur, when H0 is true, over 5 percent of the time.
!
! − !!
!
−!!/!
reject H0 reject H0
Do rot reject H0
Remember each value of zα has a corresponding value on x-axis which is the probability.
So instead of calculating if the hypotheses is valid for a given α level, we can calculate the
probability of this interval, call it v, of the test statistic √n (X − μ0)/σ .
This will give us now a significance level up to which the hypotheses is valid. This is called
p value.
P-Value
! !"
! − !! = !!. ! − !" = !. !"
! !
The p value is the smallest significance level at which the data lead to
rejection of the null hypothesis.
A small p value (say, 0.05 or less) is a strong indicator that the null
hypothesis is not true.
The smaller the p value, the greater the evidence for the falsity of H0.
It is standard practice to report the observed P-value along with the decision that is
made regarding the null hypothesis.
Clearly, the P-value provides a measure of the credibility of the null hypothesis.
Specifically, it is the risk that we have made an incorrect decision if we reject the null
hypothesis H0.
The “P-value” is not the probability that the null hypothesis is false, nor is “1 − P”
the probability that the null hypothesis is true.
The null hypothesis is either true or false (there is no probability associated with
this), so the proper interpretation of the P-value is in terms of the risk of wrongly
rejecting the null hypothesis H0.
Testing Statistical Hypotheses
Suppose that if a signal of intensity μ is emitted from a particular star, then the
value received at an observatory on earth is a normal random variable with mean
μ and standard deviation 4. In other words, the value of the signal emitted is
altered by random noise, which is normally distributed with mean 0 and standard
deviation 4. It is suspected that the intensity of the signal is equal to 10. Test
whether this hypothesis is plausible if the same signal is independently received 20
times and the average of the 20 values received is 11.6. Use the 5 percent level of
significance.
Suppose that the average of the 20 values in previous example is equal to 10.8.
In this case the absolute value of the test statistic is
! !"
! − !! = !". ! − !" = !. !"#
! !
P {|Z| ≥ 0.894} = 2P{Z ≥ 0.894} = 0.374
Testing Statistical Hypotheses
On the other hand, if the value of the sample mean were 7.8,
H0 will be rejected
Now if the original (population) mean is 9.2, we have to calculate the probability
that the sample mean will exceed 11.753 or lower than 8.247 with error in
Prediction of 4/(20)0.5 =0.894
! !"#"$%&'( !" !! =
! ! ≥ !!. !"# + ! ! ≤ !. !"# = !. !"#$
That is, when the true signal value is 9.2, there is an 85.5% chance that the 0.05
significance level test will not reject the null hypothesis that the signal value is equal to
10
Testing Statistical Hypotheses
Approach to Hypothesis Testing with Fixed Probability
1. State the null and alternative hypotheses.
2. Choose a fixed significance level α.
3. Choose an appropriate test statistic and establish the critical region based
on α.
4. Reject H0 if the computed test statistic is in the critical region. Otherwise, do
not reject.
5. Draw scientific or engineering conclusions.
However, in many situations, the hypothesis we are interested in testing is that the mean
is less than or equal to some specified value μ0 versus the alternative that it is greater
than that value. That is, we are often interested in testing
Since we would want to reject H0 only when the sample mean is much
larger than μ0 (and no longer when it is much smaller), it can be shown,
in exactly same fashion as was done in the two-sided case, that the
Significant-level-α test is to
!
Reject H0 if ! − !! ≥ !!
!
!
! − !!
!
!!
Do rot reject H0 reject H0
This test can be carried out alternatively by first computing the value of the test
statistic
The p value is then equal to the probability that a standard normal random variable is
at least as large as this value. That is, if the value of the test statistic is v, then
p value = P{Z ≥ v}
The null hypothesis is then rejected at any significant level greater that or equal to the
p value.
Testing Statistical Hypotheses
The p value then equals the probability that a standard normal is less
than of equal to this value, and the null hypothesis is rejected if the
significant level is at least as large as the p value.
All cigarettes presently being sold have an average nicotine content of at least 1.5 mg per
cigarette. A firm that produces cigarettes claims that it has discovered a new technique for
curing tobacco leaves that results in an average nicotine content of a cigarette of less than 1.5
mg. To test this claim, a sample of 20 of the firm’s cigarettes was analyzed. If it were known
that the standard deviation of a cigarette’s nicotine content was 0.7 mg, what
conclusions could be drawn, at the 5 percent level of significance, if the average nicotine
content of these 20 cigarettes were 1.42 mg?
To see if the results establish the firm’s claim, let us see if they would lead to rejection of the
hypothesis that the firm’s cigarettes do not have an average nicotine content lower than 1.5
milligrams. That is, we should test
! !"
!
! − !! = !.!
!. !" − !. ! = −!. !""
We suppose that the population is very large (in theory, of infinite size),
and we let p denote the unknown proportion of the population with the
characteristic. We will be interested in testing the null hypothesis
p value = P{X ≥ x}