Path: blob/master/notebook-for-reviewing/chapter_9_comparing_two_population_means.ipynb
388 views
Kernel: Python 3
In [2]:
Chapter 9 Comapring Two Population Means
Paired Datasets
Two paired sample sets:
with
with
To test the hypothesis:
Step 1. - Create with
Step 2. - Create new hypothesis
Step 3. - Use t-statistics method to get the confidence interval and p-value
In [7]:
Out[7]:
Confidence Interval (0.1796, 2.5704)
P-Value 0.0329
Unpaired Datasets
Independent Samples
General Method
Population | Samples | Size | Mean | Standard deviation |
---|---|---|---|---|
Population A | n | |||
Population B | m |
Point estimate:
where
Two-sided level confidence interval for is:
Where the degree of freedom:
For of :
In [14]:
Out[14]:
Confidence Interval (-14.0430, -3.9570)
In [12]:
Out[12]:
|t| 4.9736
P-Value 0.0000
Pool Method
Unbiased estimate of of :
Two-sided level confidence interval for is:
For of :
In [16]:
Out[16]:
Confidence Interval (-14.0282, -3.9718)
In [17]:
Out[17]:
|t| 4.9736
P-Value 0.0000
Z-test Method
If those two variances are known.
Two-sided level confidence interval for is:
For of :
In [21]:
Out[21]:
Confidence Interval (-1.7150, 0.3930)
In [23]:
Out[23]:
P-Value 0.0723