0% found this document useful (0 votes)
44 views

Hypothesis Testing

The document describes the steps of hypothesis testing: 1) State the null and alternative hypotheses 2) Select the significance level, typically 0.05 3) Identify the test statistic (e.g. z-score, t-score) 4) Formulate the decision rule about rejecting the null hypothesis 5) Take a sample and make a decision to either reject or not reject the null hypothesis based on the test statistic and decision rule.

Uploaded by

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

Hypothesis Testing

The document describes the steps of hypothesis testing: 1) State the null and alternative hypotheses 2) Select the significance level, typically 0.05 3) Identify the test statistic (e.g. z-score, t-score) 4) Formulate the decision rule about rejecting the null hypothesis 5) Take a sample and make a decision to either reject or not reject the null hypothesis based on the test statistic and decision rule.

Uploaded by

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

HYPOTHESIS TESTING

One Sample Tests of


Hypothesis
A hypothesis is a statement about
a population parameter.

Data are then used to check the


• Definition: A statement about a
population parameter developed for the
purpose of testing.
• Hypothesis Testing: A procedure based
on sample evidence and probability theory
to determine whether the hypothesis is a
reasonable statement.
9-5

Hypothesis Testing
S tep 1 : S tate n u ll an d altern ate h yp oth eses

S tep 2 : S elect a level of sig n ifican ce

S tep 3 : Id en tify th e tes t statis tic

S tep 4 : F orm u late a d ec ision ru le

S tep 5 : Take a sam p le, arrive at a d ecision

D o n ot reject n u ll R ejec t n u ll an d ac c ep t altern ate


• Step 5: Take a sample, arrive at decision
• Decision:Do not reject H0 Or,
Reject H0 and accept H1.
• Step1: State the Null Hypothesis (H0) and the
Alternate Hypothesis (H1)
• NULL HYPOTHESIS: A statement about the
value of a population parameter.
• The Alternate hypothesis describes what you
will conclude if you reject the null
hypothesis.
• ALTERNATE HYPOTHESIS: A statement that is
accepted if the sample data provide enough
evidence that the null hypothesis is false.
• Example: A recent article indicated that the
mean age North South University student is 20
years. To conduct a statistical test regarding this
statement, the first step is to determine the null
and alternate hypothesis. The null hypothesis
represents the current or reported condition.
• It is written:

H 0 :   20.

The Alternate hypothesis
is that the statement is
not true, that is,

H1 :   20
• It is important to remember that no matter how
the problem is stated; the null hypothesis will
always contain the equal sign. The equality will
never appear in the alternative hypothesis.
• Step 2: Select a level of significance (or
Risk):
• LEVEL OF SIGNIFICANCE: The probability of
rejecting the null hypothesis when it is true.
• The level of significance is designated by , the
Greek letter alpha. A decision is made to use
the .05 level (often stated as 5% level), the .01
level, and the .10 level. Traditionally, the .05 level
is selected for consumer research projects;
the .01 level is for quality assurance and .10 for
political polling.

• There are two types of errors in rejecting or
accepting the null hypothesis:
• TYPE I ERROR: Rejecting the null hypothesis, H0,
when it is true.
The probability of committing another type of error,
called a type II error, is designated by the Greek
letter .
• TYPE II ERROR: Accepting the null hypothesis
when it is false.
• The following table summarizes the
decisions the researcher could make and
the possible consequences:

Researcher
Null Hypothesis
Accepts H0 Rejects H0

Ho is true Correct Type I error


decision
• Step 3: Select the Test Statistic
There are many test statistics. Here we will
use z and t as the test statistic. In future we
will also use test statistics as F and 2 ,
called chi-square.
TEST STATISTIC: A value, determined
from sample information, used to determine
whether to reject the null hypothesis.
In hypothesis testing for the mean () when σ
is known or the sample size is large, the test
statistic z is computed by

X 
z
 / n
The z value is based on the sampling
distribution of X .

which is normally distributed when the


