0% found this document useful (0 votes)
169 views36 pages

Unit3 Inferentialnew

Uploaded by

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

Unit3 Inferentialnew

Uploaded by

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

UNIT III INFERENTIAL STATISTICS

Populations – samples – random sampling – Sampling distribution- standard error of the mean -
Hypothesis testing – z-test – z-test procedure –decision rule – calculations – decisions – interpretations -
one-tailed and two-tailed tests – Estimation – point estimate – confidence interval – level of confidence –
effect of sample size.
Contents
3.1 Populations
3.2 samples
3.2.1.Random Sampling
3.2.2.Random Assignment
3.3 Sampling distribution
3.4 Standard error of the mean
3.5 Hypothesis testing
3.6 Z-test
3.7 Decision rule
3.8 Possibility of incorrect decisions
3.9 One-tailed and two-tailed tests
3.10 Estimation
3.11 confidence interval
3.12 Effect of Sample Size
INFERENTIAL STATISTICS

3.1. Populations
Any complete set of observations (or potential observations) may be characterized as a population.
Accurate descriptions of populations specify the nature of the observations to be taken. In other terms, the
entire set of individuals, objects, or events that you're interested in studying. For example, if you're
studying the heights of all adult males in a country, the population would be all adult males in that
country.
3.1.1. Real Populations
A real population is one in which all potential observations are accessible at the time of sampling.
Examples of real populations include the ages of all visitors to Taj mahal on a given day, the annual
incomes of all residents in a specific city, and blood pressure measurements of all patients at a hospital.
3.1.2 .Hypothetical population
A hypothetical population is one in which all potential observations are not accessible at the time of
sampling. Hypothetical populations are theoretical constructs that may not exist in reality but are useful
for conceptual or theoretical purposes. Examples are Heights of all students in a school that will be
attending college in 10 years, annual salary expectations of unborn children born to current employees of
a company, and performance scores of students who will attend a university that has not yet been
established
According to the rules of inferential statistics, generalizations should be made only to real
populations that have been sampled. Generalizations to hypo-thetical populations should be viewed,
therefore, as provisional conclusions based on the wisdom of the researcher rather than on any logical or
statistical necessity.
3.2. Samples
Any subset of observations from a population may be characterized as a sample. In typical applications of
inferential statistics, the sample size is small relative to the population size.
Optimal Sample Size: Determining the best or optimal sample size for any particular situation. Often
sample sizes are in the hundreds or even the thousands for surveys, but they are less than 100 for most
experiments.
Example:
Imagine a very simple population consisting of only five observations: 2, 4, 6, 8, 10.
(a) List all possible samples of size two.
(b) Construct a relative frequency table showing the sampling distribution of the mean.

Answers. (a)
(1) 2,2 =2 (6) 4,2 =6 (11) 6,2 =4 (16) 8,2 =5 (21) 10,2=6
(2) 2,4 =3 (7) 4,4 =4 (12) 6,4 =5 (17) 8,4 =6 (22) 10,4=7
(3)2,6=4 (8)4,6=5 (13)6,6=6 (18)8,6=7 (23)10,6=8
Fundamentals of Data Science and Analytics
(4)2,8=5 (9)4,8=6 (14)6,8=7 (19)8,8=8 (24)10,8=9
(5)2,10=6 (10)4,10=7 (15)6,10=8 (20)8,10=9 (25)10,10=10
(2,2)=(2+2)/2=2, (2,4)=(2+4)/2=3 , (2,6)=(2+6)/2=8/2=4 ……..

3.2.1. Random sampling


The valid use of techniques from inferential statistics requires that samples be random.
Random sampling occurs if, at each stage of sampling, the selection process guarantees that all
potential observations in the population have an equal chance of being included in the sample.
(i)Tables of random numbers can be used to obtain a random sample
Many pollsters use random digit dialing in an effort to give each telephone number—whether landline or
wireless—in the United States an equal chance of being called for an interview. Essentially, the first six
digits of a 10-digit phone number, including the area code, are randomly selected from tens of thousands
of telephone exchanges, while the final four digits are taken directly from random numbers.
3.2.2. Random Assignment of Subjects
A procedure designed to ensure that each subject has an equal chance of being assigned to any group in
an experiment. Random assignment is a crucial concept in experimental design, particularly in fields like
psychology and medicine. It involves assigning subjects to different experimental groups in a random
manner to ensure that each subject has an equal chance of being assigned to any of the groups. This helps
to minimize bias and ensures that any differences observed between groups can be attributed to the
treatment or intervention being studied rather than to pre-existing differences between the subjects
Random sampling—that all subjects in the population have an equal opportunity of being sampled.
Random assignment—that all subjects have an equal opportunity of being assigned to each of the various
groups.
Surveys or Experiments?
In the case of surveys, the object is to obtain a random sample from some real population. In the case of
experiments, the objective is to obtain, at the outset of the experiment, equivalent groups whose
membership has been determined by chance.
INFERENTIAL STATISTICS

