Virtual University of Pakistan Lecture No. 37 of the course on Statistics and Probability by Miss Saleha Naghmi Habibullah
IN THE LAST LECTURE, YOU LEARNT
•Large Sample Confidence Intervals for p and p1-p2 •Determination of Sample Size (with reference to Interval Estimation) •Hypothesis-Testing (An Introduction)
TOPICS FOR TODAY
•Hypothesis-Testing (continuation of basic concepts) •Hypothesis-Testing regarding µ (based on Z-statistic)
In the last lecture, we commenced the discussion of the concept of Hypothesis-Testing. We introduced the concepts of the Null and Alternative hypotheses as well as the concepts of Type-I and Type-II error. We now continue the discussion of the basic concepts of hypothesistesting:
TEST-STATISTIC A statistic (i.e. a function of the sample data not containing any parameters), which provides a basis for testing a null hypothesis, is called a teststatistic.
Every test-statistic has a probability distribution (i.e. sampling distribution) which gives the probability that our test-statistic will assume a value greater than or equal to a specified value OR a value less than or equal to a specified value when the null hypothesis is true.
ACCEPTANCE AND REJECTION REGIONS
All possible values which a teststatistic may assume can be divided into two mutually exclusive groups: one group consisting of values which appear to be consistent with the null hypothesis (i.e. values which appear to support the null hypothesis), and the other having values which lead to the rejection of the null hypothesis.
The first group is called the acceptance region and the second set of values is known as the rejection region for a test. The rejection region is also called the critical region. The value(s) that separates the critical region from the acceptance region, is called the critical value(s):
Critical Value
Critical Region
0 Acceptance Region
Critical Value
Critical Region
Z
The critical value which can be in the same units as the parameter or in the standardized units, is to be decided by the experimenter.
The most frequently used values of Îą, the significance level, are 0.05 and 0.01, i.e. 5 percent and 1 percent. By Îą = 5%, we mean that there are about 5 chances in 100 of incorrectly rejecting a true null hypothesis.
RELATIONSHIP BETWEEN THE LEVEL OF SIGNIFICANCE AND THE CRITICAL REGION:
The level of significance acts as a basis for determining the CRITICAL REGION of the test. For example, if we are testing H0: µ = 45 against H1: µ ≠ 45, our test statistic is the standard normal variable Z, and the level of significance is 5%, then the critical values are Z = +1.96
Corresponding to a level of significance of 5%, we have:
2.5%
-1.96 Critical Region
2.5%
0 Acceptance Region
1.96
Z
Critical Region
ONE-TAILED AND TWO-TAILED TESTS:
A test for which the entire rejection region lies in only one of the two tails – either in the right tail or in the left tail – of the sampling distribution of the test-statistic, is called a onetailed test or one-sided test.
A one-tailed test is used when the alternative hypothesis H1 is formulated in the following form: H1 : θ > θ 0 or
H1 : θ < θ 0
For example, if we are interested in testing a hypothesis regarding the population mean, if n is large, and we are conducting a one-tailed test, then our alternative hypothesis will be stated as H1 : µ > µ 0 or H1 : µ < µ 0
In this case, the rejection region consists of either all z-values which are greater than + zα or less than – zα (where α is the level of significance):
H0 : µ > µ 0 H1 : µ < µ 0 Then (in case of large n): If
α REJECTION –zα
0
REGION
REJECT H0 if z < –zα
Z
If
H0 : µ < µ 0
H1 : µ > µ 0 Then (in case of large n):
0
α
zα REJECTION REGION
REJECT H0 if z > zα/2
Z
If, on the other hand, the rejection region is divided equally between the two tails of the sampling distribution of the teststatistic, the test is referred to as a two-tailed test or two-sided test.
In this case, the alternative hypothesis H1 is set up as: H1 : µ ≠ µ 0 meaning thereby H1 : µ < µ 0 or µ > µ 0
H0 : µ = µ 0 H1 : µ ≠ µ 0 Then (in case of large n): If
α/2 REJECTION REGION
α/2 –zα/2
0
zα/2 REJECTION REGION
REJECT H0 if z < –zα/2 or z > zα/2
The location of critical region can be determined only after the alternative hypothesis H1 has been stated. It is important to note that the one-tailed and the two-tailed tests differ only in location of the critical region, not in the size.
We illustrate the concept and methodology of hypothesis-testing with the help of an example :
EXAMPLE A steel company manufactures and assembles desks and other office equipment at several plants in a particular country. The weekly production of the desks of Model A at Plant-I has a mean of 200 and a standard deviation of 16.
Recently, due to market expansion, new production methods have been introduced and new employees hired.
The vice president of manufacturing would like to investigate whether there has been a change in the weekly production of the desks of Model A. To put it another way, is the mean number of desks produced at Plant-I different from 200 at the 0.05 significance level?
The mean number of desks produced last year (50 weeks, because the plant was shut down 2 weeks for vacation) is 203.5. On the basis of the above result, should the vice president conclude that the there been a change in the weekly production of the desks of Model A.
has
SOLUTION We use the statistical hypothesis-testing procedure to investigate whether the production rate has
changed month.
from
200
per
Step-1: Formulation of the Null and Alternative Hypotheses: The null hypothesis is “The population mean is 200.” The alternative hypothesis is ‘The mean is different from 200” or “The mean is not 200.”
These two hypotheses are written as follows: H0 : µ = 200 H1 : µ ≠ 200
Note: This is a two-tailed test because the alternative hypothesis does not state a direction. In other words, it does not state whether the mean production is greater than 200 or less than 200. The vice president only wants to find out whether the production rate is different from 200.
Step-2: Decision Regarding the Level of Significance (i.e. the Probability of Committing Type-I Error): Here, the level of significance is 0.05. This is Îą, the probability of committing a Type-I error (i.e. the
risk
of rejecting hypothesis).
a
true
null
Step-3: Test Statistic (that statistic that will enable us to test our hypothesis): The test statistic for a large X â&#x2C6;&#x2019;Âľ sample mean is z= Ď&#x192; n Transforming the production data to standard units (z values) permits the use of the area table of the standard normal distribution.
Step-4: Calculations: In this problem, we have n = 50, X = 203.5, and σ = 16. Hence, the computed value of z comes out to be: z=
X −µ σ
n
=
203.5 − 200 16
50
= 1.55
Step-5: Critical Region (that portion of the X-axis which compels us to reject the null hypothesis): Since this is a two-tailed test, half of 0.05, or 0.025, is in each tail. The area where H0 is not rejected, located between the two critical values, is therefore 0.95.
Applying the inverse use of the Area Table, we find that, corresponding to Îą = 0.05, the critical values are 1.96 and -1.96, as shown below:
0.5000
Îą 0.05 = = 0.025 2 2 -1.96 -1.96 Region of rejection Critical Value
0.5000
0.4750
0.4750
0 H0 is not rejected
Îą 0.05 = = 0.025 2 2 +1.96 Scale to z Region of rejection Critical Value
Decision Rule for the 0.05 Significance Level
The decision rule is, therefore: Reject the null hypothesis and accept the alternative hypothesis if the computed value of z is not between â&#x20AC;&#x201C;1.96 and +1.96. Do not reject the null hypothesis if z falls between â&#x20AC;&#x201C; 1.96 and + 1.96.
Step-6: Conclusion: The computed value of z i.e. 1.55 lies between -1.96 and + 1.96, as shown below:
Computed value of z
- 1.96 Reject H0
0 Do not reject H0
1.55
1.96
z scale
Reject H0
Because 1.55 lies between -1.96 and + 1.96, therefore, it does not fall in the rejection region, and hence H0 is rejected.
not
In other words, we conclude that the population mean is not different from 200.
So, we would report to the vice president of manufacturing that the
sample evidence does not show that the production rate at Plant-I has changed from 200 per week. The difference of 3.5 units between the historical weekly production rate and the production rate of last year can reasonably be attributed to chance.
The above example pertained to a two-tailed test. Let us now consider a few examples of one-tailed tests:
EXAMPLE A random sample of 100 workers with children in day care show a mean day-care cost of Rs.2650 and a standard deviation of Rs.500. Verify the departmentâ&#x20AC;&#x2122;s claim that the mean exceeds Rs.2500 at the 0.05 level with this information.
SOLUTION In this problem, we regard the departmentâ&#x20AC;&#x2122;s claim, that the mean exceeds Rs.2500, as H1, and regard the negation of this claim as H0. Thus, we have
i)
H0 : Âľ < 2500 H1 : Âľ > 2500 (exceeds 2500)
(Important Note: We should always regard that hypothesis as the null hypothesis which contains the equal sign.)
ii) We are given the significance level at Îą = 0.05. iii) The test-statistic, under H0 is
X â&#x2C6;&#x2019; Âľ0 Z= , S n
which is approximately normal as n = 100 is large enough to make use of the central limit theorem.
iv) The rejection region is Z > Z0.05 = 1.645
0.05
0
Z
Z0.05 REJECTION =1.645 REGION
v) Computing the value of Z from sample information, we find
2650 â&#x2C6;&#x2019; 2500 150 z= = =3 50 500 100
vi) Conclusion: Since the calculated value z = 3 is greater than 1.645, hence it falls in the rejection region, and, therefore, we reject H0, and may conclude that the departmentâ&#x20AC;&#x2122;s claim is supported by the sample evidence.
An Interesting and Important Point:
For α = 0.01, Zα = 2.33. As our computed value of Z i.e. 3 is even greater than 2.33, the computed value of X is highly significant. (With only 1% chance of being wrong, the department’s claim was correct).
IN TODAY’S LECTURE, YOU LEARNT
•Hypothesis-Testing (continuation of basic concepts) •Hypothesis-Testing regarding µ (based on Z-statistic)
IN THE NEXT LECTURE, YOU WILL LEARN • Hypothesis-Testing regarding µ 1 - µ 2 (based on Z-statistic) • Hypothesis Testing regarding p (based on Z-statistic) • Hypothesis Testing Regarding p1-p2 (based on Z-statistic) • p-value • Relationship Between Confidence