Hypothesis T test for Data Analysis using Excel
Hi I hope you enjoyed the last video which was on Z test everybody talks about the different statistical tests everybody talks about hypothesis testing but there are very few videos that actually talks about how these techniques are used in real life Industries how these techniques are actually used using an example so that was the whole idea why I came up with this series in the previous video you saw how I performed the Z test using an example now in this video I am going to talk about the next type of statistical test which is t-test somehow t-tests and Z tests are almost similar to each other but there are some differences I will be talking about t-test in this video using examples of course real-time examples and how t-test is performed on Excel obviously when using python life is so simple there are already pre-existing libraries and pre-existing methods to call and impute your assumption or and understanding your hypothesis but how it is done on Excel I will be showing you in this particular video and if you show me similar kind of love by liking and sharing this video and of course subscribing the channel then definitely I'll come up with a lot of video use related to this using Anova One Way Anova two-way g-square tests correlation tests and so on now if you are complete beginner into the field of Statistics go ahead and watch out my existing playlist on my channel which which has covered a lot of business statistics topic and if you are new to hypothesis testing I already have a video on hypothesis testing you will find the link in the I button and that's it see you in the video where I will be talking about the t-test and make sure to like share and subscribe the channel hi welcome to this module on statistics in this video we shall be talking about the next test which is t-test in the previous video we talked about Z test in this video we are going to focus on the t-test before getting into t-test let me try to talk about the data in this particular example I am going to take two types of data there are 10 female customers and 10 male customers and each one of them has their ages mentioned here now we are going to perform two types of tests for the first thing what we need to do is we are just going to focus on only these 10 female customers so we will try to test to determine whether the female population mean age is significantly Sydney frequently greater than 30.
That's going to be my case now what is going to be my hypothesis my null hypothesis is going to be mean is less than equals to 30 and my alternate hypothesis will be mean is greater than 30. so I'm only considering one sample so we are doing a one sample T Test now in order to accomplish this thing let me just note down few other things as well my significance level is as usual going to be 0.05 if my P is greater than 0.05 then we accept the null hypothesis else we reject the null hypothesis I think everybody is cleared in here now I am going to only considering that this particular column which is the first column as we are doing one sample t-test so what I will do here is I'll probably go ahead and click on data and go to data analysis and here you can see there is an option called as t-test to sample assuming unequal variances I'm going to do that but before that I am going to just create a dummy variable dummy variable is just created uh it's just a dummy data because there is no option called as one sample t-test so we are going to use two sample t-test but we are going to use the second variable as this dummy variable once you click on OK let me just empty all these records now this is how your original window looks like when you open the data analysis and open the t-test for the very first time the first variable range will be this the second variable being the dummy variable the range will be this I am going to click on labels because my first selected data is the header my hypothesized mean difference is going to be 30. because here we have here the test is to determine whether the female population mean age is significantly greater than 30 or not right now output range I will select this particular cell and click on ok now once this is done this is how my test looks like I'll probably delete this cell because it contains my dummy data and I will rename it to one sample test that's it and instead of hypothesized main difference I'll note it as hypothesize mean everything else Remains the Same as this is a one-tailed test let me just get it back to this side okay as this is the one-tailed test and my P value is 0.
052 which is greater than 0.05 so in this case I am going to accept the null hypothesis so I will note it down as green I'm going to accept the null hypothesis because the P value is greater than 0.05 and this is a one-tailed test now we will perform another test which is going to be for both these particular features now if I am considering both these features what will be my new h0 or null hypothesis my new null hypothesis will be there is no significant difference between the mean age of male and female the same hypothesis we also used in the Z test there is a significant difference between the main age of male and female okay this is my new hypothesis I'll note it down here maybe or else here okay let's note it down here itself okay no problem so this is my hypothesis okay now I'm going to use both these samples so again I will click on data click on data analysis click on the same thing here let me remove everything first the first range is going to be my all the female customers age the second range is going to be all the mail customers range and then the hypothesized mean difference is going to be 0 because I'm going to consider two samples female and male so my hypothesized mean difference is zero because my assumption is there is no significant difference between the mean age of male and female that means the mean edge of male is equivalent to the mean age of female the output range is I'm selecting this cell done everything else looks fine I'll click on OK and this is my two sample test for this here my PE value is also greater than 0.
05 you can see the P value is 0.07 which means it is greater than 0.05 which means we are going to accept the null hypothesis and what is the null hypothesis the null hypothesis is there is no significant difference between the mean age of male and female I hope you understood both these aspects of t-test on how to perform taste test on a sample test on one sample test and how to perform t-test on two sample test that's all about this particular video on detest in the next videos we shall be talking about various other tests see in the next video bye thank you foreign.
That's going to be my case now what is going to be my hypothesis my null hypothesis is going to be mean is less than equals to 30 and my alternate hypothesis will be mean is greater than 30. so I'm only considering one sample so we are doing a one sample T Test now in order to accomplish this thing let me just note down few other things as well my significance level is as usual going to be 0.05 if my P is greater than 0.05 then we accept the null hypothesis else we reject the null hypothesis I think everybody is cleared in here now I am going to only considering that this particular column which is the first column as we are doing one sample t-test so what I will do here is I'll probably go ahead and click on data and go to data analysis and here you can see there is an option called as t-test to sample assuming unequal variances I'm going to do that but before that I am going to just create a dummy variable dummy variable is just created uh it's just a dummy data because there is no option called as one sample t-test so we are going to use two sample t-test but we are going to use the second variable as this dummy variable once you click on OK let me just empty all these records now this is how your original window looks like when you open the data analysis and open the t-test for the very first time the first variable range will be this the second variable being the dummy variable the range will be this I am going to click on labels because my first selected data is the header my hypothesized mean difference is going to be 30. because here we have here the test is to determine whether the female population mean age is significantly greater than 30 or not right now output range I will select this particular cell and click on ok now once this is done this is how my test looks like I'll probably delete this cell because it contains my dummy data and I will rename it to one sample test that's it and instead of hypothesized main difference I'll note it as hypothesize mean everything else Remains the Same as this is a one-tailed test let me just get it back to this side okay as this is the one-tailed test and my P value is 0.
052 which is greater than 0.05 so in this case I am going to accept the null hypothesis so I will note it down as green I'm going to accept the null hypothesis because the P value is greater than 0.05 and this is a one-tailed test now we will perform another test which is going to be for both these particular features now if I am considering both these features what will be my new h0 or null hypothesis my new null hypothesis will be there is no significant difference between the mean age of male and female the same hypothesis we also used in the Z test there is a significant difference between the main age of male and female okay this is my new hypothesis I'll note it down here maybe or else here okay let's note it down here itself okay no problem so this is my hypothesis okay now I'm going to use both these samples so again I will click on data click on data analysis click on the same thing here let me remove everything first the first range is going to be my all the female customers age the second range is going to be all the mail customers range and then the hypothesized mean difference is going to be 0 because I'm going to consider two samples female and male so my hypothesized mean difference is zero because my assumption is there is no significant difference between the mean age of male and female that means the mean edge of male is equivalent to the mean age of female the output range is I'm selecting this cell done everything else looks fine I'll click on OK and this is my two sample test for this here my PE value is also greater than 0.
05 you can see the P value is 0.07 which means it is greater than 0.05 which means we are going to accept the null hypothesis and what is the null hypothesis the null hypothesis is there is no significant difference between the mean age of male and female I hope you understood both these aspects of t-test on how to perform taste test on a sample test on one sample test and how to perform t-test on two sample test that's all about this particular video on detest in the next videos we shall be talking about various other tests see in the next video bye thank you foreign.