0% found this document useful (0 votes)
7 views19 pages

ADS Module2

The document covers key concepts in inferential statistics, focusing on normal distribution, hypothesis testing, and confidence intervals. It explains the null and alternative hypotheses, types of errors, and provides examples of confidence intervals for mean and proportion, as well as Z and T tests. Additionally, it discusses the F-distribution and ANOVA for comparing group means.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views19 pages

ADS Module2

The document covers key concepts in inferential statistics, focusing on normal distribution, hypothesis testing, and confidence intervals. It explains the null and alternative hypotheses, types of errors, and provides examples of confidence intervals for mean and proportion, as well as Z and T tests. Additionally, it discusses the F-distribution and ANOVA for comparing group means.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Applied Data Science

Module 2: Data Exploration

Machhindranath Patil, PhD. IIT Bombay

A Department Level Elective offered by Department of Computer Engineering

SEMESTER-VIII (2026)
Normal Distribution in Inferential Statistics

Inferential statistics involves making predictions about a population based on sample


data. The normal distribution is foundational to:
▶ Confidence Intervals: A range used to estimate unknown population parameters
like the mean.
▶ Hypothesis Testing: Methods like Z-tests, t-tests, and ANOVA determine
statistical significance.
▶ Central Limit Theorem (CLT): For large samples (n ≥ 30), the sampling
distribution of the mean is approximately normal regardless of population shape.
Null and Alternative Hypotheses

Null Hypothesis (H0 )


Represents the status quo or ”no effect” position. It is the default assumption that
must be disproven. It always states ”no difference” exists.

Alternative Hypothesis (Ha )


Contradicts H0 and represents the research claim or suspected relationship that the
researcher aims to support.
Directionality of Ha :
▶ Two-tailed: Indicates a difference exists without specifying direction (µ ̸= µ0 ).
▶ One-tailed: Specifies the direction of the difference (µ > µ0 or µ < µ0 ).
Type-I and Type-II Errors

Testing hypotheses involves two potential risks:


▶ Type-I Error (α): Occurs when H0 is true, but it is incorrectly rejected. The
probability α is the level of significance.
▶ Type-II Error (β): Occurs when H0 is false, but it is incorrectly accepted.
▶ Power of the Test: Defined as 1 − β, the probability of correctly rejecting a false
null hypothesis.
Confidence Interval for Mean
Question: A company wants to estimate the average time spent on its website. A
random sample of n = 50 users has a sample mean x̄ = 10 minutes and known
population standard deviation σ = 2.5 minutes. Construct a 95% confidence interval
for the true mean.

Step 1: Specify the confidence level.


For a 95% confidence level,
α = 1 − 0.95 = 0.05, α/2 = 0.025.

Step 2: Find the critical Z-value.


The given Z-table provides the area between the mean and Z . Hence, we compute
0.5 − α/2 = 0.5 − 0.025 = 0.475.
From the Z-table, the area 0.475 corresponds to
Zα/2 = 1.96.
Confidence Interval for Mean
Step 3: Write the confidence interval formula.
σ
CI = x̄ ± Zα/2 √ .
n

Step 4: Substitute the given values.


2.5
CI = 10 ± 1.96 √ = 10 ± 0.693.
50

Step 5: State the confidence interval.

CI = (9.31, 10.69).

Conclusion: We are 95% confident that the true average time spent on the website
lies between 9.31 and 10.69 minutes.
Confidence Interval for Proportion
Question: A poll of 1000 voters shows that 530 voters support a candidate. Construct
a 95% confidence interval for the true population proportion of supporters.

Step 1: Compute the sample proportion.


530
p̂ = = 0.53, n = 1000.
1000
Step 2: Specify the confidence level.
For a 95% confidence level,
α = 1 − 0.95 = 0.05, α/2 = 0.025.

Step 3: Obtain the critical Z-value.


Since the Z-table gives the area between the mean and Z , we calculate
0.5 − α/2 = 0.5 − 0.025 = 0.475.
From the Z-table, the area 0.475 corresponds to
Zα/2 = 1.96.
Confidence Interval for Proportion
Step 4: Write the confidence interval formula.
r
p̂(1 − p̂)
CI = p̂ ± Zα/2 .
n
Step 5: Substitute the values.
r
0.53(1 − 0.53)
CI = 0.53 ± 1.96 = 0.53 ± 0.031.
1000
Step 6: State the confidence interval.

CI = (0.499, 0.561).

Conclusion: We are 95% confident that the true proportion of voters supporting the
candidate lies between 49.9% and 56.1%.
Z and T tests For Single Mean in Hypothesis Testing

Z-test: Used when population variance is known and samples are large (n ≥ 30).

X̄ − µ0
Z= √
σ/ n

t-test: Used when sample size is small (n < 30) and population variance is unknown.

X̄ − µ0
t= √
S/ n

Decision: If the absolute value of the statistic exceeds the critical value (Zα or tα ),
reject the null hypothesis.
Left-Tailed Test
Question: A machine is designed to fill bottles with a mean volume of 500 ml. A
random sample of n = 40 bottles has a mean volume of x̄ = 495 ml with known
population standard deviation σ = 10 ml. Test at the 5% level of significance whether
the machine underfills.