Random sampling occurs in well-designed surveys, and random assignment occurs in well-designed
experiments.
IMPORTANT TERMS
a)Probability :The proportion or fraction of times that a particular event is likely to occur
By using two rules—the addition and multiplication rules—for combining the probabilities of various
simple events.
Mutually Exclusive Events : Events that cannot occur together
The addition rule tells us to add together the separate probabilities of several mutually exclusive events in
order to find the probability that any one of these events will occur. Stated generally, the addition rule
reads:
(i)Addition Rule for Mutually Exclusive Events
Pr(A or B )= Pr(A) +Pr(B)
where Pr( ) refers to the probability of the event in parentheses and A and B are mutually exclusive events
(ii)Multiplication Rule
Independent Events The occurrence of one event has no effect on the probability that the other event will
occur
Multiplication Rule Multiply together the separate probabilities of several independent events to find the
probability that these events will occur together
Multiplication Rule for Independent Event
Pr(A and B )=[ Pr(A) ] [Pr(B)]
where A and B are independent events.
Dependent Event
When the occurrence of one event affects the probability of the other event, these events are
dependent. Although the heights of randomly selected pairs of men are independent, the heights of
brothers are dependent.
b)Conditional Probability
The probability of one event, given the occurrence of another event. It is denoted as P(A|B), read
as "the probability of event A given event B." Conditional probability is calculated by dividing the
probability of the intersection of events A and B by the probability of event B. For example, if we want
to find the probability of drawing a red card from a standard deck of cards given that the card drawn is a
face card (i.e., conditional probability of drawing a red card given that it's a face card), we would
calculate it as the probability of drawing a red face card divided by the probability of drawing any face
card.
3.3. Sampling Distribution
Fundamentals of Data Science and Analytics

The sampling distribution of the mean refers to the probability distribution of means for all possible
random samples of a given size from some population. This refers to the distribution of a specific statistic
(such as the mean, standard deviation, etc.) calculated from different samples of the same size taken from
the population. Each sample will produce a different value for the statistic, and the distribution of these
values is called the sample distribution.
Example 1: If you were to take multiple random samples of 100 adults from the population and calculate
the mean height of each sample, will get a range of mean heights. The distribution of these mean heights
is the sample distribution of the mean.

Fig.3.3.1.Graph of miniature population

Table 3.3.Sampling Distribution


INFERENTIAL STATISTICS

To minimize confusion, the latter term, σ X, is often referred to as the standard error of the mean or simply
as the standard error.
Mean of all Sample Means ( μ x)
The distribution of sample means itself has a mean. The mean of the sampling distribution of the mean
always equals the mean of the population

Since the mean of all sample means (μX) always equals the mean of the population (μ), these two terms
are interchangeable in inferential statistics. Any claims about the population mean can be transferred
directly to the mean of the sampling distribution, and vice versa.
Example 1.Indicate whether the following statements are True or False. The mean of all sample means, μ X, . . .
(a) always equals the value of a particular sample mean.
(b) equals 100 if, in fact, the population mean equals 100.
(c) usually equals the value of a particular sample mean.
(d) is interchangeable with the population mean.
Answers
(a)False. It always equals the value of the population mean.
(b) True
(c) False. Because of chance, most sample means tend to be either larger or smaller than the mean of all sample
means.
(d) True
Fundamentals of Data Science and Analytics

3.4 Standard Error of The Mean ( σX )


The distribution of sample means also has a standard deviation, referred to as the standard error of the
mean. The standard error of the mean equals the standard deviation of the population divided by the
square root of the sample size.

where σX represents the standard error of the mean; σ represents the standard deviation of the population;
and n represents the sample size.
Example 1. Indicate whether the following statements are True or False. The standard error of the mean,
X,...
(a) roughly measures the average amount by which sample means deviate from the population mean
(b) measures variability in a particular sample.
(c) increases in value with larger sample sizes.
(d) equals 5, given that σ = 40 and n = 64
Answer:
a)True
(b) False. It measures variability among sample means.
(c) False. It decreases in value with larger sample sizes.
(d) True [40/√ 64=40/8=5]
3.4.1 Shape of The Sampling Distribution
The central limit theorem states that, regardless of the shape of the population, the shape of the sampling
distribution of the mean approximates a normal curve if the sample size is sufficiently large.

Fig.3.3 Effect of the Central Limit Theorem


INFERENTIAL STATISTICS

If the shape of the parent population is normal, then any sample size (even a sample size of one) will be sufficiently
large. Otherwise, depending on the degree of non-normality in the parent population, a sample size between 25 and
100 is sufficiently large.

Example 1.
Indicate whether the following statements are True or False. The central limit theorem
(a) states that, with sufficiently large sample sizes, the shape of the population is normal. (b) states that,
regardless of sample size, the shape of the sampling distribution of the mean is normal.
(c) ensures that the shape of the sampling distribution of the mean equals the shape of the population.
(d) applies to the shape of the sampling distribution—not to the shape of the population and not to the
shape of the sample
Answers:
(a) False. The shape of the population remains the same regardless of sample size.
(b) False. It requires that the sample size be sufficiently large—usually between 25 and 100.
(c) False. It ensures that the shape of the sampling distribution approximates a normal curve, regardless of the
shape of the population (which remains intact).
(d) True

3.5.Introduction to Hypothesis Testing: The z-Test

The z-test is a statistical method used to determine whether there is a significant difference between the
means of two groups when the population standard deviation is known and the sample size is large
(typically n > 30). It's often used when comparing sample means to a known population mean or when
comparing two independent sample means.
Common Outcomes : An observed sample mean qualifies as a common outcome if the difference between
its value and that of the hypothesized population mean is small enough to be viewed as a probable
outcome under the null hypothesis.

Rare Outcomes : An observed sample mean qualifies as a rare outcome if the difference between its value
and the hypothesized population mean is too large to be reasonably viewed as a probable outcome under
the null hypothesis
Fundamentals of Data Science and Analytics

3.6 Z Test for A Population Mean

Sampling Distribution of z The distribution of z values that would be obtained if a value of z were
calculated for each sample mean for all possible random samples of a given size from some population
The shift from X to z eliminates the original units of measurement and standardizes the hypothesis test
across all situations without, however, affecting the test results
To convert a raw score into a standard score , express the raw score as a distance from its mean (by
subtracting the mean from the raw score), and then split this distance into standard deviation units (by
dividing with the standard deviation). Expressing this definition as a word formula, we have

