So, for inferential statistics, so we base our hypotheses, so hypothesis can be null hypothesis and alternate hypotheses. So, we can write a null hypothesis and the alternate hypothesis as follows. So, now hypothesis means the mean of our one variable one data is equal to the mean or it can be a boss I can data auto null hypothesis mean mean about one variable one data is not equal to the mean of our second variable second data. So, the mean of the first the robo Yuan so obviously you can see there is a one here so is firstly Tao firstly robot. So, the mean of the first data first variable and the mean of the second data set can be over ah can be referred to this You want Yaga micro Juan here or the micro to here? Okay, so we can do into the inferential statistics.
So we can use statistic test to get our P value. So we use our T test for continuous variables, and we use chi square test while categorical variables are data. For more compressed testing, you can use the ANOVA. So, let's say the p value is smaller than the p value is lower than 0.05. Then we can see how we can indicate that our data is sufficiently inconsistent with our null hypothesis. Hence, the now hypothesis may be rejected.
So a larger p value mean that we fail to reject a null hypothesis. So for t tests, the assumption will be they're the same births are random the sample from the population and the population essentially are normally distributed. So, type one error will be error or rejection of the null hypothesis when he is really true, then type two error you'll be able to reject null hypothesis when that is false. So, for t test we have our T test and we have uncorrelated independent t test for independent t test, we have another one is equal barriers and unequal favors. So, obviously we can interpret this here from this chart here. Then we have the paired t test.
So, paired t test means that the variable are the two data somehow correlation. So, we can interpret here from this chat here. So, so there's a reason or there's some meaning I put correlator here. So you can you can maybe look into this website here to know more about this chat here. Okay, so to use one sample t test in R, we can use our t dot test function. Okay.
For Python we can use this state dot t test on one sample. Okay, so we can do something like this. Let's see. So we will use stats here. Okay, stats da, r t test, one sample and then we can pull up Ah variable and then a min here okay so def set Berlin okay and then a mini size 0.5 okay then we can print the result okay so we have invalid syntax So, bracket and bracket and this bracket okay the SHA one bracket here. So we get a p value is our 1.54 ah you get our statistic is 79.0 trayzell Okay.
So for these are one sample t test, now hypotheses will be the main four these are They our bodies our column is equal to m. So, for this m we pulleys around 0.5 which can be found here 0.5 here Qaeda we these are alternate hypotheses. So the mean of the data is not equal to m. So M is 0.5 here okay. So M is super fine, both are Python codes. So, P value is 1.5 or two those are seven 6.929907914 e to power minus 123. Hence, the p value is less than 0.05 which is the alpha value, therefore, null hypothesis may be rejected. So, this is the null hypothesis.
So, when we reject these are not hypotheses So, Pretty straightforward A R is the alternate hypothesis we only have the alternate hypothesis left here. So alternate hypotheses mean they are. The mean is not equal to 0.5