In this article, we will talk about concepts of hypothesis testing and how it is solved using Independent t-test.

In other words, we use a random sample of data taken from a population to describe and make inferences about the population. For example, Indian Government wants to know about response of its citizens on a new policy. It is not possible to reach out each citizen to collect feedback as it's a very expensive and time-consuming process. Instead they reach out to a sample of it from each district or state and make judgement whether people are happy with the policy or not.

2.

If an innocent person is convicted, it is a type I error (False Positive). If court lets guilty person go free, it is type II error (False Negative). Description of type I and II error is shown in the image below -

## Hypothesis Testing : Meaning

You have sample data and you are asked to assess the credibility of a statement about population using sample data.In other words, we use a random sample of data taken from a population to describe and make inferences about the population. For example, Indian Government wants to know about response of its citizens on a new policy. It is not possible to reach out each citizen to collect feedback as it's a very expensive and time-consuming process. Instead they reach out to a sample of it from each district or state and make judgement whether people are happy with the policy or not.

**Statistical significance**evaluates the likelihood that an observed (actual) difference is due to chance. It deals with the following question :If we selected many samples from the same population, would we still find the same relationship between these two variables in every sample? Or is our finding due only to random chance?

## Independent T-Test

The independent t test evaluates whether the means for two independent groups are significantly different from each other. It is used for just 2 groups of samples. If you have more than 2 groups of samples, you should use ANOVA.Assumptions

- Each score is sampled independently and randomly.
- The scores are normally distributed within each of the two groups.
- The variance in each of the groups is equal.

Case Study

How powerful are rumors? Frequently, students ask friends and/or look at instructor evaluations to decide if a class is worth taking. Kelley (1950) found that instructor reputation has a profound impact on actual teaching ratings. *[Source : Journal of Personality, 18, 431-439]***Experimental Design**Before viewing the lecture, students were given a summary of the instructors prior teaching evaluations.**There were two types of instructors : Charismatic instructor and Punitive instructor.**Null Hypothesis

It is a statement that you want to test. It usually states that there is no relationship between the two variables.
In this case, the null hypothesis states that **there is no difference between the mean ratings of the charismatic-teacher-reputation condition and the punitive-teacher-reputation condition.**Alternate Hypothesis

It is contrary to the null hypothesis. It usually states that there is a relationship between the two variables.
In this case, the alternate hypothesis states that **there is a difference between the mean ratings of the charismatic-teacher-reputation condition and the punitive-teacher-reputation condition.**## What is p-value in simple terms?

P-value evaluate how well the sample data support that the null hypothesis is true. A low P value means that your sample provides enough evidence that you can reject the null hypothesis for the entire population. In technical language, it means lowest level of significance at which you can reject the null hypothesis.Type I and II Errors Examples

1. Let's say you are testing a new drug for some disease.**Null Hypothesis :**New Drug has no effect on disease. In a test of its effectiveness, a type I error would be to say it has an effect when it does not**(False Positive)**; a type II error would be to say it has no effect when it does**(False Negative)**.2.

**Null Hypothesis :**Person is innocentIf an innocent person is convicted, it is a type I error (False Positive). If court lets guilty person go free, it is type II error (False Negative). Description of type I and II error is shown in the image below -

Hypothesis Testing : Type I and II Errors |

Interpretation

An independent-samples t-test was used to test the difference between the mean ratings of the charismatic-teacher-reputation condition and the punitive-teacher-reputation condition. The output from SPSS is shown below
*Assumption Check*

The columns labeled "Look at the column labeled "Sig." under the heading "Levene's Test for Equality of Variances". In this example, the significance (p value) of Levene's test is .880. If this value is less than or equal to 5% level of significance (.05), then you can reject the null hypothesis that the variability of the two groups is equal, implying that the variances are unequal." tell us whether an assumption of the t-test has been met. The t-test assumes that the variance in each of the groups is approximately equal.Levene's Test for Equality of Variances

If the significance (p value) of Levene's test is less than or equal to 5% level of significance (.05), then you should use the bottom row of the output (the row labeled)"Equal variances not assumed"

If the significance (p value) of Levene's test is greater than 5% level of significance (.05), then you should use the middle row of the output (the row labeledIn this example, .880 is larger than 0.05, so we will assume that the variances are equal and we will use the middle row of the output.)"Equal variances assumed"

Conclusion

The column labeled "Sig. (2-tailed)" gives the two-tailed p value associated with the test. In this example, the p value is .018.
Since p-value .018 is less than .05, so we reject null hypothesis. That implies that there is a significant difference between the mean ratings of the charismatic-teacher-reputation condition and the punitive-teacher-reputation condition.
Hi Deepanshu,

ReplyDeleteI like your blog & i follow it regularly. Your explanation is crystal clear. I learned many things from your blog. Please try to post below requests;

1) statistical modeling using SAS & R

2) how to fit model using SAS & R

3) fitting the model with SAS & R

4) Normal Distribution

5) Correlation

6) Linear Regression

7) Multiple Regression

8) ANOVA

9) Categorical Data Analysis

Many thanks & Kind Regards,

Naveen

Sure. I will write about these topics!

DeleteDeep, Thanks a lot.

Deletehi this is kartik,

ReplyDeletehow do we know which teacher is better..??

Look at the mean difference of ratings of the charismatic-teacher-reputation condition and the punitive-teacher-reputation. Since difference is positive, it means charismatic-teacher is better.

DeleteHi Bhalla, pls I want to know how to interpret Cluster Analysis and PCA. I have some data i want interpret. I love the clarity of your explanations. If you don't mind you can send it to my email:michaelokiotor@gmail.com

ReplyDeleteThanks

I'm a reearch student.

ReplyDeleteThanks

Deepanshu, Your blog is awesome bro! Thanks for sharing.. Keep up the good work

ReplyDeletewhen we talk of two groups on t-test is it between two regression models or two columns, can we say f-Test is a method to compare models

ReplyDeleteThis comment has been removed by the author.

ReplyDeleteThis is such a great resource that you are providing and you give it away for free. I love seeing blog that understand the value of providing a quality resource for free. Trentostan-m

ReplyDeletesir, 1.if our variance of two groups are not equal then what will we do?

ReplyDelete2. If our null hypothesis is reject that is our p value is less than 0.05 then how can we find which one is grater in charismatic-teacher-reputation condition and the punitive-teacher-reputation condition.

sir i will suggest you . you creat a youtube channel and upload a video.sir u are great teacher.

ReplyDelete