0% found this document useful (0 votes)
92 views67 pages

BSCHAPTER - 11 (Hypothesis Testing)

1) Hypothesis testing involves setting up null and alternative hypotheses, selecting a significance level, choosing a test statistic, establishing a decision rule, performing computations, and drawing a conclusion. 2) The null hypothesis states there is no difference or change, while the alternative hypothesis states what may be believed to be true. The null hypothesis is tested for rejection. 3) Type I and Type II errors can occur. The significance level determines the probability of a Type I error, while the power of a test depends on how far the true value deviates from the null hypothesis.

Uploaded by

kunal kabra
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
92 views67 pages

BSCHAPTER - 11 (Hypothesis Testing)

1) Hypothesis testing involves setting up null and alternative hypotheses, selecting a significance level, choosing a test statistic, establishing a decision rule, performing computations, and drawing a conclusion. 2) The null hypothesis states there is no difference or change, while the alternative hypothesis states what may be believed to be true. The null hypothesis is tested for rejection. 3) Type I and Type II errors can occur. The significance level determines the probability of a Type I error, while the power of a test depends on how far the true value deviates from the null hypothesis.

Uploaded by

kunal kabra
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 67

Testing of Hypotheses:

Means and Proportions


The process of hypothesis testing essentially
comprises of the following:
a) Hypothesis: Making a statement/claim about the
population,
b) Sampling from the population and analyzing the
sample data, and
c) Determining whether the differences between
what is observed and the statement made could
have been due to chance alone and hence
insignificant or they are significant and casting a
doubt on the statement made.
Step 1: Set up null and alternate
hypotheses.
Step 2: Select the level of significance.
Step 3: Select test statistic.
Step 4: Establish the decision rule.
Step 5: Perform computations.
Step 6: Draw conclusion.
For every hypothesis test, a pair of hypotheses is
set up:
A null hypothesis (H0)
Hypothesis of ‘no difference’ or ‘no change’
An alternate hypothesis (H1).
It states what may be believed to be true
The null hypothesis is always the one to be
tested.
If evidence from sample is sufficient to reject H0,
then we reject it and accept H1, otherwise H0 is
not rejected and accepted to be true by default.
A study claims that the mean income of the
senior executives in the manufacturing sector
in an industrial state is Rs 625,000 per
annum.
To test this claim, it is decided to take a
sample of 200 executives and obtain their
mean income. Set up the appropriate
hypotheses.
The null and alternate hypotheses would be:
Null hypothesis,
H0: µ = Rs625,000
(The claim is true)
Alternate hypothesis,
H1: µ  Rs 625,000
(The claim is not true)
The level of significance: (α)
Is the probability of rejecting
a null hypothesis
when it is true.
It is complementary
to the level of confidence.
Level of
Confidence:
1- α
Critical
Statistic Comparison Value

