You are on page 1of 15

QMT220: Statistical Methods Hypothesis Testing: Parametric Methods

Chapter 3

Hypothesis Testing: Parametric Methods

3.0 Introduction

Often in scientific enquiry a statement concerning a population parameter is put


forward as a statistical hypothesis. Its validity is then tested, based on observations
made from random samples taken from the population.

DEFINITION: Hypothesis: A statistical hypothesis is a statement about the


parameters of one or more populations.

DEFINITION: Hypothesis Testing : A procedure based on sample evidence and


probability theory to determine whether the hypothesis is a reasonable
statement.

3.1 Steps involved In the testing of hypothesis

1. State the null hypothesis H o .

2. Choose an appropriate alternative hypothesis H o from one of the


alternatives.

3. Choose a significance level of size α .

4. Select the appropriate test statistic and establish the critical region.

5. Compute the value of the test statistic from the sample data.

6. Decision: Reject H o if the test statistic has a value in the critical region.
Otherwise do not reject H o .

7. Make conclusion.

@Copyright is Prohibited: 1
Prepared By:Norshahida Shaadan; Statistics Department , FSKM Shah Alam
QMT220: Statistical Methods Hypothesis Testing: Parametric Methods

DEFINITION: Null Hypothesis: A statement about the value of a population


parameter developed for the purpose of testing numerical evidence.

DEFINITION: Alternative Hypothesis: The alternative hypothesis H 1 is the


statement that the experimenter believes to be true.

Null and Alternative Hypothesis

Lets consider an example, suppose we wish to test whether a sample value X could
have been drawn from a normal population with mean μ and variance σ 2 .

We assume that the sample is drawn from N( μ , σ ). This hypothesis is called the null
2

hypothesis and is denoted by H o .

If statistical tests show that we should reject the null hypothesis, we do so in favor of
the alternative hypothesis, denoted by H 1 .

Definition:

For example :

If we wish to investigate whether the mean of the population from which the sample
value is taken is 25, then would be written:

H o : μ = 25 ( the population μ is 25 )
H 1 : μ ≠ 25 ( the population μ is not 25)

Case study 1:

A contractor wishes to lower heating bills by using a special type of insulation in


houses. The average of the monthly heating bills is RM75.

Null hypothesis: Alternative hypothesis:

Case study 2:

A chemist invents an additive to increase the life of an automobile battery. It is


known that the mean lifetime of the automobile battery is 36 months.

Null hypothesis: Alternative hypothesis:


@Copyright is Prohibited: 2
Prepared By:Norshahida Shaadan; Statistics Department , FSKM Shah Alam
QMT220: Statistical Methods Hypothesis Testing: Parametric Methods

Case study 3:

A medical researcher is interested in finding out whether a new medication will have
any undesirable side effects. He is particularly concerned with the pulse rate of the
patients who take the medication. He knows that the mean pulse rate for the
population under study is 82 beats per minute.

Null hypothesis: Alternative hypothesis:

One Tail and Two-tailed Test

DEFINITION: One Tailed Test: A test of any statistical hypothesis, where the
alternative is one sided.

Statement example:

H o : θ = θo or H o : θ = θo
H 1 : θ > θo H 1 : θ < θo

(The C.R lies in right tail) (The C.R lies in left tail)

DEFINITION: Two - tailed Test: A test of any statistical hypothesis where the
alternative is two-sided.

Statement example:

H o : θ = θo
H 1 : θ ≠ θo

- is called a two-tailed test.


- (the C.R is split into two parts)

@Copyright is Prohibited: 3
Prepared By:Norshahida Shaadan; Statistics Department , FSKM Shah Alam
QMT220: Statistical Methods Hypothesis Testing: Parametric Methods

DEFINITION: Level of significance: The probability of rejecting the null hypothesis


when it is true.

Note: The value is set up by the researcher. Ex: 1%, 5%, 10% etc. Symbol α .

DEFINITION: Test Statistic: A value determined from sample information used to


determine whether to reject the null hypothesis.

Example: Z-statistic, t-statistic, χ 2 -statistic and f-statistic.

DEFINITION: Critical Value: The dividing point between the region where the null
hypothesis is rejected and the region where it is not rejected.

In testing any statistical hypothesis, there are four possible situations that determine
whether our decision is correct or in error. These four situations are summarized
below.

Possible Situations For Testing A Statistical Hypothesis

H o is true H o is false

Accept H o Correct decision Type II error

Accept H 1 Type I error Correct decision

NOTE: The probability of committing a type I error is known as the level of


significance denoted by α .

DEFINITION: Type I Error : Rejection of null hypothesis when it is true.