raw score−mean
Standard score=
standard deviation

Fig.3.5.Common and rare outcomes(values of z)

Assumptions of z Test

When a hypothesis test evaluates how far the observed sample mean deviates, in standard error units,
from the hypothesized population mean, it is referred to as a z test or, more accurately, as a z test for a
population mean

Here's how the z-test works:

1.Formulate Hypotheses: Start by stating your null hypothesis (H0) and alternative hypothesis (H1).
Typically, the null hypothesis states that there is no difference between the means, while the alternative
hypothesis suggests there is a significant difference.

2.Calculate the Test Statistic (z-score):


INFERENTIAL STATISTICS

Where
x is the sample mean,
μ is the population mean,
σ is the population standard deviation,
n is the sample size.

3.Determine the Critical Value: Based on your significance level (α), find the critical value from the
standard normal distribution table.

4.Compare the Test Statistic and Critical Value: If the absolute value of the test statistic is greater than the
critical value, you reject the null hypothesis in favor of the alternative hypothesis. If it's not, you fail to
reject the null hypothesis.

5.Draw Conclusion: Based on your comparison, conclude whether there is a significant difference
between the means of the two groups.

Step 1: Formulate Hypotheses

1.a.Null Hypothesis (H0)

A statistical hypothesis that usually asserts that nothing special is happening with respect to some
characteristic of the underlying population.In the test with SAT scores, the null hypothesis asserts that,
with respect to the national average of 500, nothing special is happening to the mean score for the local
population of freshmen.

H0 : µ= 500

where H0 represents the null hypothesis and μ is the population mean for the local freshman class.

1.b.Alternative Hypothesis (H1)


Fundamentals of Data Science and Analytics

The alternative hypothesis (H1) asserts the opposite of the null hypothesis. A decision to retain the null
hypothesis implies a lack of support for the alternative hypothesis, and a decision to reject the null
hypothesis implies support for the alternative hypothesis.

H1 :µ≠ 500

where H1 represents the alternative hypothesis, μ is the population mean.

H1 usually is identified with the research hypothesis, the informal hypothesis or hunch that, by implying
the presence of something special in the underlying population, serves as inspiration for the entire
investigation

Example:

First using words, then symbols, identify the null hypothesis for each of the following situations. (Don’t
concern yourself about the precise form of the alternative hypothesis at this point.)

(a) A school administrator wishes to determine whether sixth-grade boys in her school district differ, on
average, from the national norms of 10.2 pushups for sixth-grade boys.

(b) A consumer group investigates whether, on average, the true weights of packages of ground beef sold
by a large supermarket chain differ from the specified 16 ounces.

(c) A marriage counselor wishes to determine whether, during a standard conflict-resolution session, his
clients differ, on average, from the 11 verbal interruptions reported for “well-adjusted couples.”

Answers:

(a) Sixth-grade boys in her school district average 10.2 pushups. H0: μ = 10.2

(b) On average, weights of packages of ground beef sold by a large supermarket chain equal 16 ounces.
H0: μ = 16

(c) The marriage counselor’s clients average 11 interruptions per session. H0: μ = 11
Step 2: Converting a Sample Mean to z
Replace the raw score with the one observed sample mean X; replace the mean with the mean of the
sampling distribution, that is, the hypothesized population mean μhyp; and replace the standard deviation
with the standard error of the mean . Now
INFERENTIAL STATISTICS

where z indicates the deviation of the observed sample mean in standard error units, above or below the
hypothesized population mean.
Example 1: To test the hypothesis for SAT scores, we must determine the value of z from above formula.
Given a sample mean of 533, a hypothesized population mean of 500, and a standard error of 11, we find
533−500 33
z= = =3
11 11
The observed z of 3 exceeds the value of 1.96 specified in the hypothesized sampling distribution in
Fig.3.5.Thus, the observed z qualifies as a rare outcome under the null hypothesis, and the null hypothesis
is rejected. The results of this test with z are the same as those for the original hypothesis test with X
This z test is accurate only when
(1) the population is normally distributed or the sample size is large enough to satisfy the requirements of
the central limit theorem and
(2) the population standard deviation is known

Example:
Calculate the value of the z test for each of the following situations:
(a) x=566 , σ =30 , n=36 , μhyp −560
x −μ ~
~ 566−560 6
Z= 6
σ = 30 = 30 = =1.20
5
√n √ 36 6

(b) x=24 , σ=4 , n=64 , μ hyp−25


24−25 −1
−1
Z= 4 = 4 = = -2.00
0.5
√64 8

(c) x=82 , σ =14 , n=49 , μ hyp−75


82−75 7
7
Z= 14 = 14 = = 3.50
2
√ 49 7

(d) x=136 , σ =15 , n=25 , μhyp−146


Fundamentals of Data Science and Analytics
136−146 −10
−10
Z= 15 = 15 = = -3.33
3
√25 5

3.7 Decision Rule


A decision rule specifies precisely when H0 should be rejected (because the observed z qualifies as a rare
outcome).Fig.3.5.specifies that H0 should be rejected if the observed z equals or is more positive than
1.96 or if the observed z equals or is more negative than –1.96. Conversely, H0 should be retained if the
observed z falls between ± 1.96.
Step 3:
Critical z Scores
A z score that separates common from rare outcomes and hence dictates whether H0 should be retained or
rejected
Level of Significance (α)
Fig 3.7 also indicates the proportion (.025+.025= .05) of the total area that is identified with rare
outcomes. Often referred to as the level of significance of the statistical test, this proportion is symbolized
by the Greek letter α (alpha) and the level of significance, α, equals .05