Step 1: Formulate the hypotheses.


Since we are testing for underfilling, this is a left-tailed test.
H0 : µ = 500, Ha : µ < 500.

Step 2: Specify the level of significance.

α = 0.05.

Step 3: Determine the critical value.


For a left-tailed test at α = 0.05, the critical Z-value is
Zα = −1.645.
Left-Tailed Test

Step 4: Compute the test statistic.


x̄ − µ0 495 − 500
Z= √ = √ = −3.16.
σ/ n 10/ 40

Step 5: Make the decision.


Since
Z = −3.16 < −1.645,
the test statistic falls in the critical region.
Conclusion: The null hypothesis is rejected at the 5% level of significance. There is
sufficient statistical evidence to conclude that the machine significantly underfills the
bottles.
Two-Tailed Test
Question: A medicine is claimed to have a potency of 250 mg. A random sample of
n = 36 tablets has a mean potency of x̄ = 252 mg with population standard deviation
σ = 5 mg. Test at the 5% level of significance whether the potency differs from the
claimed value.

Step 1: Formulate the hypotheses.


Since deviation in either direction is of interest, this is a two-tailed test.
H0 : µ = 250, Ha : µ ̸= 250.

Step 2: Specify the level of significance.

α = 0.05, α/2 = 0.025.

Step 3: Determine the critical values.


The Z-table used gives the area between the mean and Z . Hence,
0.5 − α/2 = 0.5 − 0.025 = 0.475.
Two-Tailed Test
From the Z-table, the corresponding critical value is
Zα/2 = 1.96.
Thus, the critical region is
|Z | > 1.96.

Step 4: Compute the test statistic.


x̄ − µ0 252 − 250
Z= √ = √ = 2.4.
σ/ n 5/ 36
Step 5: Make the decision.
Since
|Z | = 2.4 > 1.96,
the test statistic lies in the critical region.
Conclusion: The null hypothesis is rejected at the 5% level of significance. There is
sufficient statistical evidence to conclude that the medicine potency differs significantly
One-Sample t-Test
Question: A battery brand claims that the mean battery life is 100 hours. A sample of
n = 10 batteries has a mean life x̄ = 96 hours and sample standard deviation s = 5
hours. Test at the 5% level of significance whether the mean life is less than 100 hours.

Step 1: Formulate the hypotheses.


Since we are testing whether the mean is less than the claimed value, this is a
left-tailed test.
H0 : µ = 100, Ha : µ < 100.

Step 2: Specify the level of significance.

α = 0.05.

Step 3: Determine degrees of freedom and critical value.

df = n − 1 = 10 − 1 = 9.
One-Sample t-Test
From the t-table, for a one-tailed test at α = 0.05 and df = 9,
t0.05,9 = 1.833.
Since this is a left-tailed test, the critical value is −1.833.
Step 4: Compute the test statistic.
x̄ − µ0 96 − 100
T = √ = √ = −2.53.
s/ n 5/ 10

Step 5: Make the decision.


Since
T = −2.53 < −1.833,
the test statistic lies in the critical region.
Conclusion: The null hypothesis is rejected at the 5% level of significance. There is
sufficient evidence to conclude that the mean battery life is significantly less than 100
hours.
One-Sample t-Test (Two-Tailed
Question: A city claims that the average daily household water usage is 150 liters. A
random sample of n = 12 households has a mean usage x̄ = 160 liters and sample
standard deviation s = 15 liters. Test at the 5% level of significance whether the mean
usage differs from 150 liters.

Step 1: Formulate the hypotheses.


Since deviation in either direction is of interest, this is a two-tailed test.

H0 : µ = 150, Ha : µ ̸= 150.

Step 2: Specify the level of significance.

α = 0.05, α/2 = 0.025.

Step 3: Determine degrees of freedom and critical value.

df = n − 1 = 12 − 1 = 11.
One-Sample t-Test (Two-Tailed)
From the t-table, for a two-tailed test at α = 0.05 and df = 11,
t0.025,11 = 2.201.
Thus, the critical region is
|T | > 2.201.

Step 4: Compute the test statistic.


x̄ − µ0 160 − 150
T = √ = √ = 2.31.
s/ n 15/ 12
Step 5: Make the decision.
Since
|T | = 2.31 > 2.201,
the test statistic lies in the critical region.
Conclusion: The null hypothesis is rejected at the 5% level of significance. There is
sufficient statistical evidence to conclude that the average daily household water usage
F-Distribution and ANOVA

F-Distribution: Ratio of two chi-square distributions divided by their respective


degrees of freedom. It is always positively skewed and non-negative.
ANOVA: A statistical method used to compare the means of three or more groups.
▶ H0 : µ 1 = µ 2 = · · · = µ k .
▶ Ha : At least one group mean is significantly different.
▶ F-ratio: F = Between-group variance
Within-group variance
Example: F-test for Variances

Problem: Test if two manufacturing processes have the same variance.


▶ Process A: n = 15, S 2 = 20.
▶ Process B: n = 12, S 2 = 12.
Calculation:
S12 20
F = 2
= = 1.67
S2 12
Decision: The critical value at α = 0.05 is 2.54. Since 1.67 < 2.54, we fail to reject
the null hypothesis. The variances are similar.

You might also like