DEFINITION: Type II Error : Acceptance of the null hypothesis when it is false.

@Copyright is Prohibited: 4
Prepared By:Norshahida Shaadan; Statistics Department , FSKM Shah Alam
QMT220: Statistical Methods Hypothesis Testing: Parametric Methods

3.2 Testing A Population Mean μ



We may wish to investigate whether a random sample of size n, with mean x , could
have been drawn from a normal population with mean μ .

Consider two possible cases:

Case 1 : Population Variance σ2 known


X−μ
The test statistic used : Z=
σ/ n

Example 1:

The length of metal bars produced by a particular machine are normally distributed
with mean length 420 cm and standard deviation 12 cm. The machine is serviced,
after which a sample of 100 bars gives a mean length of 423cm. Is there evidence,
at 5% level, of a change in the mean length of the bars produced by the machine,
assuming that the standard deviation remains the same?

Example 2 :

Experience has shown that the scores obtained in a particular test are normally
distributed with mean score 70 and variance 36. When the test is taken by a random
sample of 36 students, the mean score is 68.5. Is there sufficient evidence, at 3% level,
that these students have not performed as well as expected? ( Note: Test whether
the population mean score could be less than 70 marks).

3.2.1 The Use of P-value For Decision making

In practice, p-value approach is an alternative method to arrive at the decision


whether to reject or accept null hypothesis H 0 . The method is natural because
nearly all computer packages (ex: MINITAB and SPSS) that provide hypothesis testing
computation print out p-values along with values of the appropriate test statistic.

DEFINITION: P-value: the lowest level (of significance) at which the observed
value of the test statistic is significant.

Procedure in significance testing using p-value approach:

1. State null and alternative hypothesis


2. Choose an appropriate test statistic.
3. Compute p-value based on computed value of test statistic.

@Copyright is Prohibited: 5
Prepared By:Norshahida Shaadan; Statistics Department , FSKM Shah Alam
QMT220: Statistical Methods Hypothesis Testing: Parametric Methods

4. Decide to reject null if p-value > significance level ( α )


5. Draw conclusion.
Example 3 :

A random sample of 100 recorded deaths in the United States during the past year
showed an average life span of 71.8 years. Assuming a population standard
deviation of 8.9 years, does this seem to indicate that the mean life span today is
greater than 70 years? Use p-value approach at the 0.05 level of significance.

Case 2 : Population Variance σ2 unknown

When n large (n ≥ 30) When n small ( n<30)

i) Case 2 when sample size n large

Now since σ2 unknown, we use an estimate of σ2 that is the sample variance s 2 .

The appropriate test statistic is:

_
x−μ
Z=
s/ n

Example 4: A normal distribution is thought to have a mean of 50. A random sample


of 100 gave a mean of 52.6 and a standard deviation of 14.5. Is there evidence that
the population mean has increase at the 1% level ?

Example 5: A sample of 40 observations from a normal distribution gave ∑ x = 24


and ∑x 2
=596. Test at 5% level, whether the mean of the distribution is zero. Perform
a two-tailed test.

ii) Case 2 when sample size n small

The appropriate test statistic is:


X−μ
T=
s/ n

@Copyright is Prohibited: 6
Prepared By:Norshahida Shaadan; Statistics Department , FSKM Shah Alam
QMT220: Statistical Methods Hypothesis Testing: Parametric Methods

Example 6 :

Five readings of the resistance, in ohms, of a piece of wire gave the following results

1.51,1.49,1.54,1.52,1.54

If the wire were pure silver, its resistance would be 1.50 ohms. If the wire were impure,
the resistance would be increased. Test, at the 5% level, the hypothesis that the wire
is pure silver.

Example 7 :

A random sample of eight observations of a normal variable gave


− -
x = 4.65, ∑ (x - x) 2
= 0.74 . Test at 2% level whether the mean of the distribution is 4.3?

3.3 Testing The Difference Between Two Population Means

Case: For two independent samples

Recall:

Must consider two unpaired, independent sample of sizes n1 and n2 such that

X 1 ~N( μ1 , σ1 ) and X 2 ~N( μ2 , σ 2 ).


2 2

Then the sampling distribution of the difference between means is


σ σ
_ _ 2 2
X1 − X 2 ~ N ( μ1 - μ2 , 1 + 2 )
n1 n2

Hypotheses statement:

1. H 0 : μ1 = μ 2 versus H 1 : μ1 ≠ μ 2
2. H 0 : μ1 = μ 2 versus H 1 : μ1 > μ 2 or H 1 : μ1 < μ 2

