Chapter 3.3 en 3.4 Flashcards
the regression line predicts..
the value for the response variable y as a straight line function of the value x of the explanatory variable.
dus welke is y
y = response variable/dependent
en welke is x
x = explanatory variable/independent
wat is ŷ
the predicted value of y
a =
y-intercept
b=
slope
wat is de formule bij de regressielijn
ŷ = a +bx
hoe bereken je y intercept
y aflezen when x=0
slope berekenen
verandering in y / verandering in x
(rise/run)
when the slope is negative…
ŷ decreases when x increases
hoe zie je dat je een steilere regression lijn hebt
als de slope meer negatief of positief is (2 is stijler dan 0,5)
residuals heten ook wel de
…
the prediction errors: hoe ver een datapunt van de regressielijn afvalt.
every value has a residual
oke
positive residual
when y - ŷ > 0. dus actual y is larger than predicted ŷ
negative residual
when y - ŷ < 0. dus actual y is smaller than predicted ŷ
hoe beter de prediction…
hoe kleiner de residual (want ligt dan dichter bij de voorspelde waarde)
hoe zie je een residual in een scatterplot
de vertical distance between data point and line = absolute value.
over welke variabele gaat de residual?
de response variable!
residual formule
y - ŷ
hoe moet je een lijn selecteren
met least squares method (de lijn die gemiddeld de minste afstand heeft tussen de punten en de lijn)
evalueren van de regressielijn met de…
residual sum of squares method:
∑( y - ŷ ) ^2
-> hoe kleiner deze waarde is, hoe beter de lijn!
drie eisen van de regressielijn
- minste afstand (dus kleinste residual sum of squares)
- heeft positieve en negatieve waardes, bij elkaar opgeteld = 0
- passes through the point of ( x̄ ; ȳ ) -> dus gaat door de gemiddelden heen van beide de x en y as.
b = (formule)
b = r * (sx/sy)
y intercept = (formule)
a = ŷ - b*(x̄)
does the slope depend on the numerical values of the variables?
yes, daarom niet appropriate voor het geven van de strenght van de relatie
“So the slope b doesn’t tell us whether the association is strong or weak since we can make b as large or as small as we want by changing the units. By contrast, the correlation does not change when the units of measurement change.”
dus… verandert de correlatie als we de units veranderen?
nee
twee overeenkomsten tussen correlation and regression
- je kan ze alle twee gebruiken als het twee kwantitatieve variabelen zijn waar je een rechte lijn door kan trekken.
- de correlatie en de slope van de regression hebben hetzelfde teken: als de een positief is dan is de andere dat ook, als de een negatief is is de andere dat ook.
wat is r2
het percentage aan variabiliteit in de response variable dat uitgelegd kan worden door de lineaire relatie tussen x en y.
het verschil tussen ŷ en ȳ
ŷ = voorspelde waarde van y
ȳ = gemiddelde van y
hoe kan je r2 krijgen
kwadraat van r (correlatie) nemen.
dit is dus de variabiliteit door de associatie.
welke r2 geeft een betere predictie aan?
grotere r2 = betere predictie
slope = correlation qua sign!!
oke
extrapolation
using the regression line to predict data for x and y that is outside of the available data. (=forecasting)
hebben outliers een effect op correlatie en of regressie?
ja, op beiden -> nonresistant!
lurking variable
a variable that is unobserved, that influences the association between the variables of primary interest (vaak meerdere factoren die een invloed hebben!). het gaat hierbij echt om causes.
Dus er lijkt dan een associatie te zijn tussen twee variabelen, maar dat komt eigenlijk door een derde variabele. Deze variabelen worden niet meegenomen in de studie –> hebben dus confounding potential!
Simpson’s paradox
the direction of an association changes if we add a third variable
confounding
When two explanatory variables are both associated with a response variable but are also associated with each other, confounding occurs
confounding
= association met beiden de explanatory en response variable.