Fig 3.7 Proportions of area associated with common and rare outcomes ( α= 05)
The level of significance (α) indicates the degree of rarity required of an observed outcome in order to
reject the null hypothesis (H0) .For instance, the .05 level of significance indicates that H0 should be
rejected if the observed z could have occurred just by chance with a probability of only .05 (one chance
out of twenty) or less
Step 4:
Calculations:
Given a sample mean of 533, a hypothesized population mean of 500, and a standard error of 11, we find
INFERENTIAL STATISTICS

533−500 33
z= = =3
11 11
The observed z of 3 exceeds the value of 1.96 specified in the hypothesized sampling distribution in
Figure.
Step 5:
Decision
Either retain or reject H0, depending on the location of the observed z value relative to the critical z
values specified in the decision rule. According to the present rule, H0 should be rejected at the .05 level
of significance because the observed z of 3 exceeds the critical z of 1.96 and, therefore, qualifies as a rare
outcome, that is, an unlikely outcome from a population centered about the null hypothesis.
The decision should be either retain or reject H0.
Reject H0 only if the observed value of z equals or is more positive than the upper critical z (1.96) or if it
equals or is more negative than the lower critical z (–1.96)
Retain H0 if the observed z falls between ± 1.96
Example :
For each of the following situations, indicate whether H0 should be retained or rejected and justify your
answer by specifying the precise relationship between observed and critical z scores. Should H0 be
retained or rejected, given a hypothesis test with critical z scores of ± 1.96 and (a) z = 1.74 (b) z = 0.13
(c) z = –2.51
(a) Retain H0 at the .05 level of significance because z = 1.74 is less positive than 1.96. (b) Retain H0 at
the .05 level of significance because z = 0.13 is less positive than 1.96. (c) Reject H0 at the .05 level of
significance because z = −2.51 is more negative than
–1.96.
Interpretation
Finally, interpret the decision in terms of the original research problem. In the present example, it can be
concluded that, since the null hypothesis was rejected, the mean SAT math score for the local freshman
class probably differs from the national average of 500.

When testing a hypothesis, adopt the following step-by-step procedure:


■ State the research problem. Using words, state the problem to be resolved by the investigation
■ Identify the statistical hypotheses. The statistical hypotheses consist of a null hypothesis (H0) and an
alternative (or research) hypothesis (H1).
The null hypothesis supplies the value about which the hypothesized sampling distribution is centered.
Depending on the outcome of the hypothesis test, H0 will either be retained or rejected.
H0:µ=some number
H1:µ not equals to some number
Fundamentals of Data Science and Analytics

Specify a decision rule: This rule indicates precisely when H0 should be rejected.
The exact form of the decision rule depends on several factors. In any event, H0 is rejected whenever the
observed z deviates from 0 as far as, or farther than, the critical z does. The level of significance indicates
how rare an observed z must be (assuming that H0 is true) before H0 can be rejected
Calculate the value of the observed z: Express the one observed sample mean as an observed z.
Make a decision: Either retain or reject H0 at the specified level of significance, justifying this decision
by noting the relationship between observed and critical z scores.
Interpret the decision: Using words, interpret the decision in terms of the original research problem

Example 1:
According to the American Psychological Association, members with a doctorate and a full-time teaching
appointment earn, on the average, $82,500 per year, with a standard deviation of $6,000. An investigator
wishes to determine whether $82,500 is also the mean salary for all female members with a doctorate and
a full-time teaching appointment. Salaries are obtained for a random sample of 100 women from this
population, and the mean salary equals $80,100.
(a) Someone claims that the observed difference between $80,100 and $82,500 is large enough by itself to
support the conclusion that female members earn less than male members. Explain why it is important to
conduct a hypothesis test.
INFERENTIAL STATISTICS

(b) The investigator wishes to conduct a hypothesis test for what population?
(c) What is the null hypothesis, H0 ?
(d) What is the alternative hypothesis, H1 ?
(e) Specify the decision rule, using the .05 level of significance.
(f) Calculate the value of z. (Remember to convert the standard deviation to a standard error.)
(g) What is your decision about H0 ?
(h) Using words, interpret this decision in terms of the original problem
Answer:
a) The observed difference between $80,100 and $82,500 cannot be interpreted at face value, as it could
have happened just by chance. A hypothesis test permits us to evaluate the effect of chance by measuring
the observed difference relative to the standard error of the mean.
(b) All female members of the APA with a Ph.D. degree and a full-time teaching appointment
c)H0: μ = 82,500
d)H1: μ≠ 82,500
e) Reject H0 at the .05 level of significance if z ± 1.96
f) Calculations
σ
σx=
√n
6000 6000
σx= = =600
√100 10
80,000−82,500 −2400
z= = =-4.00
600 600
g) Reject H0 at the .05 level of significance because z = –4.00 is more negative than –1.96.
h) The average salary of all female APA members (with a Ph.D. and a full-time teaching appointment) is
less than $82,500.

Example 2:
For the population at large, the Wechsler Adult Intelligence Scale is designed to yield a normal
distribution of test scores with a mean of 100 and a standard deviation of 15. School district officials
wonder whether, on the average, an IQ score different from 100 describes the intellectual aptitudes of all
students in their district. Wechsler IQ scores are obtained for a random sample of 25 of their students, and
the mean IQ is found to equal 105. Using the step-by-step procedure described in this chapter, test the
null hypothesis at the .05 level of significance.
a) Research Problem:
Does the mean IQ of all students in the district differ from 100?
b)Statistical Hypotheses
Fundamentals of Data Science and Analytics

