Data Literacy Exam 1

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

1/103

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 7:03 AM on 10/14/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

104 Terms

1
New cards

X

the information you use to make a prediciton

2
New cards

Y

the outcome of what you want to predict

3
New cards

fitted line

summarizes the relationship between X and Y

4
New cards

Prediciton

the estimated value of Y for a particular X

5
New cards

Linear regression equation

Ŷ = α̂ + β̂X


6
New cards
Ŷ


predicted outcome is the value of Y the model predicts

7
New cards
α̂ (alpha hat)


intercept, the predicted Y when X=0

8
New cards
β̂ (beta hat)


the predicted change in Y when X increases by one unit

9
New cards

least squares

The model chooses the line that minimizes the sum of squared prediction errors by finding the line of best fit.

10
New cards

prediction error

vertical distance between an actual data point and the fitted line.

11
New cards

purpose of squaring errors

prevents positive and negative errors from canceling and penalizes larger errors more heavily.

12
New cards

lm()

fits a linear regression model

13
New cards

abline ()

adds the fitted line to a scatterplot

14
New cards

Y ~ X

predict Y using X

15
New cards

correlation

tells us the direction and strength of a linear relationship

16
New cards

positive correlation

as X increases, Y tends to increase

17
New cards

Negative correlation

as X increases, Y tends to decrease

18
New cards

Correlation near zero

little linear association, although a curved relationship may still exist

19
New cards

Correlation of +1 or −1

a perfectly linear relationship

20
New cards

linear probability model

A linear regression with a binary outcome

21
New cards

logistic regression

designed for binary outcomes

22
New cards

R²

coefficient of determination, measures the proportion of variation in Y explained by the model

23
New cards

coefficient of determination (R²)

R² = cor(X,Y)²

24
New cards

Higher R²

the model explains more of the variation in Y

25
New cards

R² = 1

the model explains 100% of the variation

26
New cards

R² = 0

the model explains none of the variation through a linear relationship

27
New cards

Straight line

learns two coefficients and captures the overall trend

28
New cards

Connect-the-dots

joins neighboring training observations, following individual data points much more closely

29
New cards

overfitting

when a model fits the peculiarities of a sample rather than the true underlying pattern, causing poor performance on new data

30
New cards

k-fold cross-validation:

cut the data into 𝑘 groups; each takes a turn as the test set; average the 𝑘 test errors, the lowest cross-validated error wins

31
New cards

neural network

many bent lines, glued together and stacked in layers

32
New cards

LASSO and ridge regression

many X’s, plus a penalty that shrinks the ̂𝛽s toward 0 to prevent overfitting

33
New cards

Decision trees and random forests

split the data into groups (e.g., under/over 30) and predict each group’s mean; a forest averages hundreds of trees

34
New cards

Large language models (ChatGPT, Claude)

neural networks with billions of ̂𝛽s, trained to predict the next word

35
New cards

features

predictors (𝑋)

36
New cards

target, label

outcome (𝑌)

37
New cards

weights and bias

slope(s) ̂𝛽 and intercept ̂𝛼

38
New cards

training a model

fitting it, e.g., with lm()

39
New cards

loss function

what we minimize: the sum of squared prediction errors

40
New cards

regression vs. classification

predicting a number vs. predicting a category

41
New cards

supervised vs. unsupervised learning

we observe 𝑌 vs. we only observe 𝑋 (e.g., finding groups of similar voters)

42
New cards

MEASURE:

To infer population characteristics via survey research (ex. what proportion of constituents support a particular policy)

43
New cards

PREDICT:

to make predictions (ex. who is the most likely candidate to win an upcoming election?)

44
New cards

EXPLAIN:

To estimate the causal effect of a treatment on an outcome (ex. what is the effect of small classrooms on student performance?)

45
New cards

Dataset

A collection of observations and variables

46
New cards

Observation

The unit or case represented by a row

47
New cards

Variable

A characteristic measured in the data

48
New cards

Unit of observation

The entity each observation represents

49
New cards

Unit of measurement

The scale or units in which a variable is measured

50
New cards

Binary variable

A variable with two possible values, often 0 and 1

51
New cards

Categorical variable

Places observations into categories

52
New cards

Quantitative variable

Measures a numerical quantity

53
New cards

The distribution of a variable

  • Which values occur

  • How often they occur


54
New cards

The distribution of a variable: center

Measured with:

  • Mean

  • Median


55
New cards

The distribution of a variable: spread

Variability in the data.

Measured with:

  • Range

  • Variance

  • Standard deviation


56
New cards

The distribution of a variable: skew

Direction of a long tail.

  • Right-skewed - tail right

  • Left-skewed - tail left


57
New cards

The distribution of a variable: peaks

  • Unimodal = one peak

  • Bimodal = two peaks


58
New cards

Mean

Mean = (Sum of all values) / (Number of values)​

59
New cards

Mean of a Binary Variable

