\(\overline{x}-Z_{\frac{\alpha}{2},(n-1)}\frac{\sigma}{\sqrt{n}} <= \mu <= overline{x}+Z_{\frac{\alpha}{2},(n-1)}\frac{\sigma}{\sqrt{n}}\)
With: * \(\overline{x}\)=mean of the sample * \(n\)=number of elements in the sample * \(Z_{\frac{\alpha}{2},(n-1)}\) = top \(\frac{\alpha}{2}\) percentile of a standarized Normal Distribution * \(\sigma\)= standard deviation of the population
\(\overline{x}-t_{\frac{\alpha}{2},(n-1)}\frac{s^2}{\sqrt{n}} <= \mu <= overline{x}+t_{\frac{\alpha}{2},(n-1)}\frac{s^2}{\sqrt{n}}\)
With: * \(\overline{x}\)=mean of the sample * \(n\)=number of elements in the sample * \(t_{\frac{\alpha}{2},(n-1)}\) = t-student distribution with \(df_1=\frac{\alpha}{2}\) and \(df_2=n-1\) * \(s^2\)= variance of the sample
\(\frac{(n-1)s^2}{\chi_{\frac{\alpha}{2},n-1}^{2}}<=\sigma^2<=\frac{(n-1)s^2}{\chi_{\frac{1-\alpha}{2},n-1}^{2}}\)
With: * \(n\)=number of elements in the sample * \(s^2\)= variance of the sample
A (1-α)% CI on \(μ_x−μ_y\) is given by:
\(\overline{x}−\overline{y}−t_{\frac{1−α}{2},n−2} * σ_{diff}≤μ_x−μ_y≤\overline{x}−\overline{y}+t_{\frac{1−α}{2},n−2} * σ_{diff}\)
With: \(\frac{\sigma_{diff}=(n_x−1)s_x²+(n_y−1)s_y²}{(n_x+n_y−2)}(\frac{n_x+n_y}{n_xn_y}\)
In order to find the above results, we have assumed the following that both groups are normal and that their variances are identical. As long as the samples in each group are large and nearly equal, the t-test is sufficiently reliable, that is, still good, even the assumptions are not met.
P.VALUE = THE PROBABILITY OF OBTAINING A RESULT AT LEAST AS EXTREME AS THE RESULT ACTUALLY OBSERVED ASSUMING THAT THE NULL HYPOTHESIS IS CORRECT.
We can only accept the null hypothesis if the p.value is bigger than the threshold we choose.
From the one tailed test to the two tailed test:
** when the tail is a lower tail and \(T<0\) then: \(p_{value-one-tail}=\frac{p_{value-two-tails}}{2}\) ** when the tail is an upper tail and \(T>0\) then: \(p_{value-one-tail}=1-\frac{p_{value-two-tails}}{2}\)