H0: μ = 100
H1: μ≠ 100
c)Decision Rule
Reject H0 at the .05 level of significance if z equals or is more positive than 1.96 or if z equals or is more
negative than –1.96.
d) Calculations
Given that X = 105
15 15
σx= = =3
√25 5
105−100 5
z= = =1.67
3 3
e) Decision
Retain H0 at the .05 level of significance because z = 1.67 is less positive than 1.96
f) Interpretation
There is no evidence that the mean IQ of all students differs from 100
3.8 Possibility of Incorrect Decisions
Having made a decision about the null hypothesis, we never know absolutely whether that decision is
correct or incorrect, unless, of course, we survey the entire population. Even if H0 is true (and, therefore,
the hypothesized distribution of z about H0 also is true), there is a slight possibility that, just by chance,
the one observed z actually originates from one of the shaded rejection regions of the hypothesized
distribution of z, thus causing the true H0 to be rejected. This type of incorrect decision—rejecting a true
H0—is referred to as a type I error or a false alarm.
A most unfortunate consequence of this strategy, however, is that no H0, not even a radically false H0,
ever would be rejected. This second type of incorrect decision—retaining a false H0—is referred to as a
type II error or a miss.

Fig 3.8. Proportions of area associated with common and rare outcomes
Minimizing Incorrect Decisions
INFERENTIAL STATISTICS

i)If H0 is true, there is a high probability that the observed z will qualify as a common outcome under the
hypothesized sampling distribution and that the true H0 will be retained.
ii)If H0 is seriously false, because the hypothesized population mean differs considerably from the true
population mean, there is also a high probability that the observed z will qualify as a rare outcome under
the hypothesized distribution and that the false H0 will be rejected.
(In the above Figure, this probability can’t be determined)
Even though we never really know whether a particular decision is correct or incorrect, it is reassuring
that in the long run, most decisions will be correct— assuming the null hypotheses are either true or
seriously false.
Strong or Weak Decisions
Retaining H0 Is a Weak Decision
Rejecting H0 Is a Strong Decision.
the decision to retain H0 implies not that H0 is probably true, but only that H0 could be true, whereas the
decision to reject H0 implies that H0 is probably false (and that H1 is probably true).
Because the research hypothesis is identified with the alternative hypothesis, the decision to reject the null
hypothesis, should it be made, will provide strong support for the research hypothesis, while the decision
to retain the null hypothesis, should it be made, will provide, at most, weak support for the null
hypothesis.
Rejecting H0 implies that it probably is false, while retaining H0 implies only that it might be true
3.9 One-Tailed and Two-Tailed Tests
Two-Tailed or Non directional Test Rejection regions are located in both tails of the sampling
distribution.
H1: μ≠ 500

Fig.3.9a. Two-Tailed or Non directional Test

Fig.3.9.a shows rejection regions that are associated with both tails of the hypothesized sampling
distribution. The corresponding decision rule, with its pair of critical z scores of ±1.96, is referred to as a
two-tailed or non-directional test.
Fundamentals of Data Science and Analytics

One-Tailed or Directional Test Rejection region is located in just one tail of the sampling distribution.

Fig.3.9.b. One-Tailed or Directional Test (Lower tail critical)

H1: μ≤ 500
The corresponding decision rule, with its critical z of –1.65, is referred to as a one-tailed or directional
test with the lower tail critical.

One-Tailed Test (Upper Tail Critical)


Fig illustrates a one-tailed or directional test with the upper tail critical. This one-tailed test is the mirror
image of the previous test. Now the alternative hypothesis reads:
H1: μ> 500
and its critical z equals 1.65. This test is specially designed to detect only whether the population mean
math score for all local freshmen exceeds the national average.

Fig.3.9.c. One-Tailed Test (Upper Tail Critical)

One or Two Tails?


Before a hypothesis test, if there is a concern that the true population mean differs from the hypothesized
population mean only in a particular direction, use the appropriate one-tailed or directional test for extra
sensitivity. Otherwise, use the more customary two-tailed or non-directional test.
In the absence of compelling reasons for a one-tailed test, use a two-tailed test
INFERENTIAL STATISTICS

Example:
For each of the following situations, indicate whether H0 should be retained or rejected. Given a one-
tailed test, lower tail critical with α = .01, and
(a) z = – 2.34
Reject H0 at the .01 level of significance because z = –2.34 is more negative than –2.33
(b) z = – 5.13
Reject H0 at the .01 level of significance because z = –5.13 is more negative than –2.33. (c) z = 4.04
Retain H0 at the .01 level of significance because z = 4.04 is less negative than –2.33. (The value of the
observed z is in the direction of no concern.)

Given a one-tailed test, upper tail critical with α = .05, and (d) z = 2.00
Reject H0 at the .05 level of significance because z = 2.00 is more positive than 1.65.
(e) z = – 1.80

Retain H0 at the .05 level of significance because z = –1.80 is less positive than 1.65. (The value of the
observed z is in the direction of no concern.)
(f) z = 1.61
Retain H0 at the .05 level of significance because z = 1.61 is less positive than 1.65.

Choosing a Level of Significance (α )


The level of significance also spotlights an inherent risk in hypothesis testing, that is, the risk of rejecting
a true H0. When the level of significance equals .05, there is a probability of .05 that, even though H0 is
true, the observed z will stray into the rejection region and cause the true H0 to be rejected.
Unless there are obvious reasons for selecting either a larger or a smaller level of significance, use the
customary .05 level—the largest level of significance reported in most professional journals. When
testing hypotheses with the z test, you may find it helpful to refer to following Table , which lists the
critical z values for one- and two-tailed tests at the .05 and .01 levels of significance.
Fundamentals of Data Science and Analytics

