Professional Documents
Culture Documents
Eenvoudige Lineêre Regressie Simple Linear Regression
Eenvoudige Lineêre Regressie Simple Linear Regression
Eenvoudige Lineêre Regressie Simple Linear Regression
Regressie
Regression
Y = β0 + β1.X + ε
1) 67 75
2) 87 65
3) 87 67
4) 68 70
5) 72 82
6) 62 67
7) 76 51
8) 65 52
9) 73 50
1
Ons stel belang in the verwantskap tussen die twee
veranderlikes, maar meer as dit, wil ons ook tempratuur
gebruik of sterkte te voorspel.
We are interested in the relationship between the two
variables, but more than that, we want to predict
strength using temperature.
Verspreidingsdiagram
Scatter plot
90
80
70
Sterkte / Strength (N/m2)
60
50
40
30
20
10
0
0 20 40 60 80 100
Temp (C)
Ons moet die lyn kry wat hierdie data die “beste” pas.
We need the line that “best” fit these data.
Ons weet ons gaan ‘n fout maak met seker indien nie al die
punte nie, ons soek die lyn wat hierdie foute gaan
minimeer.
We know that we will make mistakes with some, if not all
the points, we need a line that minimises this mistake.
2
Y = β0 + β1.X + ε
β0 ≡ Beta 0 Y-afsnit
Y-intercept
Verspreidingsdiagram
Scatter plot
90
80
70
Sterkte / Strength (N/m2)
60
50
40
30
y = 68.164 - 0.0525x
20
10
0
0 10 20 30 40 50 60 70 80 90 100
Temp (c)
Sakrekenaar / Calculator
3
Te St Voorspelde St Fout
Predicted St Residual
1) 67 75 64.65 -10.35
2) 87 65 63.60 -1.4
3) 87 67 63.60 -3.4
4) 68 70 64.59 -5.41
5) 72 82 64.38 -17.62
6) 62 67 64.91 -2.09
7) 76 51 64.17 13.17
8) 65 52 64.75 12.75
9) 73 50 64.33 14.33
4
Korrelasiekoëffisiënt
Correlation Coefficient
r -1 ≤ r ≤ 1
Bepalingskoëffisiënt
Coefficient of Determination
r2 0 ≤ r2 ≤ 1
Gee vir ons ‘n aanduiding van watter deel van die variasie
van die Y’s word verklaar deur die X’e.
Gives us an indication of what part of the variation of the
Y’s is explained by the X’s.
Hoe nader aan 1, hoe meer verklaar X vir Y, dus hoe beter
is ons model vir vooruitskattings.
The closer to 1, the more X explains Y, thus the more
accurate our model for predictions.
vs Y
5
SST en SSR bereken met sakrekenaar.
Calculate SST and SSR using the calculator.
Excel
Regression Statistics
Multiple R 0.042
R Square 0.0018 R2
Adjusted R Square -0.141
Standard Error 11.989
Observations 9
ANOVA
df SS MS F Sig F
Regression 1 1.7840 1.7840 0.0124 0.9144
Residual 7 1006.2160 143.7451
Total 8 1008
Coef SE t Stat P-value
Intercept 68.164 34.614 1.969 0.090
Temp -0.052 0.471 -0.111 0.914
Inferensie
Inference
Intervalle
Interevals
6
Hipotesetoetse
Hypothesis Tests
F-Toets
F-Test
H0: β0 = β1 = 0
H1: Ten minste een is nie 0 nie.
At least one is not 0.
7
T-Toets
T-Test
H0: β0 = 0 H1: β0 ≠ 0
H0: β1 = 0 H1: β1 ≠ 0 H0: ρ = 0 H1: ρ ≠ 0
Excel
Regression Statistics
Multiple R 0.042
R Square 0.002
Adjusted R Square -0.141
Standard Error 11.989
Observations 9
ANOVA
df SS MS F Sig F
Regression 1 1.7840 1.7840 0.0124 0.9144
Residual 7 1006.2160 143.7451
Total 8 1008
Coef SE t Stat P-value
Intercept 68.164 34.614 1.969 0.090
Temp -0.052 0.471 -0.111 0.914