sample is reasonably large.
• Step 4: Formulate the decision Rule
• A decision rule is a statement of the
specific condition under which the null
hypothesis is rejected and the
conditions under which it is not rejected.
The region or area of rejection defines
the location of all those values that are
so large or so small that the probability
of their occurrence under a true null
hypothesis is rather remote.
CHART 10.1 (Text Book)
Note in the chart that :
• The area where the null hypothesis is not rejected is
to the left of 1.65
• The area of rejection is to the right of 1.65
• A one-tailed test is being applied.
• The .05 level of significance was chosen.
• The sampling distribution of the statistic z is
normally distributed.
• The value of 1.65 separates the regions where the
null hypothesis is rejected and where it is not
rejected.
• The value 1.65 is the critical value.
• CRITICAL VALUE: The dividing point between
the region where the null hypothesis is rejected
and the region where it is not rejected.
• Step 5: Make a Decision
The fifth and final step in hypothesis testing is
computing the test statistic, comparing it to the
critical value, and making a decision to reject
or not to reject the null hypothesis.
• ONE-TAILED AND TWO-TAILED TESTS OF
SIGNIFICANCE
• Chart 10.2 (Text Book)
• One way to determine the location of the
rejection region is to look at the direction
in which the inequality sign in the
alternate hypothesis is pointing
• ( either < or > ). For example, test is one-
tailed if H1 states  > or  < .
• In summary, a test is one-tailed when the
alternate hypothesis H1 states a direction, such
as :
• H0: The mean income of Managers of Computer
Companies is $50,000 per year
• H1: The mean income of Managers of Computer
Companies is greater than $50,000 per year
• That is,
• H0: =50000
• H1:  >50000
• If no direction is specified in the alternate
hypothesis, we use a two-tailed test. Changing
the previous example,
• H0: The mean income of Managers of Computer
Companies is $50,000 per year
• H1: The mean income of Managers of Computer
Companies is not equal to $50,000 per year.
• That is,
• H0:  = 50000
• H1:   50000
• If the null hypothesis is rejected and H1 accepted
in the two-tailed test, the mean income could be
significantly greater than $50,000 per year or it
could be significantly less than $50,000 per year.
To accommodate these two possibilities, the 5
percent area of rejection is divided into the two
tails of the sampling distribution
• (2.5 percent each).
• Chart 10.3 (Text Book)
• Note that the total area in the
normal distribution is 1.0000,
found by .9500+.0250+.0250.
TESTING FOR POPULATION MEAN WITH A
KNOWN POPULATION STANDARD DEVIATION.
Page#373
Example: The weekly production of steel desks of a
Company is normally distributed, with 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 desk. To put it another
way, is the mean number of desks produced at the
Company different from 200 at the .01 significance
level? A sample of 50 was taken and mean was
found to be 203.5.
Solution

Step1:We state the Null and Alternate


hypotheses:
H0:  = 200
H1:   200
Step2: Select the level of significance.
 = .01
Step3: Select the test statistic. Since σ is
known, Z test statistic is to be used.
X 
Z 

n
Step4: Formulate the Decision Rule.
If Zcomp. ≥ 2.58 or ≤ -2.58, H0 will be rejected,
otherwise H0 will be accepted.
Chart to be provided.

Step5: Making calculations and taking decisions.


X 
Z

n
203.5  200
16
50
Decision: Since Zcomp. (1.55) falls in the
acceptance area H0 is not rejected, that is,
= 200.
No, the production rate has not changed at
the .o1 significance level.
The test is not statistically significant.
TESTING FOR A POPULATION MEAN:
SMALL SAMPLE
• POPULATION STANDARD DEVIATION
UNKNOWN
• When the sample size is less than 30 (n<30) and
the population standard deviation is not known,
we replace the standard normal distribution with
the t distribution.
• To conduct a test of hypothesis using the t
distribution, we use the following formula:

X 
t 
s/ n
With n – 1 degrees of freedom, where:
X is the mean of the sample
•  is the hypothesized population mean
• s is the standard deviation of the
sample
• n is the number of observation in the
sample
EXAMPLE: Page#379
• An Insurance Company reports that the mean cost
to process a claim is $60. A comparison showed
this amount to be larger than most other insurance
companies, so they instituted cost-cutting
measures. The Insurance Company selected a
random sample of 26 recent claims. The mean cost
per claim was $56.42 and the standard deviation
was $10. At the .01 significance level, is it
reasonable to conclude that the mean cost to
process a claim is now less than $60?
• Can they conclude that the cost-cutting measures
were effective? Or should they conclude that the
difference between the sample mean ($57) and the
population mean ($60) is due to chance? Use
the .01 significance level. P-value?
Solution
Step1:We state the Null and Alternate
hypotheses:
H0:  ≥ 60
H1:  < 60
Step2: Select the level of significance.
 = .01