Depends on the
Choice of an knowledge about
appropriate test- population parameters,
statistic z , t , F, 2 sample size, number of
etc. samples collected etc
The testing of hypothesis is done by means of
computing some statistic and comparing its
value with a certain standard value, called critical
value, to determine whether null hypothesis may
be rejected.
There are several test statistics such as z, t, F, 2
etc available.
The nature of underlying population from which
sampling is done, the knowledge about its
parameters, sample size, number of samples
collected etc are the factors which govern the
choice of a test-statistic.
If the computed value of the test statistic is
more extreme than its critical value/s, then
reject H0, else accept H1.
The critical values are obtained having
reference to appropriate area tables relating
to the concerned test statistic.
The critical value depends on several factors
including the statistic being used, the level of
significance and whether the test is two-
tailed or one-tailed.
A two-tailed test of A one-tailed test of
hypothesis is hypothesis is
conducted where it is conducted where it is
important to consider important to consider
both directions of only a single direction
difference away from of difference away
the parameter from the parameter
specified in the null value specified in the
null hypothesis.
hypothesis.
In such a test, the
Here the rejection rejection region lies
region lies in both only in one end of the
ends of the sampling sampling distribution.
distribution.
Sampling Distribution and Regions ofAcceptanceandRejection
Sampling Distribution and Regions ofAcceptanceandRejection
Sampling Distribution and Regions ofAcceptanceandRejection
The next step in hypothesis testing is taking
sample(s).
Having collected the sample(s), we use the
sample information to calculate the value of
the test-statistic in question.
This calculated value is meant to be
compared with the critical value.
The final step in the hypothesis testing
process calls for drawing conclusion from the
test.
This is done on the basis of the comparison
of the calculated value of the test statistic
with the critical value.
The null hypothesis stands rejected if the
calculated value of the test statistic is more
extreme than the critical value.
This is true both for two-tailed and one-
tailed tests.
In a two-tailed test, if the calculated value of
the statistic is more than the upper critical
value or lower than the lower critical value,
we reject the null hypothesis.
In right-tailed test, we reject null hypothesis
if the calculated value of the statistic is more
than the critical value.
Similarly, we reject null hypothesis if the
calculated value of the statistic is smaller
than the critical value in case of left-tailed
test.
When the critical value is not exceeded by the
calculated value of the test statistic, it
suggests that there is no adequate evidence
against the null hypothesis.
In such a case, we fail to reject the null
hypothesis and this hypothesis is accepted
only by default.
This acceptance of the null hypothesis by no
means proves that it is true.
This is just like in a court of law an accused
may be pronounced as not guilty for lack of
evidence. An accused is presumed, and not
proved, to be innocent in such a situation.
There are four possibilities in a test of
hypothesis:
1. The null hypothesis is in fact true and it is
accepted by the test.
2. The null hypothesis is in fact true and it is
rejected by the test.
3. The null hypothesis is in fact false and it is
rejected by the test.
4. The null hypothesis is in fact false and it is
accepted by the test.
Possibilities 1 and 3 result in correct decision
while in cases 2 and 4 the decision is incorrect.
State of Hypothesis test conclusion
affairs H0 is accepted H0 is rejected
H0 is Correct Type I error
true Decisio Probability = α
n
H0 is Type II error Correct
fals Probability = β Decisio
e n
α is the probability of committing a Type I error while
β is the probability of committing a Type II error.
Type I and Type II errors are inversely related to each
other so that:
 A lowering of α would increase the value of β, and
 An increase in α would decrease the value of β.
This is because a reduction in α increases the
acceptance region and the probability of accepting
the null hypothesis. If it is in fact false then it would
mean an increase in the value of β.
For a given sample size, the decision maker faces the
conflict about the two types of errors.
Hypothesis testing only mentions α: the
probability of committing a Type I error.
There can be no mention of β since its value
can be calculated only when true value of the
parameter is known.
The choice of α is guided by the relative cost
of making each of the errors.
Thus, a lower value of α (which implies a
higher level of confidence) is not necessarily
better in all cases.
The value of β can be determined only when
the true universe value is known.
The closer is the true population parameter
value to the hypothesized value, the greater
likelihood is of the Type II error.
Conversely, farther is the true population
parameter value from the hypothesized value,
the smaller is the chance making of the Type
II error.
To calculate β, first chart the sampling
distribution for the hypothesized value of the
parameter and mark the acceptance region.
Next, plot the sampling distribution
corresponding to the true value of parameter.
The part of acceptance region covered by the
sampling distribution corresponding to the
true value of parameter gives the value of β.
If the hypothesized and the true population
parameter values are close, then the common
area shall be higher.
For a test, it is hypothesized that for a
normally distributed population with σ = 16,
the mean, µ = 80. A sample of 64 is taken to
test this value of hypothesized mean at α =
0.05. You are required to determine the
values of α and β if the true mean value is (a)
82, and (b) 79.
With n = 64 and σ = 16, the standard error of
mean = 2. Further, since α = 0.05, z = 1.96
and the acceptance region works out as 80 ±
1.962 or 76.08 – 83.92.
When µ = 82:

