You are on page 1of 26

Business Analytics

Business Analytics
Spring Semester-2019

Instructor : Maira Sami


Email-ID: maira@iqra.edu.pk

1
Business Analytics

Lecture # 09

Statistical inferences

2
P roba bility
• Numerical indication of how likely it is that a given
event will occur (General Definition)“hum…what’s the
probability it will rain?”
• Statistical probability:
the odds that what we observed in the sample did not
occur because of error (random and/or
systematic)“hum…what’s the probability that my results
are not just due to chance”
• In other words, the probability associated with a statistic
is the level of confidence we have that the sample group
that we measured actually represents the total population
Chain of Reasoning for
Inferential Statistics

Selection
Sample
Population

Me a s ure
Inference
Probability

4
Hypothesis Tests
• In hypothesis testing we begin by making a
tentative conjecture about a population
parameter.
• This tentative conjecture is called the null
hypothesis and is denoted by Ho.
• Then define another hypothesis, called the
alternative hypothesis, which is the opposite
of what is stated in the null hypothesis. The
alternative hypothesis is denoted by Ha .
5
Developing Null & Alternative Hypothesis
• Care must be taken to structure the hypotheses appropriately
so that the hypothesis testing conclusion provides the
information the researcher or decision maker wants.
• The context of the situation is very important in determining
how the hypotheses should be stated
• All hypothesis testing applications involve collecting a random
sample and using the sample results to provide evidence for
drawing a conclusion.
• Good questions to consider when formulating the null and
alternative hypotheses are, What is the purpose of collecting
the sample? What conclusions are we hoping to make?

6
Inferential Statistics: uses sample data
to evaluate the credibility of a hypothesis
about a population

NULL Hypothesis:

NULL (nullus - latin): “not any”  no


differences between means

H0 : m1 = m2

Always testing the null hypothesis “H- Naught”


Inferential statistics: uses sample data to
evaluate the credibility of a hypothesis
about a population

Hypothesis: Scientific or alternative


hypothesis

Predicts that there are differences


between the groups

H1 : m1 = m2
Hypothesis
A statement about what findings are expected

null hypothesis
"the two groups will not differ“

alternative hypothesis
"group A will do better than group B"
"group A and B will not perform the same"
Example:
• Consider a particular automobile that currently attains
a fuel efficiency of 24 miles per gallon for city driving.
• A product research group has developed a new fuel
injection system designed to increase the miles-per-
gallon rating.
• The group will run controlled tests with the new fuel
injection system looking for statistical support for the
conclusion that the new fuel injection system provides
more miles per gallon than the current system.

10
• Several new fuel injection units will be
manufactured, installed in test automobiles,
and subjected to research-controlled driving
conditions.
• The sample mean miles per gallon for these
automobiles will be computed and used in a
hypothesis test to determine whether it can
be concluded that the new system provides
more than 24 miles per gallon.
11
• In terms of the population mean miles per gallon µ,
the research hypothesis µ > 24 becomes the
alternative hypothesis.
• Since the current system provides an average or
mean of 24 miles per gallon, we will make the
tentative conjecture that the new system is no
better than the current system and choose µ ≤ 24
as the null hypothesis.
• The null and alternative hypotheses are as follows

12
• If the sample results lead to the conclusion to reject Ho, the
inference can be made that Ha : µ > 24 is true.
• The researchers have the statistical support to state that the
new fuel injection system increases the mean number of miles
per gallon. The production of automobiles with the new fuel
injection system should be considered.
• However, if the sample results ead to the conclusion that Ho
cannot be rejected, the researchers cannot conclude that the
new fuel injection system is better than the current system.
Production of automobiles with the new fuel injection system
on the basis of better gas mileage cannot be justified.
• Perhaps more research and further testing can be conducted.

13
Inferential Statistics

When making comparisons


btw 2 sample means there are 2
possibilities

Null hypothesis is false


Null hypothesis is true

Reject the Null hypothesis


Not reject the Null Hypothesis
Type I and Type II Errors
• The null and alternative hypotheses are competing statements
about the population.
• Either the null hypothesis H0 is true or the alternative
hypothesis Ha is true, but not both.
• Ideally the hypothesis testing procedure should lead to the
acceptance of H0 when H0 is true and the rejection of H0
when Ha is true.
• Unfortunately, the correct conclusions are not always possible.
Because hypothesis tests are based on sample information,
we must allow for the possibility of errors. Table illustrates the
two kinds of errors that can be made in hypothesis testing.

15
The first row of Table 6.6 shows what can happen
if the conclusion is to accept H0. If H0 is true, this
conclusion is correct. However, if Ha is true, we
made a Type II error; that is, we accepted H0
when it is false. The second row of Table 6.6
shows what can happen if the conclusion is to
reject H0. If H0 is true, we made a Type I error;
that is, we rejected H0 when it is true. However,
if Ha is true, rejecting H0 is correct

16
Possible Outcomes in
Hypothesis Testing (Decision)

Null is True Null is False


Correct
Accept Error
Decision
Type II Error

Correct
Reject Error
Decision
Type I Error

Type I Error: Rejecting a True Hypothesis


Type II Error: Accepting a False Hypothesis
Recall the hypothesis testing illustration in which
an automobile product research group
developed a new fuel injection system designed
to increase the miles-per-gallon rating of a
particular automobile. With the current model
obtaining an average of 24 miles per gallon, the
hypothesis test was formulated as follows:

18
• The alternative hypothesis, Ha : µ> 24, indicates that the
researchers are looking for sample evidence to support the
conclusion that the population mean miles per gallon with
the new fuel injection system is greater than 24.
• In this application, the Type I error of rejecting H0 when it is
true corresponds to the researchers claiming that the new
system improves the miles-per-gallon rating (µ> 24) when in
fact the new system is no better than the current system.
• In contrast, the Type II error of accepting H0 when it is false
corresponds to the researchers concluding that the new
system is no better than the current system (µ <=24) when in
fact the new system improves miles-per-gallon performance.

19
Hypothesis Testing - Decision
Decision Right or Wrong?
But we can know the probability of being right
or wrong

Can specify and control the probability of


making TYPE I of TYPE II Error

Try to keep it small…


ALPHA
the probability of making a type I error  depends on the
criterion you use to accept or reject the null hypothesis =
significance level (smaller you make alpha, the less likely
you are to commit error) 0.05 (5 chances in 100 that the
difference observed was really due to sampling error – 5%
of the time a type I error will occur)

Possible Outcomes in
Hypothesis Testing

Null is True Null is False

Alpha (a) Accept


Correct
Decision
Error
Type II Error

Correct
Difference observed is really Reject Error
Decision
just sampling error Type I Error

The prob. of type one error


When we do statistical analysis… if alpha
(p value- significance level) greater than 0.05

WE ACCEPT THE NULL HYPOTHESIS

is equal to or less that 0.05 we

REJECT THE NULL (difference btw means)


Two Tail

2.5% 2.5%

5% region of rejection of null hypothesis


Non directional
One Tail

5%

5% region of rejection of null hypothesis


Directional
BETA
Probability of making type II error  occurs when we fail
to reject the Null when we should have

Possible Outcomes in
Hypothesis Testing

Null is True Null is False

Beta (b) Accept


Correct
Decision
Error
Type II Error

Correct
Difference observed is real Reject Error
Decision
Failed to reject the Null Type I Error

POWER: ability to reduce type II error


POWER: ability to reduce type II error
(1-Beta) – Power Analysis

The power to find an effect if an effect is present

1. Increase our n

2. Decrease variability

3. More precise measurements

Effect Size: measure of the size of the difference


between means attributed to the treatment

You might also like