You are on page 1of 60

# Hypothesis Testing

## Hypothesis Testing and Its Relevance

Has the production quality level improved after introduction of
a new technique?
Is the new loan product selling more than the previous loan
product?
Has the customer satisfaction level dropped recently?
Has the employee attrition level this year changed from that of
the last 2 years average?
Has the new company policy lead to improvement of employee
productivity and motivation level?
Is price an important factor for purchase for a particular
customer segment or some other factor?
Price drop or variety of service - which one has more significant
(larger) effect on the sales of a product / service?
Insight
Convert the business question in the form of a
hypothesis (or theory or proposition)
Use statistical tools to test the correctness
of the hypothesis
Hypothesis Testing and Its Relevance
Problem
formulation
Statistical
Problem
formulation
Sampling and
Statistical testing
Statistical
Conclusion
conclusion
Statistical Problem Formulation
Derivation of Statistical Hypothesis (Question
/ Proposition)
Derivation of Null Hypothesis
Derivation of Alternative Hypothesis
Everyday Life
Every day we make hundreds of hypothesis
come to class and expect the seats would be there
you throw the switch and expect to ac to come on
you write with your pen and expect the writing to
appear
These are assumptions which you expect to be
true NULL HYPOTHESES
We test these ASSUMPTIONS
Null Hypothesis is an assumption we TEST
Result into failure or pass
Example 1 Point of View
Consider, a bottle of packaged drinking
water, we assuming that it has 500 ml as it is
marked 500 ml
Customers question: is there on average at
least 500 ml of water in each bottle
That is, bottle >= 500 ml
Manufacturers question: is there on average
exactly 500 ml of water in each bottle
That is, bottle = 500 ml
IMPORTANT: For the same situation two
different questions can be framed
depending upon user point of view
We are here interested in testing an
ASSUMPTION

Example 2 Assumption vs. Claim
Production manager claims that average
defect level/100 trucks in the assembly line of
trucks has reduced below 30 after a new
machine used or newly trained workmen used
Production manager is making a CLAIM and
we need to TEST this CLAIM

Defect level < 30

Assumption vs. Claim
Bottle example: testing of assumption (status
quo or existing status) that already exists

Production example: testing of claim about
something unknown (some new thing, not
status quo, changed status)
Production Example Revisited
If the production defect level is already known
as 30 (say) as certified by the Quality Dept.
and we want to test if we are still running at
that same defect level today morning, we are
then testing an assumption
Defect level = 30
Mapping of Hypotheses
Null Hypothesis
Assumption / Status Quo
It is accepted as true, but lets test if it is so
Alternative hypothesis
Claim / Unknown
It might be true, but lets test to confirm if it is so

Null Hypothesis is OPPOSITE of Alternative
Hypothesis
Both are MUTUALLY EXCLUSIVE
Null and Alternative
Only ONE item in each pair is TRUE, other one is FALSE
Null and Alternative
All statistical conclusions are made with
respect to Null Hypothesis
Reject H
0

Fail to reject H
0

We NEVER say we ACCEPT H
0

If H
0
is rejected then data supports H
1

If we test the 500ml bottle and get a sample mean
of 500.4ml. What should we conclude?
If we got 400ml?
Null Hypothesis (H
0
)
Null condition exists
Nothing new is happening
Old theory is still true
Old standard is correct
System is in control
Alternative Hypothesis (H
1
)
New theory is true
There are new standards
System is out of control
Something unexpected is happening
Generally speaking new hypothesis that
business researchers want to prove are
stated in the alternative hypothesis
Bottle Example (assumption testing)
Customers point of view (500ml bottle)
H
0
: Bottle has >= 500 ml (assumption)
H
1
: Bottle has < 500 ml

Manufacturers point of view (500ml bottle)
H
0
: Bottle has = 500 ml (assumption)
H
1
: Bottle has <> 500 ml

Production Example (claim testing)
Business context: new tool / training is
expected to improve defect level
Production Managers point of view
H
0
: Production defect level >= 30
H
1
: Production defect level < 30 (claim)

Production Example (assumption
testing version 1)
Business context: the production level running
in a stable manner no changes to any aspect,
need to see if it is really so (testing the
assumed defect level)
Same Production Managers NEW point of
view
H
0
: Production defect level = 30 (assumption)
H
1
: Production defect level <> 30
Production Example (assumption
testing version 2)
Business context: same as earlier but there is
a SUSPICION that things are not as good as
ASSUMED
Same Production Managers NEWER point of
view
H
0
: Production defect level <= 30 (assumption)
H
1
: Production defect level > 30

Example
It was reported that the % area green in BBSR in
1992 was 60%. There was a cyclone in the year
2000 and after that BBSR has experienced rapid
urbanization, construction. So it is suspected that
the % area has decreased from the original 60%.
Derive the null and alternative hypotheses for
this problem for the environment analyst.
What is the assumption / known / given here?
Example
During normal times the attrition rate in the IT
industry is around 10%. However, during the
recession a particular company fears that its
attrition rate has increased. Derive the null
and alternative hypotheses for this problem
for the environment analyst.
What is the assumption / known / given here?

