POLI 380 - Midterm 2

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/45

encourage image

There's no tags or description

Looks like no tags are added yet.

46 Terms

1
New cards

Standard deviation (SD)

The average distance of the observations to the mean.

2
New cards

Standard deviation function (R)

sd(X , na.rm = T)

3
New cards

Standard deviation formula (R)

sd(X) = sqrt(sum(obsevation_x - mean_x)² / sum(x))

4
New cards

Normal distribution

Range of data where 95% of the observations fall within 1.96 SDs from the mean.

5
New cards

Z-scores

Distance from the mean in standard deviations for a individual observation.

6
New cards

Z-score formula (R)

observation_x - mean_x / sd(x)

7
New cards

Centering

Center the data around the mean to determine if the observation is above or below the mean.

8
New cards

Scaling

Adjusts the data to to tell us how many SDs away an observation is from the mean.

9
New cards

Variance

Square of the standard deviation, used to measure spread of distribution.

10
New cards

Scatterplot

Visualize relationship between two variables by plotting X against Y.

11
New cards

Correlation Coefficient

Summarizes the direction and strength of the linear association between the two variables.

12
New cards

Correlation Coefficient Formula (descriptive)

Sum of the product of the z-scores of X and Y divided by the number of observations.

13
New cards

Correlation Coefficient Interpretation: Line of Best Fit

cor > 0 = line of best fit is positive

cor < 0 = line of best fit is negative

14
New cards

Correlation Coefficient Interpretation: Strength of Linear Association

|cor| = 0 : no linear association

|cor| = 1 : perfect linear association

15
New cards

Process of Prediction

Fitting a model and making predictions.

16
New cards

Predictors

Variables that are used as the basis for our prediction (X).

17
New cards

Outcome Variable

Variables that are used to measure what we want to predict (Y)

18
New cards

Y(hat)

The predicted value of Y based on the values of X and the model that summarizes the relationship between X and Y.

19
New cards

E(hat) = Y - Y(hat)

The errors of our predictors.

20
New cards

Line coefficients

Intercept & Slope

21
New cards

Intercept - a(hat)

Specifies the vertical location of the line.

22
New cards

Slope - b(hat)

Angle or steepness of the line.

23
New cards

Line formula.

Y(hat) = a(hat) + b(hat)X

24
New cards

lm()

Used to fit a linear model. lm(Y ~ X, data = df)

25
New cards

Fitted line

Used to measure the linear relationship between X and Y.

26
New cards

Fitted Line Formula

Y(Hat) = a(hat) + b(hat)X

27
New cards

Residual

The difference between the predicted value and the actual value.

28
New cards

Least squares method

Used to minimize residuals by finding a fitted line where the sum of the square of the prediction errors is lowest.

29
New cards

Model Fit

How good does the model do in making predictions?

30
New cards

R2

Measure the proportion of the variation in the outcome variable explained by the model.

31
New cards

Impact of R2

Higher value means that the model better fits the data.

32
New cards

Formula of R2

R^2 = cor(X , Y )^2

33
New cards

Linear Models - Best Practice

Find X variables that are correlated with Y.

34
New cards

Observational Data

Data collected about naturally occurring events,

35
New cards

Confounders

Variables that affects both the treatment and outcome variables.

36
New cards

Issue of Confounders

Confounders obscure the causal relationship between X and Y.

37
New cards

Relationship between slope and difference-in-means

Same value.

38
New cards

Relationship between intercept and control group.

Same value.

39
New cards

Multiple Linear Regression

Linear regression with more than one treatment variables.

40
New cards

Interpreting Coefficients in Multiple Linear Regression

Intercept is Y when all X are 0. (A)

Slope is the change of Yj associated with the change of Xj = 1 while holding all other X variables constant. (B)

41
New cards

Confounding and Muliple Linear

Adding confounders as controls in the model makes treatment and control group s comparable after controls.

42
New cards

Controlling Confounding

Adding Z as a control variable in the model makes the values of Z constant.

43
New cards

Probability

Proportion of specific events over infinitely many identical trials.

44
New cards

Probability Distribution

Likelihood of each value can take.

45
New cards

Sample Variation

Variance of the sample’s observation.

46
New cards

Effects of Sample Size

Larger sample sizes are closer to the true effect of the population.