a) If the population variances are known

@Copyright is Prohibited: 7
Prepared By:Norshahida Shaadan; Statistics Department , FSKM Shah Alam
QMT220: Statistical Methods Hypothesis Testing: Parametric Methods

⎛_ _ ⎞
⎜⎜ x1 − x 2 ⎟⎟ − (μ1 − μ 2 )0
Test statistic: Z = ⎝ ⎠
σ 12 σ 22
+
n1 n2

Example 8:

A random sample of size 100 is taken from a normal population with variance

σ1 = 40 . The sample mean x1 is 38.3. Another random sample, of size 80, is taken
2

_
from a normal population with variance σ2 =30. The sample mean x 2 is 40.1. Test at
2

5% level, whether there is a significant difference in the population means μ1 and


μ2 .

b) If there are unknown population variances

i) For large samples


⎛_ _ ⎞
⎜⎜ x1 − x 2 ⎟⎟ − (μ1 − μ 2 )0
Test statistic: Z = ⎝ ⎠
2 2
s1 s
+ 2
n1 n2

Example 9 :

An experiment was performed to compare the abrasive wear of two different


laminated materials.100 of material 1 were tested by exposing each piece to a
machine measuring wear. 80 pieces of material 2 were similarly tested. In each
case, the depth of wear was observed. The samples of material 1 gave an average
(coded) wear of 85 units with a sample standard deviation of 4, while the samples of
material 2 gave an average of 81 and a sample standard deviation of 5. Can we
conclude at the 0.05 level of significance that the abrasive wear of material 1
exceeds that of material 2 by more than two units? Assume the populations to be
approximately normal.

ii) For small samples

Technique 1 Technique 2

Test statistic: T Test statistic: T


⎛_ _ ⎞ ⎛_ _ ⎞
⎜⎜ x1 − x 2 ⎟⎟ − (μ1 − μ 2 )0 ⎜⎜ x1 − x 2 ⎟⎟ − (μ1 − μ 2 )0
T=
⎝ ⎠ T=⎝ ⎠
1 1 s1
2
s
2
Sp + + 2
n1 n 2 n1 n2

Assumption: σ 12 = σ 22 Assumption: σ 12 ≠ σ 22
Where :
@Copyright is Prohibited: D.f=v= 8
Prepared By:Norshahida Shaadan; Statistics Department , FSKM Shah Alam2
(n1 - 1) s12 + (n 2 − 1) s 2 2 ∧
( s1 / n1 + s 22 / n2 ) 2
Sp = and σ = Sp
n1 + n 2 − 2 [( s12 / n1 ) 2 /(n1 − 1) + ( s 22 / n2 ) 2 /(n2 − 1)]
D.f=v= n1 + n2 − 2
QMT220: Statistical Methods Hypothesis Testing: Parametric Methods

Example 10:

Information below are the data regarding the expenses (RM million) from a few
organizations on information systems and technology in 2005 from the private and
public sectors in state A.

Public sector Private sector


5.4 2.5
2.5 5.0
9 0.5
10 2.1
1.02 4.3
5.11 2.25
12.4 2.5
1.94
2.33

Independent samples above are taken from normal population, with unknown
variances. By assuming that the population variance for the two populations are
equal test whether the average expenses on information system and technology
from the public sector is greater than the private sector. (Use α = 0.05 ).

Example 11

A large automobile manufacturing company is trying to decide whether to purchase


brand A or brand B tires for its new models. To help arrive at decision, an experiment
is conducted using 12 of each brand. The tires are run until they wear out. The results
are
_ _

Brand A: x 1 = 37,900 km Brand B: x 2 = 39,800 km


s1 = 5,100 km s 2 = 5,900 km

Test the hypothesis that there is no difference in the average wear of 2 brands of
tires. Assume the populations to be approximately normally distributed with unequal
variances. Use α = 0.05 .

Exercise: Using the MINITAB output, draw your decision and conclusion in the context
of the problem. (Use p-value approach).

Solution: MINITAB Output

Two Sample T-Test and Confidence Interval

Two sample T for Public vs Private


N Mean StDev SE Mean
@Copyright
Public is 7Prohibited:
6.49 4.13 1.6 9
PrivateBy:Norshahida
Prepared 9 2.60
Shaadan;1.32 0.44
Statistics Department , FSKM Shah Alam
95% CI for mu Public - mu Private: ( 0.8, 7.00)
T-Test mu Public = mu Private (vs >): T= 2.67 P=0.0091 DF= 14
Both use Pooled StDev = 2.88
QMT220: Statistical Methods Hypothesis Testing: Parametric Methods