For a binary variable coded 1 and 0

60
New cards

Median

Middle observation after sorting

61
New cards

Mode

Most common value

62
New cards

Use the median when:

  • Data are skewed

  • There are outliers


63
New cards

Treatment Variable

The intervention or condition.

Examples:

  • Receiving campaign mail

  • Taking a drug


64
New cards

Outcome Variable

What is measured afterward.

Examples:

  • Voting

  • Recovery


65
New cards

Individual Causal Effect

Y(1)−Y(0)

the difference between a person's outcome with treatment, Y(1), and without treatment, Y(0)

66
New cards

Average Causal Effect (ACE)

Average of individual causal effects across all units.

E[Y(1)−Y(0)]

67
New cards

Fundamental Problem of Causal Inference

For any person we can observe:

  • Treatment outcome OR

  • Control outcome

But never both simultaneously.

Therefore: We never directly observe individual causal effects.

68
New cards

Selection Effects

People who choose treatment often differ from those who do not.

Example: People who exercise may already be healthier.

The difference you're seeing might be due to who chose the treatment, not the treatment itself.

69
New cards

Randomized Experiment

Researchers assign treatment randomly.

Advantages:

  • Eliminates selection effects

  • Strong causal evidence


70
New cards

Observational Study

Researcher only observes existing choices.

Disadvantages:

  • Confounding

  • Selection bias


71
New cards

Difference-in-Means Estimator

overline(Y)T−overline(Y)C​

Treatment-group average minus control-group average.

Measures estimated treatment effect.

72
New cards

When is Difference-in-Means Valid?

when:

E[Y(0)|T=1]=E[Y(0)∣T=0]

Meaning groups are comparable before treatment.

Best way to guarantee this:

Random assignment

73
New cards

Checking Comparability


Compare pre-treatment characteristics:

  • Age

  • Income

  • Education

  • Gender

  • Prior behavior

Groups should look similar before treatment.

74
New cards

Percentage Points vs Percent

Example:

Treatment group voting: 45%

Control group voting: 40%

Difference:

45%−40%=5

75
New cards

Pros of Randomized Controlled Experiments

  • Strong causal evidence

  • Minimizes selection bias

  • Easy interpretation


76
New cards

Cons of Randomized Controlled Experiments

  • Expensive

  • Ethical concerns

  • Sometimes impractical

  • Limited external validity


77
New cards

Random Assignment

Creates comparable treatment/control groups.

Helps causal inference.

78
New cards

Random Sampling

Creates representative samples.

Helps population inference.

These are different concepts.

79
New cards

Valid Population Inferences need:

  • Representative sample

  • Probability sampling

  • Low nonresponse

Without representativeness, results may not generalize.

80
New cards

Nonresponse Bias

People who respond differ from those who don't.

81
New cards

Social Desirability Bias

People give socially acceptable answers rather than truthful answers.

82
New cards

Selection Bias

Sample differs systematically from population.

83
New cards

List Experiments Purpose:

Reduce social desirability bias when asking sensitive questions.

Respondents reveal only how many statements are true, not which ones.

84
New cards

Tables

Counts or percentages

85
New cards

Histogram

Shows distribution using bins

86
New cards

Density Plot

Smoothed histogram

87
New cards

Box Plot

Displays:

  • Median

  • Quartiles

  • Outliers


88
New cards

Variance

Average squared distance from the mean.

s²

89
New cards

Standard Deviation

Square root of variance.

s

Interpretation: Typical distance from the mean.

90
New cards

Scatter Plot

Plots:

  • X variable on horizontal axis

  • Y variable on vertical axis

Used to visualize relationships.

91
New cards

Curved Relationships

Strong nonlinear relationships can have correlation near 0.

92
New cards

Outliers

One outlier can dramatically change correlation.

Always plot your data.

93
New cards

Ecological Fallacy

Occurs when conclusions about individuals are drawn from aggregate data.

Example: State-level patterns may not apply to individuals.

The unit of observation matters.

94
New cards

Correlation Is Not Causation

Correlation alone does not establish causality because:

  • Reverse causation possible

  • Confounding variables possible


95
New cards

Least Squares Method

∑(Yi​−Y^i​)²

96
New cards

β̂ (Slope)

Expected change in Y from a one-unit increase in X.

Units:

(Units of Y)/(Units of X)​

97
New cards

Binary Outcome Variables


  • Predictions are probabilities

  • Coefficients often interpreted in percentage points

Example:

β^=.03

A one-unit increase in X increases probability by 3 percentage points.

98
New cards

Extrapolation

Predicting beyond observed data.

Dangerous because the relationship may not continue.

Example: Estimating income for age 150.

99
New cards

R² (Coefficient of Determination)

Measures proportion of variation in Y explained by X.

Range:

0≤R²≤1

100
New cards

Interpreting R² = 0.4

Means:

40% of the variation in Y is explained by the model.

The remaining 60% is unexplained.