[go: up one dir, main page]

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

Inferential Statistics Part 2

The document provides an overview of inferential statistics, focusing on Z-tests and T-tests. It explains the conditions for using these tests, their types, and how to calculate test statistics and critical values. Examples illustrate the application of these tests in comparing means and proportions when population parameters are known or unknown.

Uploaded by

Marouane Nîx
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)
8 views19 pages

Inferential Statistics Part 2

The document provides an overview of inferential statistics, focusing on Z-tests and T-tests. It explains the conditions for using these tests, their types, and how to calculate test statistics and critical values. Examples illustrate the application of these tests in comparing means and proportions when population parameters are known or unknown.

Uploaded by

Marouane Nîx
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
You are on page 1/ 19

Inferential

statistics :
Statistical Test
Pr . Samira Douzi
s.douzi@um5r.ac.ma
Z-test
The Z-test is a statistical test used to determine whether there is a significant difference between a sample statistic and a population parameter, or
between two sample statistics.

▪ The Z-test uses the standard normal distribution (N(0,1)) to determine the critical values and p-values.
▪ The population standard deviation (σ) is known (or the sample size is large, where 𝑠≈𝜎)
▪ The Z-statistic is calculated using :

▪ Types of Z-Tests :
One-Sample : Z-Test for the Mean ,Used to test whether the sample mean (μത) is significantly different from a known population mean (μ 0​ ).
Hypotheses: 𝐻0:𝜇=𝜇0 vs. 𝐻1:𝜇≠𝜇0 (or 𝐻1:𝜇>𝜇0 or 𝐻1:𝜇<𝜇0).
Test Statistic:
Z-test

Two-Sample Z-Test for the Mean


Used to compare the means of two independent samples.
Hypotheses: H0 :μ1=μ2 vs. H1:μ1≠μ2 (or μ1>μ2, μ1<μ2).
Test Statistic

where: xത 1 , xത2 : Sample means.


• μ1−μ2 : Difference in population means under H0​ (typically 0).
• σ1,σ2 ​: Population variances.
• n1,n2 : Sample sizes.
Z-test
Z-Test for Proportions :
▪ One-Sample Test:

p ​: Sample proportion.
p0​: Population proportion.
n: Sample size.

▪ Two-Sample Test:

where p is the pooled proportion:


Z-test
Example :
we measure the average weight of 50 apples and find xത =180g . The population mean is 𝜇0=175 g , with a known population
standard deviation of σ=10g. Is the sample mean significantly different from 𝜇0​ at 𝛼=0.05?

▪ Hypotheses:
𝐻0:𝜇=175 vs. 𝐻1:𝜇≠175.
▪ Calculate Test Statistic :

▪ Determine Critical Value : For a two-tailed test at 𝛼=0.05 , critical values are ±1.96.
▪ Decision: ∣Z∣ = 3.54>1.96, so reject H 0​ . The sample mean is significantly different from 𝜇0​ .
Z-test
We want to compare the mean weights of two species of fish. The population standard deviations (σ1​,σ2​) are known. Here's the data:
Species 1: n1=40 , xത 1 =50 , σ1=5
Species 2: n2=35 , xത 2=47 g , σ2=6 g
Hypotheses:
𝐻0:𝜇1=𝜇2 vs. 𝐻1:𝜇1>𝜇2

Z-Statistic:
Numerator: (തx 1− xത 2)−(μ1−μ2)=(50−47)−0=3
Denominator:

Z-Value:

For a one-tailed test at α=0.05 , the critical Z-value is 1.645.