Total area = 0.4985 + 0.3315 = 0.8300


Accordingly, probability of type I error, α = 0.05, and
probability of type II error, β = 0.83.
When µ = 79:

Total area = 0.4279 + 0.4931 = 0.9210


Accordingly, probability of type I error, α = 0.05, and
probability of type II error, β = 0.9210.
Since the true value of the population parameter
(say μ) is not known, we may assume different
values of it and calculate the probability of
making a Type II error, β.
We can chart the probability of committing a
Type II error for various possible true values of
the population parameter by means of an
operating characteristic curve, OC curve.
The OC curve for a two-tailed test is obviously
different from that for a one-tailed test because
of location of the rejection region in the two
cases.
Power of a test is the complement of making
Type II error. It is the probability of rejecting
a null hypothesis that is false.
The power of a test increases with increases
in the deviation of the true parameter value
from the hypothesized value.
Like the OC curve, a power curve can also be
charted.
Further, like for OC curve, a power curve is
different for two-tailed and one-tailed tests.
The p -value approach to hypothesis testing is
an alternative to the critical value approach
although it can be used along with that as well.
For a two-tailed test, the p -value refers to the
probability of an absolute difference between
the sample result and the hypothesized
parameter value at least as large as observed.
The p -value for a one-tailed test describes the
probability of a one-directional difference
between the sample result and the
hypothesized parameter value at least as large
as observed .
If the p -value < level of significance, α
H0 is rejected
If the p -value > level of significance, α
H0 is not rejected.
The p -value approach has the advantage
that it not only allows to take accept/reject
decisions but also reveals how strong the
sample evidence is.
In general terms,
 if the p -value is smaller than 0.10, we have
only some evidence that H0 is not true;
 if the p -value is less than 0.05, then there is
a strong evidence that H0 is not true;
 if the p -value is less than 0.01, the evidence
that H0 is not true is regarded as very strong,
 if the p -value is less than 0.001, then the
evidence that H0 is not true is considered to
be extremely strong
.

Hypothesis Test for Mean:


Normally Distributed Population with Known σ
The sampling distribution of mean would be
normally distributed with
Mean = μ (Hypothesized), and
Standard error =
Set up H0 & H1
Use z - statistic for the purpose:
Compare it with critical value & take
accept/reject decision.
.

Hypothesis Test for Mean: with Known σ


The sampling distribution of mean
(Population distribution not known/ not
normal) would be normally distributed with
Mean = μ (Hypothesized), and
Standard error =
Set up H0 & H1
Use z - statistic for the purpose:
Compare it with critical value & take
accept/reject decision.
A random sample of 80 bank employees is taken
to test a claim that the mean salary of the bank
executives in a certain state is Rs 48,400 p.m.
Further, from a related study undertaken
recently, it is known that the standard deviation
of the distribution of the salaries of the bank
executives in the state is Rs 5,870 and it is
believed to be true. The sample has yielded an
average monthly salary of Rs 47,456. Is the claim
that μ = Rs 48,400 tenable? Test at a 1 percent
level of significance.
Null hypothesis, H0 : µ = 48,400
Alternate hypothesis, H1: µ ≠ 48,400
Level of significance, α = 0. 01
Test statistic: z,
Decision rule: If | z | > 2.58, reject H0

Conclusion: cannot reject the null hypothesis


since the calculated value of z does not exceed
the critical value of 2.58. Sample evidence not
sufficient to reject the claim that the mean salary
of the bank executives is Rs 48,400.
Hypothesis Test for Mean when σ is unknown:
Large Sample
The sampling distribution of mean (Population
distribution may/may not normal) has
Mean = μ (Hypothesized), and
Standard error = s: estimate of s.d.
Set up H0 & H1
Use z - statistic for the purpose:

Compare it with critical value & take