3.4 Testing the Difference Between Two Means

Case: For two dependent samples

Definition: Samples are said to be dependent if they are related or expected to share
information together. Observations taken from the two samples having or possess
same or related elements.

Paired observations are recorded data taken from two dependent samples. In an
experiment, if two different set of data taken from the same unit of experiment, then
two set of data are considered come from dependent samples.

Examples of data:

Case study 1: In a study to investigate the effectiveness of an exercise program,


weights of each candidate were recorded before and after the program.

Case study 2: To investigate the influence of a particular drug on white rat blood
pressure. The blood pressure reading was recorded from each rat before and after
the drug was given to the mice.

Case study 3: A researcher wanted to compare the pulse rates of identical twins to
see whether there was any difference. Eight sets of twins were selected and the
pulse rate readings were recorded.

Hypotheses statement:

1. H 0 : μD = d0 versus H1 : μ D ≠ d 0
2. H 0 : μD = d0 versus H1 : μ D > d 0 or H1 : μ D < d 0

Note: μ D = μ1 − μ 2 d 0 - is the difference at null hypothesis (claimed value)

_
d − d0
Test statistics: t=
sd / n

- with t follows t-distribution with v=n-1.

Example 12

A researcher wanted to find the effect of a special diet on systolic blood pressure.
She selected a sample of 7 adults and put then on this dietary for three months. The

@Copyright is Prohibited: 10
Prepared By:Norshahida Shaadan; Statistics Department , FSKM Shah Alam
QMT220: Statistical Methods Hypothesis Testing: Parametric Methods

following table gives the systolic blood pressures of these seven adults before and
after the completion of this plan. At the 5% significance level can you conclude that
that there is a significant difference in systolic blood pressure?

Before 210 180 195 220 231 199 224


After 193 186 186 223 220 183 233

Example 13

The manufacturer of a gasoline additive claims that the use of this additive increases
gasoline mile age. A random sample of six cars was selected and these cars were
driven for one week without the gasoline additive and then for one week with
gasoline additive. The following table gives the miles per gallon for these cars without
and with the gasoline additive.

Without 24.6 28.3 18.9 23.7 15.4 29.5


With 26.3 31.7 18.2 25.3 18.3 30.9

Using the 1% significance level, can you conclude that the use of gasoline additive
increases the gasoline mile age?

3.5 Testing a Population Proportion

3.5.1 Small sample

The test statistic for testing a population proportion with small samples is based on
Binomial distribution. The variable x = the number of success having sample size n a
with p=p0. The p-value approach is employed in the testing procedure. Follows are
the computation for p-value depending on the hypothesis statement.

Hypothesis statements: P-value computation

H 0 : P = Po versus H 1 : P < P0 P = P( X ≤ x when p =p 0 )

H 0 : P = Po versus H 1 : P > P0 P = P( X > x when p =p 0 )


H 0 : P = Po versus H 1 : P ≠ P0 If x < np0:
P = 2 P( X ≤ x when p =p 0 )
if x> np0:
P = 2 P( X ≥ x when p =p 0 )

Example 14

A builder claims that heat pumps are installed in 70% of all homes being constructed
today in the City A. Would you agree with this claim if a random survey of new

@Copyright is Prohibited: 11
Prepared By:Norshahida Shaadan; Statistics Department , FSKM Shah Alam
QMT220: Statistical Methods Hypothesis Testing: Parametric Methods

homes in this city shows that 8 out of 15 had heat pumps installed? Use a 1% level of
significance.

Example 15

A marketing expert for pasta-making company believes that 40% of pasta lovers
prefer lasagne. If 9 out 20 pasta lovers choose lasagne over other pastas, what can
be concluded about the expert’s claim? Use 0.05 level of significance.

3.5.2 Large sample

Follows is the procedure to test a hypothesis of a population proportion P. We use


normal distribution to perform a test, for a large sample. As we have discussed

earlier, the sample proportion p is approximately normal with mean equal to p and
pq
variance equal to .
n

Hypothesis statements:

1. H 0 : P = Po versus H 1 : P ≠ P0 - the two-tailed test


2. H 0 : P = Po versus H 1 : P > P0 or H 1 : P < P0 - the one tailed test

Test statistic:

p − p0
Z= Where ; q =1− p
p0 q0
n

Example 14

A commonly prescribed drug for relieving nervous tension is believed to be only 60%
effective. Experimental results with new drug administered to a random sample of
100 adults who suffering from nervous tension show that 70 received relief. Is this
sufficient evidence to conclude that the new drug is superior to the one commonly
prescribed? Use 5% significance level.

