https://www.youtube.com/watch?v=fx4tCRiynMQ&list=PLsri7w6p16vtEz_J1G7HQG-Rm8vpZPtPS&index=3
================================================================================
If number of sample is large (generally $$$n>30$$$)
$$$s^2$$$ becomes $$$\sigma^2$$$
$$$z = \dfrac{\bar{x}-\mu}{\frac{\sigma}{\sqrt{n}}}$$$
================================================================================
If number of sample is not large enough
you use "test statistics t"
$$$t_{n-1} = \dfrac{\bar{x}-\mu}{\frac{s}{\sqrt{n}}}$$$
================================================================================
Relationship between "t test" and "z test"
z test $$$\subset$$$ t test
================================================================================
* Example
* You survey 15 number of drink A
Question
* Set hypothesis
* Perform left sided test using p-value=0.05
* precondition: population distribution is normal distribution
Answer
test statistics t
$$$t = \frac{\bar{x}-\mu}{\frac{s}{\sqrt{n}}}$$$
$$$t = \frac{302.1-300}{\frac{14.54}{\sqrt{15}}} = 0.568$$$
* Degree of freedom = $$$n-1 = 15-1 = 14$$$
* p-value $$$\alpha = 0.05$$$
In left side test, when $$$\alpha=0.05$$$, $$$t =-1.761$$$
according to t distribution table
Conclusion:
* null hypothesis $$$H_0$$$ is selected
* Hypothesis of "Drink A has 300ml" is correct
================================================================================