Step3: Select the test statistic. Since σ is not
known, t test statistic is to be used.
Step4: Formulate the Decision Rule.
If tcomp. ≤ -2.485, H0 will be rejected, otherwise
H0 will be accepted.
Chart to be provided. Df=26-1=25

Step5: Making calculations and taking decisions.


X   56.42  60
t  10  1.82
s
26
n
Decision: Since tcomp. (-1.82) falls in the
acceptance area, H0 is not rejected, that is,  ≥
60.
No, at the .01 significance level, it is not
reasonable to conclude that the mean cost to
process a claim is now less than $60? The test is
not statistically significant.
• [Self - Review 10.3 Page: 339 and
example at page 337-338].
• Page#339. Exercise# 11, 13, 14.
• [Self – Review 10.4 Page 342]
• Exercise 17, 19.
TESTS CONCERNING PROPORTIONS

• A proportion is the ratio of the number of


successes to the number of observations.
We let X refer to the number of successes
and n the number of observations, so the
proportion of success in a fixed number of
trials is X/n. Thus, the formula for
computing
• a sample proportion, p, is p = X/n.
• Some assumptions must be met and conditions
met before testing a population proportion. To test
a hypothesis about a population proportion, a
random sample is chosen from the population.
• It is assumed that the binomial assumptions are
met.
• both n and n(1 - ) are at least 5. n is the sample
size, and  is the population proportion. It takes
advantage of the fact that a binomial distribution
can be approximated by the normal distribution.
EXAMPLE: Page# 397. Exercise#51

• Tina Dennis is the comptroller for Meek


Industries. She believes that the current
cash-flow problem at Meek is due to the
slow collection of accounts receivable.
She believes that more than 60 percent of
the accounts are in arrears more than
three months. A random sample of 200
accounts showed that 140 were more than
three months old. At the .01 significance
level, can she conclude that more than 60
percent of the accounts are in arrears for
more than three months?
Step1:We state the Null and Alternate hypotheses:
H0: π ≤ .60
H1: π > .60
Step2: Select the level of significance.
 = .01
Step3: Select the test statistic. Z test statistic is to be use
p 
Z
 (1   )
n
Step4: Formulate the Decision Rule.
If Zcomp. >2.33, H0 will be rejected, otherwise H0
will be accepted.
Chart to be provided.
Step5:Calculations and decisions.

p  .70  .60
Z    2.89
 (1   ) .60(1  .60)
n 200
Decision:
Since Zcomp (2.89) falls in the rejection region, H0
is rejected and H1 is accepted, that is, π>.60.
Yes, at the .01 significance level, she can
conclude that more than 60 percent of the
accounts are in arrears for more than three
months.
The test is statistically significant.
p- value in hypothesis testing
• The p-value provides additional insight into the
decision. It gives additional information on the
strength of the rejection. That is, how confident are
we in rejecting the null hypothesis?
• The p-value compares with the
significance level.
• If the p-value is smaller than the
significance level, H0 is rejected.
• If it is larger than the significance level,
H0 is not rejected.
• Determining the p-value not only results in a
decision regarding H0 but it gives us additional
insight into the strength of the decision. A very
small p-value, such as .0001, indicates that
there is little likelihood the H0 is true. On the
other hand a p-value of .2033 means that H0 is
not rejected, and there is little likelihood that it is
false.
• How do we compute the p-value? [BOARD].
How to compute p-value?

To compute p-value, we start from computed z


value. Here z value =2.89. If we can find the
area to the right side of 2.89, the blackish area
in the curve, that will be the p –value.
From the Z table,
The area between 0 and 2.89 is .4981
The required area, p value=.5 - .4981 =.0019.
Interpretation: Since p-value(.0019) is less than
α value(.01), H0 should be rejected and we
have rejected H0. So correct decision has been
2) We have rejected H0.
What is the probability that H0 may be true?
Ans: The probability that H0 may be true
is .0019.

Self –Review;15-1. page # 549.


Exercise# 3,4,5,6 page#550
Two - Sample Tests of Hypothesis

• HYPOTHESIS TESTING: POPULATION MEANS


