Week 5: Hypothesis
The basic methodology used in the pursuit of knowledge is to
Formulate hypothesis
Gather data
Examine wether the data supports the hypothesis
Steps for hypothesis testing
- Formulate null (H0) and alternative (H1) hypothesis
- Chose the significance level (alpha)
Null Hypothesis is where things go as expected, alternative hypothesis is the unexpected
Legend
Miu
Population parameter
In statistics, a population parameter is a number that describes something about an entire group or population
X_
Sample mean
Alpha
Significance level
Usually 0.05 and set by the researcher
Usually 0.05
- Calculate the test statistic and critical value
n
Sample size
Sx
Sample Standard Deviation
t-stat
Test statistic
Compares your data with what is expected under the null statistic
We use this formula to calculate the t-stat
Critical Value
Df
Degrees of freedom
n-1 when calculating 1 parameter
Obtained from the T distribution
For critical value we use excel and use
For two sided tests = t.inv.2t (significance level, degrees of freedom)
- Make a decision
If critical value > than the t-stat (absolute value) there is no sufficient evidence to reject the null hypothesis
Types of tests
Two Sided (tailed) tests
Alternative hypothesis = Population parameter is not equal to the hypothezised value
One sided test
Greater than
Lesser than
For one sided tests = t.inv (significance level, degrees of freedom)
Errors in hypothesis testing
Type 1 error
Rejecting null hypothesis who its true
Type 2 error
Not rejecting the null hypothesis when it is false
Probability of a type 1 error = significance level
By reducing the significance levels we reduce the probability of committing a type 1 error but we increase the probability of committing a type 2
For lineal regression models we use
n-2 when calculating 2 parameters
P -value approach
P value
Probability that a sample deviates an x amount from the population mean given that the null hypothesis is true
If p value is less than alpha or significance level then we reject null hypothesis
If p value is greater or equal we do not reject null hypothesis, but not necessarily reject
Reject null hypothesis if p value is less than alpha in two tailed
P value divided by two for one tailed tests
Based on the sample tested compared to true population