Table 1. Critical z values (Testing a hypothesis about vitamin c)

Testing A Hypothesis About Vitamin C


The four possible outcomes of a hypothesis test by focusing on a study to determine whether vitamin C
increases the intellectual aptitude of high school students.
■ If H0 really is true, it is a correct decision to retain the true H0.
■ If H0 really is true, it is a type I error to reject the true H0.
■ If H0 really is false, it is a type II error to retain the false H0.
■ If H0 really is false, it is a correct decision to reject the false H0.
Furthermore, given our exclusive concern about detecting only any deviation of the population mean
above 100, the null hypothesis takes the form appropriate for a one-tailed test with the upper tail critical,
namely:
H0: µ≤100
The rejection of H0 would support H1, the research hypothesis that something special is happening in the
underlying population (because vitamin C increases intellectual aptitude), namely
H0: µ> 100
z Test Is Appropriate To determine whether the sample mean IQ for the 36 students qualifies as a
common or a rare outcome under the null hypothesis, a z test will be used. The z test for a population
mean is appropriate since, for IQ scores, the population standard deviation is known to be 15 and the
shape of the population is known to be normal.
INFERENTIAL STATISTICS

When generalizing beyond the existing data, there is always the possibility of a type I or type II error. At
best, a hypothesis test tends to produce a correct decision when either H0 really is true or H0 really is
false because of a large effect. If H0 really is true, the probability of a type I error, α, equals the level of
significance, and the probability of a correct decision equals 1 − α. If H0 really is false, the probability of
a type II error, β, and the probability of a correct decision, 1 − β, depend on the size of the effect—that is,
the difference between the true and the hypothesized population means. The larger the effect, the lower
the probability of a type II error and the higher the probability of a correct decision.

i) If H0 Really Is True
Assume that H0 really is true because vitamin C doesn’t increase the population mean IQ.
a. Probability of a Type I Error
Fundamentals of Data Science and Analytics

Fig 3.9 i Hypothesized and true sampling distribution when H0 is true (because vitamin C causes no
increase in IQ).
Its z value equals or exceeds 1.65, and hence H0 is rejected. Because H0 really is true, this is an
incorrect decision or type I error—a false alarm, announced as evidence that vitamin C increases IQ, even
though it really does not. The probability of a type I error equals alpha (α), the level of significance. (The
level of significance, remember, indicates the proportion of the total area of the sampling distribution in
the rejection region for H0.) In the present case, the probability of a type I error equals .05, as indicated
b.Probability of a Correct Decision
Z value is less than 1.65 and H0 is retained. Because H0 really is true, this is a correct decision—announced as a
lack of evidence that vitamin C increases IQ. The probability of a correct decision equals 1 − α, that is, .95.
Note
Reminder: If H0 is false and an error is committed, it must be a type II error
c. Reducing the Probability of a Type I Error
If H0 really is true, the present test will produce a correct decision with a probability of .95 and a type I error with
a probability of .05.
d.True H0 Usually Retained
If H0 really is true, the probability of a type I error, α, equals the level of significance, and the probability of a
correct decision equals 1 − α.
ii)If H0 Really Is False because of A Large Effect
Assume that H0 really is false because vitamin C increases the population mean by not just a few points, but by
many points
INFERENTIAL STATISTICS

Fig 3.9.ii.Hypothesized and true sampling distribution when H0 is false because of a large effect
Since any difference between a true and a hypothesized population mean is referred to as an effect. If H0 really is
false, because of the relatively large ten-point effect of vitamin C on IQ.
a)Hypothesized Sampling Distribution
Centered about the hypothesized population mean of 100, this distribution is used to generate the decision rule.
Once the decision rule has been identified, attention shifts from the hypothesized sampling distribution to the true
sampling distribution.
c)True Sampling Distribution
Centered about the true population mean of 110 (which reflects the ten-point effect, that is, 100 + 10 = 110), the
true sampling distribution serves as the parent distribution for the one randomly selected sample mean (or z) that
will be observed in the experiment.
d)Low Probability of a Type II Error for a Large Effect
When, just by chance, a randomly selected sample mean originates from the very small black portion of the true
sampling distribution of the mean, its z value is less than 1.65, and therefore, in compliance with the decision rule,
H0 is retained. Because H0 really is false, this is an incorrect decision or type II error—a miss, announced as a lack
of evidence that vitamin C increases IQ, even though, in fact, it does. With the aid of tables for the normal curve, it
can be demonstrated that in the present case, the probability of a type II error, symbolized by the Greek letter beta
( ß), equals .01
e)High Probability of a Correct Decision for a Large Effect
When, just by chance, a sample mean originates from the large shaded portion of the true sampling distribution, its
z value equals or exceeds 1.65, and H0 is rejected. Because H0 really is false, this is a correct decision—announced
as evidence that vitamin C increases IQ.
Reminder:
If H0 is false and an error is committed, it must be a type II error
iii)If H0 Really Is False Because of A Small Effect
Fundamentals of Data Science and Analytics

Fig 3.9ii) Hypothesized and true sampling distribution when H0 is false because of a large effect

Rejection of False H0 Depends on Size of Effect If H0 really is false, the probability of a type II error, β, and the
probability of a correct decision, 1 − ß, depend on the size of the effect, that is, the difference between the true and
the hypothesized population means. The smaller the effect, the higher the probability of a type II error and the
lower the probability of a correct decision.

High Probability of a Correct Decision for a Large Effect


