Skip to main content

Basic Hypotheses Testing

Hypothesis testing is one of the most interesting and important statistical tools useful in suggesting a decision or coming to a conclusion about an experiment. Where is it used? Its used in all kinds of fields ranging from scientific studies to economic analyses to business and so on. So what is this testing any way?

Skipping the theory which you will find in any books or Internet sites. I will try explaining from the point of view of a problem rather than a solution. That way, the understanding becomes more better - at least that is what I think. OK, so lets start it.

Lets suppose, one analytics purposed a marketing campaign that is going to increase the sales to 300 per months in each outlet. After the campaign was carried out the result was as follow:

Number of outlet surveyed (n) = 50
Average number of sales (X) = 295 
Standard Deviation (S.D) = 20

Now, how would you react to the analyst. Was he correct or was he wrong? Hmmm. That's funny, because his hypothesis was 300 but the average was 295 very close but not 300

So, there are two options, either he is correct or he is wrong. But, in statistics and in these kind of calculation, it is very difficult to prove either, therefore, we decide in terms of by how much percentage was he right and by how much percentage he was wrong. We call this the significance level.

There are many types of testing depending upon the characteristics of variable and the hypotheses. For example, checking the hypotheses of proportion, difference between means, goodness of fit etc.

So, do you get the problem. Its the testing of the hypothesis and giving a verdict. In the above example, the hypothesis looks very close but its significance level must be check to verify that the difference in the mean, is insignificance to prove the analyst was right.

Now, follow the following testing method.

1. State the Null and Alternative hypothesis

In this example our:
                      Null Hypothesis 
                                       u is equal to  300
                                       u is not equal to 300
  u is the hypothesised mean

      This is also known as two-tailed test.

2. Choose the significance level

Usually the significance level is chosen around 0.01, 0.05, 0.10. The lesser the value the      more less margin for errors.
Lets choose 0.05.

3. Choose the test method

There are many testing methods available in the theory. For this we chose the simple, one sample t-Test. It measures the difference in the observed and hypothesised mean value.

4. Run the test either manually or in software

Lets calculate:

Standard Error (S.E) = S.D / sqrt(n) = 2.83
DF (degree of freedom) =  n-1 = 49
t = (X-u) /S.E = 1.77 where X is the observed mean.

5. Calculate the P-Value

Now we calculate the P-value. You can use t-Distribution calculator or a table to find the P value. P-Value is the probability that the t-score having a degree of freedom is less than -1.77 and greater then1.77. This choice is due to the fact that we are doing two-tailed test.

P(t<-1.77) = 0.04 and P(t>1.77) = 0.04. 
Thus P value = 0.04 + 0.04 = 0.08

6. Interpret the result  

Since the P-value is greater than our significance level, we cannot reject the Null Hypothesis.

So the verdict is that the Analyst was correct within the significance of .08.

There are two kind of error that we can happen in this process. 

First, we conclude that hypothesis is right when it is wrong. 
Second , we conclude that hypothesis is wrong when it is right.

The above error has been named as I and II. 

Well, the above analysis was not mean to teach how to carry a hypothesis test but to clarify the point of carrying out the test in the very first place. 

All the other statistic test are used so that we have a quantitative view of the problem and make decision depending upon the empirical value, as this gives us more confidence in our decision. But, as always I say, we need to utilize more than just numbers but also intuition.

Lastly, what would it mean to test the hypotheses on zero level of confidence. It would mean that the value of observed mean must be exactly equal to the hypothesised value for the hypothesis to be correct and there is no other option. It is an qualitative analysis.
Hope it was helpful.


Popular posts from this blog

Good Ad Versus Bad Ad

At InRev , for past few days we have been working on our new project. The project is about collaborative blogging, from the blogger around the world. As Bhupendra and I have been blogging for long time, with his immense experience, our team has been working to revamp the globalthoughtz and create a new blogging experience. In this site, we are planning to add a section where people can add their advertisement. We thought lets start by our own :), with already so many products on the line, it was obvious. So there goes an effort to create a small 128 px by 128 px logo. If you are a designer, you know that designing is a very time consuming process. For hours, you just test around with colors. Remember there are 256 X 256 X 256 combination of colors!! Its hard job selecting one. Lets start with F-Cube : In short F-cube is a Free Economic Reporting Site. Let me exhibit some Ad made for it and its pros and cons. (Please don't click on the image. Wait till the end. Thank You) OK

Passion and Flying

There is an interesting aspect of flying which grasps everyone's imagination. The freedom and the control of moving around the space without any obstacle is just too much to ask for, in one man's life :). Isn't it? As a young kid like everyone, flying was a dream. Not to mention the great stories of Leonardo Da Vinci and the Wrights brothers, who not only dreamt but also went on designing one, would inspire you to believe that some day in future it would be possible to fly like a bird. So let me tell you a short story about myself where I took myself to some limit into achieving this. :) I have been wanting to tell this for a long time but never found any occasion or reason to do so. It was long ago when I was still in grade 3/4, should be around 1993. Space Channel was just installed in our house and I would spend time watching cartoons and other science programs. That was when I noticed gliders and parachutes. The shear simplicity of the design took me by surprise.

Aug 3rd : Meaning Behind It

screen-shots of my diary on August 3rd I live a philosophical life with full concentration on wholeness rather than a single celled ideology. So I have come to see that August 3rd is more important to me than my birthday, cause this is the day when I actually started my journey into the wilderness with full consiousness. It was on August 3 that I started my newly owned life in Bangalore. Remembering my uncertainty at that time, the only thing I was sure about was finding myself. I think I have in many ways found myself in last 3 years. There is this wonderful saying - "You change because you have not found yourself yet". So I am still changing and the process of perfecting continues. It also happens that unknowingly, I tend to take into new journey every August. May be its because of its position in the yearly calender. But beside me, I know that there are hundred of Nepalese students who embark on their educational journey to America, UK and other areas on this very