F-Test : Do we accept the null-hypothesis?

  • MHB
  • Thread starter mathmari
  • Start date
In summary: To get the F-value from LINEST, we need to specify 4 parameters. And we must make it an array formula with Ctrl+Shift+Enter.
  • #1
mathmari
Gold Member
MHB
5,049
7
Hey! :eek:

The below table shows the average monthly gross income of a sample of 44 developers. For each individual sample, it is indicated their country of employment and years of service in their field.

Calculate the regression line with the dependent variable the monthly gross income and independent the years of employee service and check the significance of the F criterion at $\alpha = 0.05$. I have done the following:

View attachment 9503

Therefore we get:
\begin{align*}\nu &=44 \\ \overline{X}&=\frac{\sum X}{\nu}=\frac{426.1}{44}=9.68 \\ \overline{Y}&=\frac{\sum Y}{\nu}=\frac{299767.60}{44}=6812.9 \\ \hat{\beta}&=\frac{\nu \sum \left (XY\right )-\left (\sum X\right )\left (\sum Y\right )}{\nu\sum X^2-\left (\sum X\right )^2}=\frac{44 \cdot 2911490.795-426.1\cdot 299767.60}{44\cdot 4417.39-426.1^2}=\frac{1.2810559498 \cdot 10^8-1.2773097436 \cdot 10^8}{194365.16-181561.21} \\ & =\frac{374620.62}{12803.95}=29.26 \\ \hat{\alpha}&=\overline{Y}-\hat{\beta}\cdot \overline{X}=6812.9-29.26\cdot 9.68=6812.9-283.2368=6529.66\end{align*}

So the regression line is \begin{equation*}\hat{Y}=29.26X+6529.66\end{equation*} We consider a F-test whether the slope is $0$ or not.

We have the formula $\displaystyle{F=\frac{MSM}{MSE}=\frac{\text{explained variance}}{\text{unexplained variance}}}$.

We have that $\displaystyle{MSM = \frac{SSM}{DFM}}$ with $\displaystyle{SSM=\sum_{i=1}^n\left (\hat{Y}_i-\overline{Y}\right )^2}$ and $\displaystyle{DFM = p - 1}$.

We also have that $\displaystyle{MSE = \frac{SSE}{DFE}}$ with $\displaystyle{SSE=\sum_{i=1}^n\left (Y_i-\hat{Y}_i\right )^2}$ and $\displaystyle{DFE = \nu-p}$. We have this table.

So we get
\begin{align*}&SSM=249138.5759 \\ &DFM=2-1=1 \\ &SSE=104926827.5 \\ &DFE=44-2=42 \\ &MSM=\frac{SSM}{DFM}=\frac{249138.5759}{1}=249138.5759 \\ &MSE=\frac{SSE}{DFE}=\frac{104926827.5}{42}=2498257.7976 \\ &F=\frac{MSM}{MSE}=\frac{249138.5759}{2498257.7976}=0.0997\end{align*}

Using at the R-program the command pf(0.0997, 1, 42, lower.tail=F) we get the p-value $0.7537537$.

That means that $\text{p-value} > \alpha$, does this mean that we accept the null hypothesis, i.e. that the slope is not significally different from $0$.

Is that correct? (Wondering)
 

Attachments

  • Y_X.JPG
    Y_X.JPG
    96.4 KB · Views: 64
Physics news on Phys.org
  • #2
mathmari said:
That means that $\text{p-value} > \alpha$, does this mean that we accept the null hypothesis, i.e. that the slope is not significally different from $0$.

Is that correct?

Hey mathmari!

Formally it means we do not have sufficient evidence to conclude the slope is different from 0.
We 'keep' the null hypothesis, but we cannot conclude that the slope is 0. (Nerd)
 
  • #3
Klaas van Aarsen said:
Formally it means we do not have sufficient evidence to conclude the slope is different from 0.
We 'keep' the null hypothesis, but we cannot conclude that the slope is 0. (Nerd)

Ah ok! Is there a way to check if my results are correct? (Wondering)
 
  • #4
mathmari said:
Ah ok! Is there a way to check if my results are correct?

Excel has the [M]LINEST[/M] function.
One of its outputs is the F-value when used in a 5x2 array context for a simple linear regression. (Thinking)
Excel also has the [M]F.DIST[/M] function to convert an F-value into a probability.

We can also do a t-test for the slope as we did before. It should yield the same p-value. (Thinking)

Additionally we can draw a graph of the points and the line to see if it makes sense that the explained variance is so much lower than the unexplained variance. (Thinking)
 
  • #5
Klaas van Aarsen said:
Excel has the [M]LINEST[/M] function.
One of its outputs is the F-value when used in a 5x2 array context for a simple linear regression. (Thinking)

Using the command [M]LINEST(D2:D45;B2:B45)[/M] I get $29.25833947$. If I used the command correctly, I must have a mistake at the calculations of $F$. But what? (Wondering)
 
  • #6
mathmari said:
Using the command [M]LINEST(D2:D45;B2:B45)[/M] I get $29.25833947$. If I used the command correctly, I must have a mistake at the calculations of $F$. But what? (Wondering)

To get the F-value from LINEST, we need to specify 4 parameters. And we must make it an array formula with Ctrl+Shift+Enter. (Thinking)

You should also get for instance the slope and the y intercept. Do they match? (Wondering)
 

1. What is an F-test?

An F-test is a statistical test used to compare the variances of two populations. It is often used to determine if there is a significant difference between the means of two groups.

2. What is the null hypothesis in an F-test?

The null hypothesis in an F-test states that there is no significant difference between the variances of the two populations being compared. In other words, the two groups have equal variances.

3. How do we interpret the results of an F-test?

If the p-value is greater than the chosen significance level (usually 0.05), we accept the null hypothesis and conclude that there is no significant difference between the variances of the two populations. If the p-value is less than the significance level, we reject the null hypothesis and conclude that there is a significant difference between the variances.

4. What is the significance level in an F-test?

The significance level, also known as alpha, is the probability of rejecting the null hypothesis when it is actually true. It is typically set at 0.05, meaning there is a 5% chance of incorrectly rejecting the null hypothesis.

5. Can an F-test be used for more than two groups?

Yes, an F-test can be used to compare the variances of more than two groups. In this case, it is called an ANOVA (Analysis of Variance) test. However, if the number of groups is large, it may be more appropriate to use other statistical tests such as the Bartlett's test or Levene's test.

Similar threads

  • Set Theory, Logic, Probability, Statistics
Replies
26
Views
3K
  • Set Theory, Logic, Probability, Statistics
Replies
2
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
1
Views
926
  • Set Theory, Logic, Probability, Statistics
Replies
1
Views
2K
  • Set Theory, Logic, Probability, Statistics
Replies
1
Views
868
  • Set Theory, Logic, Probability, Statistics
Replies
20
Views
3K
  • Set Theory, Logic, Probability, Statistics
Replies
1
Views
750
  • Set Theory, Logic, Probability, Statistics
Replies
9
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
6
Views
2K
Replies
1
Views
2K
Back
Top