Hypothesis Formulation
Depends upon
Point of view
Problem context
What is known upfront
Hypotheses
Test whether a production line process is out of control
Provide conclusive evidence that a new management
leadership approach is significantly more effective than an
old one
Verify quality claims by a parts supplier
Older workers are more loyal to a company
Implementation of Six Sigma quality approach in
manufacturing will result in greater productivity
The price of scrap metal is a good indicator of the industrial
production index six months later
Companies with more than \$1 billion of assets spend a
higher percentage of their annual budget on advertising
than do companies with less than \$1 billion of assets.

Formulate a hypothesis in a form that it can
be statistically tested
Test the hypothesis statistically after gathering
necessary evidence (data)
Interpret the results of the tests in business
terms
Which one is desirable?
to determine if their new hypothesis is
correct, they hope that the alternative
hypothesis will be proven true

But a manufacturer who is testing for process
control is most likely hoping that the
alternative hypothesis is not proven true
Sampling and Test
Collect sample from the population about which
the Hypothesis needs to be tested

Calculated the chances of getting a sample which
we get from a population having a hypothesized
mean (or proportion)

Based on the level of strictness (better known
as statistical significance) decide whether the
original hypothesis is to be rejected or not to be
rejected
Exercise

How to Decide the Outcome
When do we know if we are to REJECT or NOT
REJECT the Null Hypothesis
We REJECT when the Sample statistic (mean /
proportion) is significantly or very
different from what is expected from a
population having the hypothesized
parameter
One or Two Tailed test
Two tailed test formal
Null hypothesis: H
0
: = 2
Alternative hypothesis: H
1
: 2
Use this when in doubt about direction of test OR when
interesting in testing for bi-directional possibility

One tailed test format
Null hypothesis: H
0
: = 2
Alternative hypothesis: H
1
: > 2
Should be used when the researcher knows for certain that the
outcome of a study is going to occur only in one direction OR
he/she is interested in one direction of study
Watchwords: Older, brighter, higher, lower, greater, more, less,
etc.

Rejection and Non Rejection Regions
Rejection Region
The rejection region of a statistical hypothesis
test is the range of numbers that will lead us
to reject the null hypothesis in case the test
statistic falls within this range.
The rejection region, also called the critical
region, is defined by the critical points.
Non-rejection Region
The Non-rejection region is the range of
values (also determined by the critical points)
that will lead us not to reject the null
hypothesis if the test statistic should fall
within this region.

2 Tailed tests
H
0
: =
H0
H
1
:
H0
Example, mean bulb life is 1000 hours and we
dont want higher (cost) or lower life
(customer)

1-Tailed tests
H
0
: =
H0
Left tailed or lower
tailed
H
1
: <
H0

Example, wholesaler
rejects lot of bulbs
having life
significantly lower
than 1000 hours
Right tailed or upper
tailed
H
1
: >
H0

The Significance Level
Significant difference
between sample statistic
and hypothesized
population parameter

H0
No
significant
difference
between
sample
statistic and
hypothesized
population
parameter

Distribution to Use for Hypothesis
Testing
Population SD known Population SD NOT known
n > 30 Z table Z table
n < = 30 Z table T table
Exercise

Surprise Quiz
1. The acceptance region is the acceptance of
which type of hypothesis?
2. less than, more than type of hypothesis is
tested using one-tailed or two-tailed test?
3. <, > sign appears in null or alternative
hypothesis?
4. If alpha (significance level) for a two tailed test is
0.10 (10%) how much area fall in each tail?
5. If n (sample size) = 25 and population SD is
known which kind of distribution to be used z
or t?
Surprise Quiz
1. If n (sample size) = 35 and sample SD = 1.4
which kind of distribution to be used z or t?
2. If we want to do a 1-tailed HT using t-dist at
alpha = 0.01 when the sample size =24 what
value of t should be used?
3. If we want to do the same thing as in (2) but a
two-tailed test what value of t to be used?
4. What is the value of SE of proportions if
hypothesized proportion = 0.5, sample
proportion = 0.3 and sample size = 25?

Use of Raw and Standardized Scale for
HT
Raw scale used for the x-axis
Standardized scale used for the x-axis
Results remain same
5 Step Process for HT using
Standardized Scale
1. Decide one or two tailed test required, state
hypotheses, state level of significance ()
2. Decide which distribution to use z or t, find
critical values on the standard scale
3. Calculate SE of the sample statistic, use it to
convert Raw score to Standardized score
4. Sketch distribution and mark the critical
points, and the standardized sample score
5. Compare and conclude

Exercise

Testing of Proportions
SE of proportion =