Low Probability of a Correct Decision for a Small Effect
a)Rejection of False H0 Depends on Size of Effect
If H0 really is false, the probability of a type II error, β, and the probability of a correct decision, 1 − ß, depend on
the size of the effect, that is, the difference between the true and the hypothesized population means. The smaller
the effect, the higher the probability of a type II error and the lower the probability of a correct decision.
Influence Of Sample Size
To increase the probability of detecting a false H0, increase the sample size. Assuming that vitamin C still has only
a small three-point effect on IQ, check the properties of the projected one-tailed test when the sample size is
increased from 36 to 100 students. Recall the formula for the standard error of the mean, x, namely

For the original experiment with its sample size of 36 is σ=2.5


Clearly, any increase in sample size causes a reduction in the standard error of the mean.
INFERENTIAL STATISTICS

Fig.3.9. iii) Hypothesized and true sampling distribution when H0 is false because of a small effect but
sample size is relatively large.
Samples Can Be Too Large
the sample size always should be as large as possible in order to maximize the detection of a false H0.
Neither Too Large Nor Too Small
Statistics supplies investigators with charts, often referred to as power curves, to help select the appropriate sample
size for a particular experiment
Power and Sample Size
The power of a hypothesis test equals the probability (1 − ß) of detecting a particular effect when the null
hypothesis (H0) is false. Power is simply the complement (1 − ß) of the probability (ß) of failing to detect the
effect, that is, the complement of the probability of a type II error.
a power curve shows how the likelihood of detecting any possible effect—ranging from very small to very large—
varies for a fixed sample size.
the use of power curves represents a distinct improvement over the arbitrary selection of sample size, for power
curves help identify a sample size that, being neither unduly small nor excessively large, produces a hypothesis test
with the proper sensitivity

3.10.Point Estimate For μ


Point Estimate for μ uses a single value that represents some unknown population characteristic, such as the
population mean. If a random sample of 100 local freshmen reveals a sample mean SAT score of 533, then 533 will
be the point estimate of the unknown population mean for all local freshmen.
A Basic Deficiency
Although straightforward, simple, and precise, point estimates suffer from a basic deficiency. They tend to be
inaccurate. Because of sampling variability, it’s unlikely that a single sample mean, such as 533, will coincide with
the population mean. Since point estimates convey no information about the degree of inaccuracy due to sampling
variability, statisticians supplement point estimates with another, more realistic type of estimate, known as interval
estimates or confidence intervals.
Example:
Fundamentals of Data Science and Analytics
A random sample of 200 graduates of U.S. colleges reveals a mean annual income of $62,600. What is the best
estimate of the unknown mean annual income for all graduates of U.S. colleges?
$62,600

3.11. Confidence Interval (CI) for μ


A confidence interval for μ uses a range of values that, with a known degree of certainty, includes the unknown
population mean.
For instance, the SAT investigator might use a confidence interval to claim, with 95 percent confidence, that the
interval between 511.44 and 554.56 includes the population mean math score for all local freshmen. To be 95
percent confident signifies that if many of these intervals were constructed for a long series of samples,
approximately 95 percent would include the population mean for all local freshmen. In the long run, 95 percent of
these confidence intervals are true because they include the unknown population mean. The remaining 5 percent
are false because they fail to include the unknown population mean.
For the sampling distribution from which the sample mean of 533 originates, as shown in Fig.3.11.
The three important properties are as follows:
■ The mean of the sampling distribution equals the unknown population mean for all local freshmen, whatever its
value, because the mean of this sampling distribution always equals the population mean.
■ The standard error of the sampling distribution equals the value (11) obtained from dividing the population
standard deviation (110) by the square root of the sample size (Square root of 100).
■ The shape of the sampling distribution approximates a normal distribution because the sample size of 100
satisfies the requirements of the central limit theorem
Only one sample mean is actually taken from this sampling distribution and used to construct a single 95 percent
confidence interval
A Series of Confidence Intervals
For each sample mean, construct a 95 percent confidence interval by adding 1.96 standard errors to the sample
mean and subtracting 1.96 standard errors from the sample mean; that is, use the expression
X ±1.96 σ x
to obtain a 95 percent confidence interval for each sample mean.
3.11.1. True Confidence Intervals
Why, according to statistical theory, do 95 percent of these confidence intervals include the unknown population
mean? Because the sampling distribution is normal, 95 percent of all sample means are within 1.96 standard errors
of the unknown population mean, that is, 95 percent of all sample means deviate less than 1.96 standard errors from
the unknown population mean. Therefore, and this is the key point, when sample means are expanded into
confidence intervals—by adding and subtracting 1.96 standard errors—95 percent of all possible confidence
intervals are true because they include the unknown population mean.
INFERENTIAL STATISTICS

Fig.3.11. Sample Distribution of the mean


3.11.2 False Confidence Intervals
Five percent of all confidence intervals fail to include the unknown population mean. As indicated in Figure 3.11.2,
5 percent of all sample means (2.5 percent in each tail) deviate more than 1.96 standard errors from the unknown
population mean. Therefore, when sample means are expanded into confidence intervals—by adding and
subtracting 1.96 standard errors—5 percent of all possible confidence intervals are false because they fail to include
the unknown population mean.

3.11.1 A Series of 95 percent confidence intervals (emerging from a sample distribution)


Confidence Interval for μ Based on z
Fundamentals of Data Science and Analytics
where X represents the sample mean; z conf represents a number from the standard normal table that satisfies the
confidence specifications for the confidence interval; and σ x represents the standard error of the mean.

Given that X , the sample mean SAT math score, equals 533, that zconf equals 1.96 (from the standard
normal tables, where z scores of ±1.96 define the middle 95 percent of the area under the normal curve),
and that the standard error, σx, equals 11, Formula 12.1 becomes

