Suppose you are interested in examining the effect of 𝑥 on 𝑦. The sample covers the period of 𝑡 = 1, 2, 3, … , 𝑛.
a) Suggest a research question and write the linear regression model that you would estimate. Define the variables.
b) State a hypothesis that you can test for the slope coefficient. Explain all the steps and assumptions.
c) Explain, in your own words, what you understand about using historical data for predictions. Relate your answer to the research question and model in (a).
d) What is a Type I error? How is it related to the level of significance? Use the information in (c) to explain.
a)
The linear regression model: company’s sales for a year and the amount spent on advertising that year.
Variables: x is advertising, y is sales.
"y=ax+b"
"a=\\frac{\\sum y\\sum x^2-\\sum x\\sum xy}{n\\sum x^2-(\\sum x)^2}"
"b=\\frac{n\\sum xy-\\sum x\\sum y}{n\\sum x^2-(\\sum x)^2}"
"y=23x+168"
or
"Sales=23 Advertising+168"
b)
The null hypothesis states that the slope is equal to zero, and the alternative hypothesis states that the slope is not equal to zero.
"H_0:b=0"
"H_{\\alpha}:b\\ne0"
Calculate the standard error of the slope:
"SE=\\frac{\\sqrt{\\sum (y_i-\\hat {y_i})^2\/(n-2)}}{\\sqrt{\\sum (x_i-\\overline{x})^2}}"
where "y_i" the value of the dependent variable for observation "i" ,
"\\hat {y_i}" is estimated value of the dependent variable for observation "i" ,
"x_i" is the observed value of the independent variable for observation "i" ,
"\\overline{x}" is the mean of the independent variable,
"n" is the number of observations.
Degrees of freedom: "df=n-2"
Test statistic:
"t=\\frac{b}{SE}"
The P-value is the probability of observing a sample statistic as extreme as the test statistic.
c)
Using historical data we get regression equation. For predictions we can put new data in the equation, and get result in the future.
For example, in our model:
to know Sales for Advertising=70, we calculate:
"Sales=23\\cdot70+168=1778" million Euro
d)
Type I error (false positive) means rejecting the null hypothesis when it's actually true.
In our test for the slope, for example, we get p-value less than the level of significance, but slope=0 (the null hypothesis is true)
Comments
Leave a comment