• [Till now we have conducted tests of hypothesis in which we
compared the results of a single sample to a population value. That
is, we selected a single random sample from a population and
conducted a test of whether the proposed population value was
reasonable. We compared the results of a single sample statistic to
a population parameter. In this chapter, we expand the idea of
hypothesis testing to two samples. That is we select two random
samples to determine whether the samples are from the same or
equal populations.
• For example, we may want to test: Is there an increase in the
production rate if music is piped into the production area?]
EXAMPLE: Page#

• Customers at FoodTown super Markets have a


choice when paying for their groceries. They may
check out and pay using the standard cashier
assisted checkout, or they may use the new U-Scan
procedure. In the standard procedure a FoodTown
employee scans each item, puts it on a short
conveyor where another employee puts it in a bag
and then into the grocery cart. In the U-Scan
procedure the customer scans each item, bags it,
and places in the cart themselves.The U-Scan
procedure is designed to reduce the time a customer
spends in the checkout time.
• The U-Scan facility was recently installed at
the Tom Road town location. The store
manager would like to know if the mean
checkout time using the standard checkout
method is longer than the U-Scan. She
gathered the following sample information.
The time is measured from when the
customer enters the line until their bags are in
the cart. Hence the time include both waiting
in line and checking out. What is the p-value?
Customer Sample Sample Sample
Type Mean Standard Size
Deviation
Standard 5.50 0.40 minutes 50
minutes

U-scan 5.30 0.30 minutes 100


minutes
Step1:We state the Null and Alternate hypotheses:
Solution:
H0: 1 ≤ 2 1= Standard Method
H1: 1 > 2 2 = U scan method
Step2: Select the level of significance.
 = .01
Step3: Select the test statistic. Since both σs are kn
Z test statistic is to be used.

X1  X 2
Z
 12  22

n1 n2
Step4: Formulate the Decision Rule.
If Zcomp. >2.33, H0 will be rejected, otherwise
H0 will be accepted.
Chart to be provided.
X1  X 2 5.5  5.3
Z   3.12
 12  22 (.40) 2 (.30) 2
 
n1 n2 50 100
Decision

Since Zcomp. (3.12) falls in the rejection region,


H0 is rejected and H1 is accepted, that is,
1 > 2.
Yes, at the .01 significance level it is reasonable to conclude that the standard

method takes longer time.

The test is statistically significant.

P – value????
Two sample Tests about proportions
• Assumptions are the same as one sample test.
Example: Keya Cosmetics recently developed a
new fragrance that they plan to market under the
name “Heavenly” . A number of market studies
indicate that Heavenly has very good market
potential. The sales department is particularly
interested in whether there is a difference in
the proportions of younger and older women
who would purchase Heavenly if it were
marketed. There are two independent
populations, a population consisting of the
younger women and a population consisting of
the older women.Each sampled woman will be
asked to smell Heavenly and indicate whether
she likes the fragrance well enough to purchase
a bottle.
A random sample of 100 young women
revealed 20 liked the Heavenly fragrance
well enough to purchase it. Similarly, a
sample of 200 older women revealed 100
liked the fragrance well enough to make
purchase.
DEPENDENT SAMPLES

• In our previous example, we tested the


difference between the means from two
independent samples. This means, for
example,
that the sample response time for the senior
citizens is unrelated to the response time for
the other patients. If Mr. Rahman is a senior
citizen and his response time is sampled, that
does not affect the response time for any
other patient.
• There are situations, in which the samples are
not independent. To put it another way, the
samples are dependent or related.
• The test statistic follows the t distribution
and we calculate its value from the
following formula:
• PAIRED t TEST
d
t 
sd / n
• There are n-1 degrees of freedom and

d
is the mean of the difference between the paired
or related observations

sd
is the standard deviation of the differences
between the paired or related
observations.
• n is the number of paired observations.
Example:
• A loan giving organization wishes to
compare the two companies they use to
appraise the value of residential homes.
The Organization selected a sample of 10
residential properties and scheduled both
firms for an appraisal. The results,
reported in $000, are:
Home 1 2 3 4 5 6 7 8 9 10

Co. A 235 210 231 242 205 230 231 210 225 249