accept/reject decision.
A company is engaged in making brake systems
for cars. A car running at a speed of 50 kmph
comes to a halt after covering a distance of 24
feet on the average when the brake already in use
is applied. Recently, the company has developed
a new brake system which, when applied 80
times to cars running at 50 kmph, gave a mean
distance of 23.2 feet, with a standard deviation
of 2.8 feet, for the cars to come to a halt. Test at
1 percent level of significance whether new brake
system is superior to the existing one. Also,
calculate the p -value and confirm the results.
To be superior, the
new brake system
should have mean
smaller than 24 feet.
It, therefore, calls for
H0 : µ = 24 feet a one-tailed test.
H1: µ < 24 feet
Level of significance, α = 0. 01
Test statistic: z, where

Decision rule: If z < –2.33, then reject H0


Computations:

Conclusion: Calculated value of z exceeds the


critical value. Reject the null hypothesis. The
new brake system appears to be superior to
the existing one.
Hypothesis Test for Mean when σ is unknown:
Small Sample
When
The parent population is normally distributed,
The population standard deviation is not known,
and
The sample size is small ( n ≤30), then
The appropriate test to use for hypotheses test
for µ is the t -test.
The t -statistic is defined as

Here s is the estimate of the population standard


deviation. It is calculated as

The t -statistic is defined for degrees of freedom


equal to n – 1.
CHOICE OF TEST STATISTIC
If π be the proportion of successes in the
population, then the sampling distribution of
the proportion of successes would be
approximately normally distributed with
mean π and standard deviation as if
both n. π and n(1 – π) are at least equal to 5.
We use z - statistic as:

p = proportion of successes in sample.


A manufacturer of alkaline batteries wants to
be reasonably certain that fewer than 6
percent of its batteries are defective. Suppose
that 240 such batteries are chosen randomly
from a large shipment and are tested. A total
of 8 of the batteries are found to be defective.
Is this evidence sufficient for the manufacturer
to conclude that the proportion of defectives
in the entire shipment is less than 0.06, at a
significance level of 1 percent?
H0: π = 0.06 Defectives proportion = 0.06
H1: π < 0.06 Defectives proportion < 0.06
Level of significance, α = 0. 01
Test statistic: z
Decision Rule: If z < – 2.33, then reject H0
Computations:

Conclusion: Calculated value of z does not


exceed the critical value of –2.33.
The evidence not found sufficient to conclude
that the shipment contains smaller than 6
percent defective batteries.
The analysis is of two populations from each
of which a sample is taken.
Accordingly, there are two independent sets
of data.
To test whether the two samples could have
been drawn from the populations that have
equal parameters.
Test for Two Independent Sample Means
The test is whether the two samples could
have been drawn from the populations that
have equal means.
Thus, Null hypothesis: µ 1 – µ 2 = 0.
The test could be two-tailed or one-tailed.
For two-tailed test, the alternate hypothesis:
µ 1 ≠ µ 2 or µ 1 – µ 2 ≠ 0
For one tail test, the alternate hypothesis:
µ 1 > µ 2 or µ 1 – µ 2 > 0,
µ 1 < µ 2 or µ 1 – µ 2 < 0.
Test for Two Independent Sample Means:
Large Samples, Standard Deviations Known
If the population standard deviations are σ 1
and σ 2 , and samples are large (n1 ≥ 30 and n2
≥ 30), the z-statistic used is defined as:

Or

Since µ 1 – µ 2 = 0
A large retailing company wants to know whether
there is a difference in the average size of
customer accounts in its Kolkata and Mumbai
stores. Past experience has shown that the
standard deviations for the two are Rs 180 and
Rs 192 respectively. Samples of 80 accounts
taken from Kolkata gave a mean value of Rs 885
and 90 accounts from Mumbai gave a mean value
of Rs 936. Does this provide evidence at the 5
percent level of significance that the mean
account sizes at the two stores to be different?
H0 : µ 1 – µ 2 = 0 and H1 : µ1 – µ2 ≠ 0
α = 0. 05
Decision rule: If | z | > 1.96, reject H0
Test statistic: z
Computations:

Conclusion: The z-value does not exceed the