Use Binomial distribution to construct critical
regions
But if np and nq each at least = 5, then free to
use Normal distribution (z)
Exercise

Type I and Type II Errors
Type I Error
Rejecting a null hypothesis when it is true (pessimistic!)
Innocent person sent to jail!
The probability of committing a Type I error is called , the level
of significance. i.e.
= P(Reject H
0
|H
0
is true)

Type II Error
Accepting a null hypothesis when it is false (gullible/optimistic!)
Give the benefit of the doubt! Declare guilty as innocent!
The probability of committing a Type II error is called , i.e.,
= P(Accept H
0
|H
0
is false)
Decision Table for Hypothesis Testing
Significance Level and Type I Error
High value of => high significance level =>
smaller acceptance region => higher
probability of rejecting H
0
=> Type I error

Hypothesis Testing Process
Exercise
A random sample of size 113 is taken,
resulting in a sample mean of 1215 and
population standard deviation of 100. Assume
x is normally distributed and use this
information and = 0.10 to test the following
hypothesis:
H
0
: = 1200

H
1
: 1200
Try the same test at = 0.11 = 0.12

Exercise
A survey of CPAs across the US found that the
average net income for sole proprietor CPAs is
\$74,914. Because the survey is now more than
seven years old, an accounting researcher wants
to test this figure by taking a random sample of
112 sole proprietor accountants in the US to
determine whether the net income figure
changed. Suppose the 112 CPAs who respond
produce a sample mean of \$78,695. Assume the
population SD of net incomes for sole proprietor
CPAs is \$14,530 and = 0.05
Exercise
According to the US Bureau of Labor Statistics, the
average weekly earnings of a production worker in
1997 were \$424.20. suppose a labor researcher wants
to test to determine whether this figure is still accurate
today. The researcher randomly selects 54 production
workers from across the US and obtains a
representative earnings statement for one week from
each. The resulting sample average is \$423.69, with a
SD of \$33.90. Use these data along with a 5% level of
significance to determine whether the mean weekly
earnings of a production worker have changed.
Exercise
A manufacturing firm has been averaging 18.2
orders per week for several year. However,
during a recession, orders appeared to slow.
Suppose the firms production manager
randomly samples 32 weeks and finds a
sample mean of 15.6 orders, with a sample SD
of 2.3 orders. Test to determine whether the
average number of orders is down by using
= 0.10.
Use of t-distribution
When ALL the following are true:
Sample size less than 30
Population SD not known
Underlying population is Normal or near Normal
Exercise
Suppose that in past years the average price per
square foot for warehouses in the US has been
\$32.28. A national real estate investor wants to
determine whether the figure has changed now.
The investor hires a researcher who randomly
samples 19 warehouses that are for sale across
the US and finds the mean price per square foot
is \$31.67 with an SD of \$1.29. If the researcher
uses a 5% level of significance, what statistical
conclusion can be reached? What are the
hypotheses?
Steps in Hypothesis Testing
1. State the H
0
2. State the H
1
3. Determine the appropriate test statistic and sampling
distribution to be used
4. Collect data and determine the test statistic
5. Find the acceptable and non acceptable regions based
on the level of significance and appropriate formula
for estimation population SD(s) and SE of the statistic
6. Find where the test statistic falls
7. Conclude if H
0
is to be accepted or rejected
Two Sample Hypothesis Testing
Testing of difference between means
SE of the difference between mean can be
calculated using when sample sizes are > 30

When sample sizes are <= 30 then use t-dist
assuming population variances are equal. The d.f. =
n
1
+n
2
-2

Exercise
A business analyst is testing whether there is
difference in the average wage of an advertising
manager and an auditing manager. A random
sample of 32 advertising managers from across
mean salary of 70.7 (in \$1000) and SD of 16.253
was observed. A similar random sample of 34
salary. A mean salary of 62.187 (in \$1000) and SD
of 12.90 was observed. Test the analysts
hypothesis at level of significance, = 0.05
Exercise
Now that the business analyst knows that
there is significant difference is salary of the
common sense (by looking at the two sample
data) she feels that the advertising managers
earn more, on the average, than do auditing
managers. Please confirm this using statistical
tests at same significance level as earlier.

Small samples
Exercise
A coffee manufacturer is interested in finding if there is any
difference in the average daily coffee consumption of
regular-coffee drinkers and decaffeinated-coffee drinkers.
Its researcher randomly selects 13 regular-coffee drinkers
and asks how many cups of coffee per day they drink. He
randomly locates 15 decaffeinated-coffee drinkers and asks
how many cups of coffee per day they drink. The average
for the regular coffee drinkers in 4.35 cups, with an SD of
1.2 cups. The average for the decaffeinated-coffee drinkers
is 6.84 cups, with an SD of 1.42 cups. The researcher
assumes, for each population, that the daily consumption is
normally distributed, and he does a test at 5% significance
level to find out if there is difference in the population
averages.