3.6 Testing the difference between two population proportions

Hypothesis statement:

H0 : P 1 = P 2 versus H1 : P 1 ≠ P 2 or H1 : P 1 > P 2 or H1 : P1 < P 2

@Copyright is Prohibited: 12
Prepared By:Norshahida Shaadan; Statistics Department , FSKM Shah Alam
QMT220: Statistical Methods Hypothesis Testing: Parametric Methods

Test statistic:
∧ ∧
p1 − p 2
Z=
∧ ∧ 1 1
p q( + )
n1 n 2

∧ x 1+ x 2
Where P = (the pooled population proportion).
n1 + n2

Note: Pooled proportion is used in accordance to the H 0 : P 1 = P 2 statement.

Example 15

In a study to estimate the proportion of residents in a certain city and its suburbs who
favor the construction of a nuclear power plant, it is found that 63 of 100 urban
residents favor the construction while only 59 of 125 suburban residents are in favor. Is
there a significant difference between the proportion of urban and suburban
residents who favor construction of the nuclear plant? Use p-value.

Example 16

In an epidemic flue, 2000 babies were surveyed by a pharmaceutical company to


determine if the company’s new medicine was effective after two days. Among 120
babies who had the flu and were given the medicine,29 were cured within two days.
Among 280 babies who had the flu but were not given the medicine, 56 ere cured
within two days. Is there any significant indication that supports the company’s claim
of the effectiveness of the medicine? Use α = 0.05 .

3.7 One and two-sample tests concerning Variances

Engineers and scientist are constantly dealing with studies in which they are required
to demonstrate that measurement involving products or processes fall inside
specifications set by consumers. The specifications are often met if the process
variance is sufficiently small. Therefore hypothesis testing on a variance or between
two variances are required with the purpose to investigate whether the study
assumption is violated.

3.7.1 Testing A Population Variance

Hypothesis statement:

H 0 : σ 2 = σ o2 versus H 1 : σ 2 ≠ σ o2 or H 1 : σ 2 > σ o2 or H 1 : σ 2 < σ o2

@Copyright is Prohibited: 13
Prepared By:Norshahida Shaadan; Statistics Department , FSKM Shah Alam
QMT220: Statistical Methods Hypothesis Testing: Parametric Methods

(n − 1) s 2
Test Statistic: χ2 =
σ o2

Example 17

A manufacturer of car batteries claims that the life of his batteries is approximately
normally distributed with a standard deviation equal to 0.9 year. If a random sample
of 10 of these batteries has a standard deviation of 1.2 years, test whether σ > 0.9
year. Use a 0.05 level of significance.

Example 18

Random samples of 10 containers of lubricants with the following contents (liters)


were recorded.

10.2, 9.7, 10.1, 10.3, 10.1, 9.8, 9.9, 10.4, 10.3, 9.8

It is known that the volume of the containers of a particular lubricant is known to be


normally distributed with a variance of 0.03 liter. Test the hypothesis that σ 2 = 0.03
against the alternative hypothesis that σ 2 ≠ 0.03 at 5% significance level.

3.7.2 Testing the difference between two variances

Hypothesis Statement:

H 0 : σ 12 = σ 22 versus H 1 : σ 12 ≠ σ 22 or H 1 : σ 12 > σ 22 or H 1 : σ 12 < σ 22

s2
Test Statistic: f = 1
s2 2

Example 19

An experiment was performed to compare the abrasive wear of two different


laminated materials. Twelve pieces of material 1 were tested by exposing each
piece to a machine measuring wear. Ten pieces of material 2 were similarly tested. In
each case, the depth of wear was observed. The samples of material 1 gave and
average (coded) wear of 85 units with a sample standard deviation of 4, while the
samples of material 2 gave an average of 81 and a sample standard deviation of 5.
Can we conclude that the two population variances are equal? Use a 10% level of
significance.

@Copyright is Prohibited: 14
Prepared By:Norshahida Shaadan; Statistics Department , FSKM Shah Alam
QMT220: Statistical Methods Hypothesis Testing: Parametric Methods

Example 20

A study is conducted to compare the length of time between men and women to
assemble a certain product. Past experience indicates that the distribution of times
for both men and women is approximately normal but the variance of the time for
women is less than that for men. A random sample of time for 11 men and 14 women
produced the following data:

Men: n1 = 11 s1 = 6.1 Women: n2 = 14 s 2 = 5.3

At 5% significance level is the claim for the variances can be proven true?

@Copyright is Prohibited: 15
Prepared By:Norshahida Shaadan; Statistics Department , FSKM Shah Alam

You might also like