critical value, so the evidence is not sufficient to
reject the null hypothesis. There appears to be no
difference in the mean sizes of accounts at
Kolkata and Mumbai stores.
Test for Two Independent Sample Means:
Large Samples, Standard Deviations not Known
If samples are large (n1 ≥ 30 and n 2 ≥ 30),
the z -statistic used is defined as follows

Here s1 and s2 are, respectively, the standard


deviations of the two samples.
Test for Two Independent Sample Means:
Small Samples, Standard Deviations Not Known
For small samples with n1 < 30 and n2 < 30,
and population standard deviations not
known, the testing of hypothesis for two
independent sample means is done using t –
statistic.
The use of this test requires three conditions
to be satisfied.
The use of t –test is based on the following
conditions:
1. Both the sampled populations are normally
distributed or are closely so.
2. The variances of the both the populations are
equal so that .
3. The samples drawn are independent.
We have to combine the sample variances and
obtain a pooled variance since it is assumed
that the two populations have equal
variances.
For small samples with n1 < 30 and n2 < 30,
the test statistic t used for hypothesis testing
for two independent sample means is

The t – statistic has n1 + n2 – 2 degrees of


freedom.
As indicated, it uses the pooled variance for
calculations.
The pooled variance is defined as weighted
average of the variances of the two samples,
the weights being their respective degrees of
freedom.
The pooled variance is calculated as:
To judge whether there is a difference in the mean
incomes of the agents of two insurance companies, a
sample is taken from each population and the following
results are obtained:
Yearly incomes (in Lakhs of Rs)

3.2 4.8 5.3 2.2 2.7 6.2


Company A:
3.4 3.7 4.1 4.2 5.7 2.5
1.5 2.6 2.8 4.6 3.6 6.2
Company B:
6.8 1.3 2.1 1.5
Test at α = 0.02 whether the difference between mean
incomes of the two groups is significant. Also calculate
the p -value and interpret.
From calculations, we get
 Mean of sample 1 = 4.00

 Mean of sample 2 = 3.3

 Variance of sample 1 = 1.6709

 Variance of sample 2 = 3.90

 Pooled variance = 2.674

 Value of t -statistic = 1.00


Null hypothesis, H0: µ 1 = µ 2 or µ 1 − µ 2 = 0
Alternate hypothesis, H 1 :µ 1 ≠ µ 2 or µ 1 −µ 2 ≠ 0
Level of significance, α = 0. 02
Test statistic: t with 20 degrees of freedom
Decision Rule: We have, t 20,0.02 = 2.528. Thus, if
‫ ׀‬t ‫ >׀‬2.528, then reject H0
Computations: Value of t-statistic = 1.00
Conclusion: The calculated value the t -statistic
does not exceed the critical value. Hence, the null
hypothesis cannot be rejected.
There appears to be no difference between the
mean incomes of the agents of the two insurance
companies.
Test for Difference between Means:
Dependent Samples
When paired samples are taken then the testing
is done by taking the differences as a random
variable and treating it like a one-sample test.
For example, we may consider performance of a
group of workers before and after training as an
illustration of paired or dependent samples.
D may be calculated by subtracting the ‘before’
scores from the ‘after’ scores.
Various D scores are then averaged to get their
mean value. This is then compared with 0, the
hypothesized difference between the scores.
The t -statistic is calculated as :

In this, the standard deviation of distribution


of differences is calculated as:
Deals with cases in which each element sampled can
be classified into one of the two categories – success
or failure.
Two independent samples are drawn from two
populations, proportions of successes in each sample
p1 and p2 respectively are calculated.
It is hypothesized that the two population proportions
of successes π1 and π2 respectively are equal.
This test involves examining whether the difference
between sample proportions p1 – p2 is significantly
different from the hypothesized difference of 0.
The z -statistic is used for this hypothesis testing.
The z-statistic can be used for testing difference
between sample proportions when the samples are
large in size and np value in each of them is equal to
10 or higher.
The test statistic is:

where

You might also like