- A t-test is a type of inferential statistic used to determine if there is a significant difference between the means of two groups, which may be related in certain features.
- It is used as a hypothesis testing tool, which allows testing of an assumption applicable to datasets.
- To compare the agricultural yield of two barley produce batches. The first batch was produced under natural conditions the second batch was produced in a greenhouse.
- To compare the height of boys (having parents shorter than 4 feet tall) at different stages of their childhood.
- Determine the effectiveness of a weight loss program. Before and after weights of 15 subjects in the program.
- Paired T-test: a statistical test that compares two related or dependent groups to determine if there is a significant difference between the two groups.
- Unpaired T-test: a statistical procedure that compares two independent or unrelated groups to determine if there is a significant difference between the two.
Paired t-tests are considered more powerful than unpaired t-tests because using the same participants or item eliminates variation between the samples that could be caused by anything other than what’s being tested.
-
Two-tailed hypothesis tests: are also known as nondirectional and two-sided tests because you can test for variations in both directions. When you perform a two-tailed test, you split the significance level percentage between both tails of the distribution.
-
One-tailed hypothesis tests: are also known as directional and one-sided tests because you can test for variations in only one direction. When you perform a one-tailed test, the entire significance level percentage goes into the extreme end of one tail of the distribution.
Two Tailed T-test | One Tailed T-test |
---|---|
src
folder contains the source code.results
folder contains code output screenshots.
- Edit the code to contain dataset specific to your hypothesis
- Adjust the Critical Value based on your requirement
- Install any necessary libraries if needed
- Run the file