Since Z=2.33>1.645 , reject H0​. There is significant evidence that the mean weight of Species 1 is greater than that of Species 2.
Z - Test Table
T_ distribution
Context
We trying to measure something in a population, like the average height of a certain species of plant. We can’t measure every plant;
therefore , we take a sample and calculate the sample mean (𝑥). ҧ But how confident that the sample mean is close to the true
population mean? When the population standard deviation (σ) is unknown, (which is common in real-world biology studies), and
the sample size is small, the t-distribution provides a way to make statistical inferences. It helps account for the extra uncertainty
that comes from not knowing σ and having only a small sample.
Definition :
The t-distribution, also known as Student's t-distribution, is a probability distribution that arises in situations where the sample size is small,
and the population standard deviation is unknown. It is especially important in inferential statistics for estimating population parameters
and testing hypotheses.
Characteristics of the t-distribution:
Shape: Symmetrical and bell-shaped like the standard normal distribution. Heavier tails compared to the normal distribution, which means
it accounts for more variability in the data. As the degrees of freedom (df) increase, the t-distribution approaches the normal distribution.
Degrees of Freedom (df): The t-distribution is defined by its degrees of freedom, which are typically related to the sample size (n) as df =
𝑛−1. Lower degrees of freedom result in heavier tails, indicating greater uncertainty.
T_ distribution
Degree of Freedom
Degrees of freedom refer to the number of independent values available to estimate a statistic. It quantify how much "freedom" we have
in our data to vary while still calculating a meaningful statistic like the mean.

Example :

We have a sample of 5 plant heights: 12,14,15,13, x.


The mean of these heights is 14.
Since the mean is fixed, the last value x is not free to vary, it must be 16 to keep the mean at 14.
This means only 4 out of the 5 values are free to vary, so the degrees of freedom are df = n−1.

Degrees of freedom are important for understanding how uncertain we are about estimates (e.g., the sample mean or standard deviation)
and influence distributions like the t-distribution.
T_ distribution
One-Tailed Test vs Two -Tailed Test
One-Tailed Test :
A one-tailed test is used when you are interested in testing whether a parameter (e.g., mean) is either:
▪ Greater than a certain value (right-tailed test), or
▪ Less than a certain value (left-tailed test).
The critical region is in one tail of the distribution.
The entire significance level (α) is assigned to this single tail.
One-Tailed Test vs Two -Tailed Test

Examples:
1. Right-tailed test:
Hypothesis: H0 : μ = μ0 vs. Ha : μ>μ0
2. Left-tailed test:
Hypothesis: H0:μ = μ0 vs. Ha: μ <μ0
One-Tailed Test vs Two -Tailed Test
Two-Tailed Test
A two-tailed test is used to test whether a parameter is different (either greater or smaller) from a certain value.
▪ The critical regions are in both tails of the distribution.
▪ The significance level (α) is split equally between the two tails (α/2 in each tail).
Example:
Hypothesis: H0 : μ=μ0 vs. Ha: μ≠μ
Testing whether a new drug has any effect (it could increase or decrease blood pressure).
T-test

2. T -Test:
A t test is used when the data follows a student t distribution, and the sample size is lesser than 30. It is used to compare the sample and population mean
when the population variance is unknown. The t-test formula varies slightly depending on the type of t-test being conducted. Here are the formulas for
three common types of t-tests:
▪ One-Sample t-Test
The one-sample t-test is used to determine whether the mean of a single sample differs significantly from a known or hypothesized population mean (μ).

𝑋ത is the sample mean,


μ is the population mean,
s is the sample standard deviation, and
n is the sample size.
T-test

▪ Two-Sample t-Test (Independent Samples)


The two-sample t-test for independent samples compares the means from two different groups to see if there is evidence that the associated
population means are significantly different.

ഥ𝑋1​ and 𝑋2​


ത are the sample means for each group,
s1​ and s2​ are the sample variances for each group,
n1​ and n2​ are the sample sizes for each group.

▪ Paired Sample t-Test


The paired sample t-test is used when the samples are not independent of one another; typically, this is because the same subjects are measured
twice (before and after a treatment, for example).

𝑑ҧ is the mean of the differences between the paired observations,


sd​ is the standard deviation of these differences, and
n is the number of pairs.
T-test
Example :
A researcher measures blood pressure before and after administering a drug to 10 patients. The differences in blood pressure are
analyzed.
Differences (di​): 5, 3 ,−2 , 7, 4 , 6, −1, 0, 2 , 3 .
Sample mean of the differences: 𝑑=2.7 ҧ .
Sample standard deviation of the differences: sd=2.43.
Hypothesized mean difference: μd=0.
Paired t-Test:
1. Test Statistic:

Degrees of Freedom: df=n−1=10−1=9 .


Decision: Compare t-statistic to the critical t-value from the t-table for df=9. If t>tcritical. reject H0
T- Table
Summary

You might also like