where 554.56 and 511.44 represent the upper and lower limits of the confidence interval. Now it can be
claimed, with 95 percent confidence, that the interval between 511.44 and 554.56 includes the value of
the unknown mean math score for all local freshmen.

Interpretation of a Confidence Interval


A 95 percent confidence claim reflects a long-term performance rating for an extended series of
confidence intervals. we never really know whether a particular confidence interval is true or false unless
the entire population is surveyed.

when the level of confidence equals 95 percent or more, we can be reasonably confident that the one
observed confidence interval includes the true population mean. That’s the same as being reasonably
confident that the true population mean for all local freshmen is between 511.44 and 554.56

Example:
Reading achievement scores are obtained for a group of fourth graders. A score of 4.0 indicates a level of
achievement appropriate for fourth grade, a score below 4.0 indicates underachievement, and a score
above 4.0 indicates overachievement. Assume that the population standard deviation equals 0.4. A
random sample of 64 fourth graders reveals a mean achievement score of 3.82.
(a) Construct a 95 percent confidence interval for the unknown population mean. (Remember to convert
the standard deviation to a standard error.)
b) Interpret this confidence interval; that is, do you find any consistent evidence either of
overachievement or of underachievement?
Answer:
(a) 3.82 ± 1.96 .4 64 = 3.92 3.72
(b) We can claim, with 95 percent confidence, that the interval between 3.72 and 3.92 includes the true
population mean reading score for the fourth graders. All of these values suggest that, on average, the
fourth graders are underachieving.
INFERENTIAL STATISTICS

Level of Confidence:
The level of confidence indicates the percent of time that a series of confidence intervals includes the
unknown population characteristic, such as the population mean.

For instance, to construct a 99 percent confidence interval from the data for SAT math scores, first
consult Table A in Appendix C to verify that z conf values of ±2.58 define the middle 99 percent of the total
area under the normal curve. Then substitute numbers for symbols in Formula to obtain

It can be claimed, with 99 percent confidence, that the interval between 504.62 and 561.38 includes the
value of the unknown mean math score for all local freshmen.

Choosing a Level of Confidence


Although many different levels of confidence have been used, 95 percent and 99 percent are the most
prevalent. Generally, a larger level of confidence, such as 99 percent, should be reserved for situations in
which a false interval might have particularly serious consequences.
Example:
Before taking the GRE, a random sample of college seniors received special training on how to take the
test. After analyzing their scores on the GRE, the investigator reported a dramatic gain, relative to the
national average of 500, as indicated by a 95 percent confidence interval of 507 to 527. Are the following
interpretations true or false?
(a) About 95 percent of all subjects scored between 507 and 527.
(b) The interval from 507 to 527 refers to possible values of the population mean for all students who
undergo special training.
(c) The true population mean definitely is between 507 and 527.
(d) This particular interval describes the population mean about 95 percent of the time. (e) In practice, we
never really know whether the interval from 507 to 527 is true or false. (f) We can be reasonably
confident that the population mean is between 507 and 527
Answer
(a)False. We can be 95 percent confident that the mean for all subjects will be between 507 and 527.
(b) True
(c) False. We can be reasonably confident—but not absolutely confident—that the true population
mean lies between 507 and 527.
Fundamentals of Data Science and Analytics

(d) False. This particular interval either describes the one true population mean or fails to describe the one
true population mean.
(e) True
(f) True

Example:
In a recent scientific sample of about 900 adult Americans, 70 percent favor stricter gun control of assault
weapons, with a margin of error of ±4 percent for a 95 percent confidence interval. Therefore, the 95
percent confidence interval equals 66 to 74 percent. Indicate whether the following interpretations are true
or false:
(a) The interval from 66 to 74 percent refers to possible values of the sample percent.
(b) The true population percent is between 66 and 74 percent.
(c) In the long run, a series of intervals similar to this one would fail to include the population percent
about 5 percent of the time.
(d) We can be reasonably confident that the population percent is between 66 and 74 percent
3.12 Effect of Sample Size
The larger the sample size, the smaller the standard error and, hence, the more precise (narrower) the
confidence interval will be. Indeed, as the sample size grows larger, the standard error will approach zero
and the confidence interval will shrink to a point estimate. Given this perspective, the sample size for a
confidence interval, unlike that for a hypothesis test, never can be too large.

Selection of Sample Size


As with hypothesis tests, sample size can be selected according to specifications established
before the investigation. To generate a confidence interval that possesses the desired precision (width),
yet complies with the desired level of confidence, Valid use of these formulas requires that before the
investigation, the population standard deviation be either known or estimated.

Example 1:
On the basis of a random sample of 120 adults, a pollster reports, with 95 percent confidence, that
between 58 and 72 percent of all Americans believe in life after death. (a) If this interval is too wide,
what, if anything, can be done with the existing data to obtain a narrower confidence interval?
(b) What can be done to obtain a narrower 95 percent confidence interval if another similar investigation
is being planned?
Answer:
INFERENTIAL STATISTICS

(a) Switch to an interval having a lesser degree of confidence, such as 90 percent or 75 percent.
(b) Increase the sample size

Example 2:
Imagine that one of the following 95 percent confidence intervals estimates the effect of vitamin C on IQ
scores:

(a) Which one most strongly supports the conclusion that vitamin C increases IQ scores?
(b) Which one implies the largest sample size?
(c) Which one most strongly supports the conclusion that vitamin C decreases IQ scores?
(d) Which one would most likely stimulate the investigator to conduct an additional experiment using
larger sample sizes?

Answer:
(a) 3
(b) 1
(c) 5
(d) 4
Fundamentals of Data Science and Analytics
INFERENTIAL STATISTICS
Fundamentals of Data Science and Analytics
INFERENTIAL STATISTICS

You might also like