I am learning the basics of quant trading from quantconnect's tutorial Confidence Interval and Hypothesis Testing. I understood the first part of the article but I dont understand "Hypothesis Testing" section.
From the article
Now we can talk about hypothesis testing. Hypothesis test is essentially test your inference based on a sample. Let's use our dataset, the daily return of S&P 500 us our population. Assume that we don't know the mean of this population. I guess that the mean of this population is 0. Is my guess correct? I need to test this hypothesis with my sample. Let's start from observing our sample:
The null hypothesis(mean=0) and alternative hypothesis(mean not equal 0) are
and confidence interval used are
90% confidence interval the mean is between (-0.00039756352254768874, 0.00039756352254768874) 95% confidence interval the mean is between (-0.00047513689280089639, 0.00047513689280089639)
They reject null hypothsesis for 90% confidence because real mean 0.000463 is outside the confidence mean range
Our mean of the sample is out of the 90% confidence interval. This means on a 90% confidence level, we can claim that the mean of our population is not 0.
Then in 95%, real mean is inside the confidence intervals range and so we accept the null hypothesis.
Shouldn't this the other way around because the real mean is inside the range of 95% confidence interval so mean of the population should be not zero ? What is the rationale behind it? Then they talk about z-score method which also I am not able to grasp? How do this applied to popultion sampiling? How is this idea applied in trading(any example)?