Co. B 228 205 219 240 198 223 227 215 222 245
Home Co. A Co. B Difference, d d2
1 235 228 7 49
2 210 205 5 25
3 231 219 12 144
4 242 240 2 4
5 205 198 7 49
6 230 223 7 49
7 231 227 4 16
8 210 215 -5 25
9 225 222 3 9
10 249 245 4 16
Total 46 386
• At the .05 significance level, can we conclude there
is a difference in the mean appraised values of the
homes?
• SOLUTION: Done on the board.
• To find the p-value, we use Appendix F and the
section for a two-tailed test. Move along the row
with 9 degrees of freedom and find the values of t
that are closest to our calculated value. For a .01
significance level, the value of t is 3.250. The
computed value is larger than this value, but
smaller than the value of 4.781 corresponding to
the .001 significance level. Hence, the p-value is
less than .01.
Comparing Populations with Small
Samples

• In this section we consider the case in which the


population standard deviations are unknown and the
number of observations in at least one of the samples is
less than 30. We often refer to this as a "small sample
test of means“
The three required assumptions are:
• The sampled populations follow the normal
distribution.
• The two samples are from independent
population.
• The standard deviation of the two populations
are equal.
• The test statistic is the t distribution.
• The following formula is used to pool the sample
variances. Notice that two factors are involved:
the number of observations in each sample and
the sample standard deviations themselves.
• Pooled Variance :
S2p=
(n1  1) s12  (n 2  1) s 22
n1  n2  2
Where:
• s12 is the variance (standard deviation
squared) of the first sample.
• s22 is the variance of the second sample.
• The value of t is computed from the following
equation: X X1 2
t 
2 1 1
s (
p  )
n1 n2
s 2p

• Where:
• X 1 is the mean of the first sample.
• X 2 is the mean of the second sample.
• n1 is the number of observations in first
sample.
• n 2 is the number of observations in
second sample.
2
• s p is the pooled estimate of the
population variance.
• The number of degrees of freedom in the test is
the total number of items sampled minus the
total number of samples. Because there are two
samples, there are n1 + n2 - 2 degrees of
freedom.
Example: Page #417
• The production manager, at a manufacturer of
wheelchairs, wants to compare the number of
defective wheelchairs produced on the day
shift with the number on the afternoon shift. A
sample of the production from 6 day shifts
and 8 afternoon shifts revealed the following
number of defects.
Day 5 8 7 6 9 7
Afternoon 8 10 7 11 9 12 14 9
At the .05 significance level, is there a
difference in the mean number of defects
per shift?
Solution:

Step1:We state the Null and Alternate


hypotheses:
H0: 1 = 2 1= Day Shift
H1: 1 ≠ 2 2 = Afternoon shift
Step2: Select the level of significance.
 = .05
Step3: Select the test statistic. Since both σs
are unknown,
t test statistic is to be used.
Formula for t
• Step4: Formulate the decision rule.
• Df = n1 +n2 – 2.

t graph to be drawn. White board.


• if tcomp is less than - 2.179 or tcomp is greater than
2.179, H0 will e rejected, otherwise accepted.
• Step5: Calculations and Decisions:

Yes, at the .05 significance level, there is a


difference in the mean number of defects per
shift.
The test is statistically significant.
Two sample t-test(unequal population Standard
Deviations). Page # 419
• Personnel in a consumer testing laboratory are
evaluating the absorbency of paper towels. They wish to
compare a set of store brand towels to a similar group of
name brand ones. For each brand they dip a ply of the
paper into a tub of fluid, allow the paper to drain back
into the vat for two minutes, and then evaluate the
amount of liquid the paper has taken up from the vat. A
random sample of 9 Bashundhara brand paper towels
absorbed the following amounts of liquid in milliliters.
8, 8, 3, 1, 9, 7, 5, 5, 12
An independent random sample of 12 Square brand towels
absorbed the following amounts of liquid in milliliters:
12 , 11 , 10 ,6 ,8 ,9
Use the .10 significance level and test if there is a
difference in the mean amount of liquid absorbed by the
Solution:
By Comuter,
Step1:We state the Null and Alternate
hypotheses:
H0: 1 = 2 1=Square Brand
H1: 1 ≠ 2 2= Bashundhara Brand
Step2: Select the level of significance.
 = .10
Step3: Select the test statistic. Since both σs
are unknown, t test statistic is to be used.
Step4: Formulate the decision rule:
Reject H0 if computed t -value is less than p-
value. Accept H0 if computed t -value more
than p – value.
Step5: Decisions:
Since the computed value of t is less than the
p-value value, so our decision is to reject the
null hypothesis.
We conclude that the mean absorption rate for
the two towels is not the same.
HW: Self Review 11 – 4. Page# 422.
Exercise # 22 , Page# 422.

You might also like