Path: blob/master/notebook-for-reviewing/chapter_8_inferences_on_a_population_mean.ipynb
388 views
Kernel: Python 3
In [2]:
Chapter 8 Inferences on a Population Mean
Confidence Intervals
Confidence Interval - for unknown parameter, the interval contains a set of possible values.
Confidence Level - probability for the parameter within the interval.
Two-sided t-interval
Requirements:
Continuous data set, length =
Sample mean
Sample standard
N.B. Real standard deviation is UNKNOWN.
Real mean confidence interval would be
T distribution:
In [7]:
Out[7]:
T Statistics Value 1.6711
Interval Length 0.0578
Confidece Interval (49.9710, 50.0288)
One-sided t-interval
Real mean with confidence interval would be
In [9]:
Out[9]:
T Statistics Value 1.2961
----- Upper Bound -----
Confidece Interval (-inf, 50.0223)
----- Lower Bound -----
Confidece Interval (49.9775, +inf)
Two-sided z-interval
Real mean with confidence interval would be
In [10]:
Out[10]:
T Statistics Value 1.6449
Interval Length 0.0569
Confidece Interval (49.9714, 50.0284)
In [11]:
Out[11]:
T Statistics Value 1.2961
----- Upper Bound -----
Confidece Interval (-inf, 50.0223)
----- Lower Bound -----
Confidece Interval (49.9775, +inf)
Hypothesis
Null Hypothesis - designate possible value.
Alternative Hypothesis - opposite of null hypothesis.
Two-sided hypothesis:
One-sided hypothesis:
- probability of making null hypothesis true.
- reject null hypothesis
- accept null hypothesis
N.B. null hypothesis may not be true
In [14]:
Out[14]:
P-Value 0.9336
In [16]:
Out[16]:
P-Value 0.5332
In [17]:
Out[17]:
Acceptance Region (49.9698, 50.0273)
In [18]:
Out[18]:
Acceptance Region (-inf, 50.0209)
Z-test hypothesis
In [19]:
Out[19]:
P-Value 2.0000
In [20]:
Out[20]:
P-Value 0.0000