Terms and Definitions

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

1/117

encourage image

There's no tags or description

Looks like no tags are added yet.

118 Terms

1
New cards

Probability

A number from 0 to 1 for how likely an event is. 0 means impossible and 1 means certain

2
New cards

Event

Something that can happen, such as "a student passes."

3
New cards

Disjoint (mutually exclusive)

A and B cannot both happen, so P(A and B) = 0 and P(A or B) = P(A) + P(B)

4
New cards

Histogram

Bars showing how many values fall in each range. It shows the shape of the data: symmetric, skewed, or with several humps

5
New cards

Boxplot

The box is the middle 50% of the data, the line inside is the median, the whiskers show the typical range, and separate dots are outliers. It does not show the mean

6
New cards

Stem-and-leaf plot

A text version of a histogram that keeps the actual digits

7
New cards

Scatterplot

One point per observation, with x on the horizontal axis and y on the vertical axis

8
New cards

Pairs plot

A grid of scatterplots, one for every pair of variables

9
New cards

Mean

The average. Pulled towards outliers and toward the long tail of skewed data

10
New cards

Median

The middle value when the data is in order. It is resistant to outliers.

11
New cards

Skew

A lopsided distribution. Right skew has a long tail of large values, and the mean is above the median. Left skew is the reverse.

12
New cards

Standard Deviation

A typical distance of values from the mean. It is sensitive to outliers

13
New cards

Quartiles and IQR

Q1 and Q3 are the 25th and 75th percentiles, and IQR = Q3 − Q1 is the spread of the middle 50%. It is resistant to outliers.

14
New cards

Outlier

A point far from the rest.

15
New cards

Pearson correrlation

The amount of straight-line relationship, from -1 to 1. +1 is a perfect upward line, -1 is a perfect downward line and 0 means no straight-line relationship. A value near 0 does not rule out a curve

16
New cards

Rank

Each value replaced by its position from smallest (1) to largest

17
New cards

Spearman correlation

The Pearson correlation of the ranks. It measures whether y consistently rises or falls with x, and is resistant to outliers.

18
New cards

Function

A relationship that gives exactly one y for each x

19
New cards

Operator

A relationship that gives a distribution of y values for each x. The average at an x can fall where no data sits.

20
New cards

“Uninteresting” data

A featureless blob with no curve, clusters, trend, or outliers. The multivariate normal is the standard example.

21
New cards

Regression

Modeling how y depends on x. The basic form is y = E(Y given x) + ε

22
New cards

E (y|x)

The expected (average) value at y at a particular x. The vertical bar means “given.”

23
New cards

ε (epsilon)

Random error, the random scatter of an individual y around the average at its x.

24
New cards

Fitted value (model prediction)

The y the line predicts at a given x

25
New cards

Residual

Observed - model. Positive means the point is above the line, negative means it is below, and 0 means it is exactly on the line. Residuals are what you can measure of epsilon.

26
New cards

Taylor expansion idea

Any smooth curve looks like a straight line if you zoom in far enough, which is why a line is a reasonable local model.

27
New cards

Extrapolation

Predicting at x values outside the range of the data. It is risky because the line is only a local approximation

28
New cards

Anscombe’s example

Datasets with the same summary numbers and fitted line but very different pictures. The lesson is to plot the data and compare it with the program's output

29
New cards

Subject-matter Theory

What is already known about the topic. If it is solid, use it to predict what the output should look like, then check the data against that

30
New cards

Functional Modeling

Modeling a single y for each x. Linear and nonlinear fits are both functional

31
New cards

Linear

Gives one y per x, straight line

32
New cards

Nonlinear

Gives one y per x, curved line

33
New cards

Non-functional

One y per x does not describe the data. Two separate bands of y at the same. You need the distribution of y at each x.

34
New cards

Geometry of regression

The fitted values are a projection of y onto the space spanned by the x variables (including the intercept), and the residuals are what is left over.

35
New cards

Statistical Inference

Using data from a sample to learn about the population

36
New cards

Statistic

A number computed from a sample, such as the sample proportion p-hat or the sample mean x-bar

37
New cards

Parameter

The true value for the whole population. It is fixed but unknown

38
New cards

Point estimate

A statistic used as the best guess for a parameter. It will not match the parameter exactly

39
New cards

Sampling Distribution

The distribution of a statistic over many samples of the same size from the population

40
New cards

Standard Error

The standard deviation of a statistic, meaning how much it varies from sample to sample. A small SE means a precise estimate.

41
New cards

Central Limit Theorem

Averages (and sums) tend toward a normal distribution as the sample size grows, and the uncertainty of an average shrinks like 1 over the square root of n

42
New cards

Unbiased

The mean of the sampling distribution equals the parameter

43
New cards

Minimum Variance

The statistic has the smallest variance of all the statistic you might use. For the exponential distribution the median is biased relative to the mean.

44
New cards

Bootstrap

A way to estimate how much a statistic varies when you only have one sample

45
New cards

Bootstrap Sample

A random sample taken with replacement from the original sample, the same size as the original. It uses only original values, and some values repeat while others are left out.

46
New cards

Bootstrap Statistic

The statistic computed on one bootstrap sample

47
New cards

Bootstrap Distribution

The distribution of many bootstrap statistics. Its spread estimates the standard error.

48
New cards

Golden Rule of Bootstrapping

Bootstrap statistics are to the original sample statistic as the original sample statistic is to the population parameter.

49
New cards

Bootstrap for Regression

Resample the (x, y) pairs together, as whole rows, with replacement

50
New cards

Confidence Interval

A range of plausible values for a parameter. The parameter is fixed, while the statistic and the interval are random. 95% of 95% confidence intervals capture the truth.

51
New cards

95% CI rule of thumb

Statistic ± 2 × SE. The 2 × SE part is the margin of error.

52
New cards

Percentile Method

Take the 2.5th and 97.5th percentiles of the bootstrap distribution as the interval.

53
New cards

Pivotal Method

Flip the bootstrap quantiles around the statistic and scale by an estimate of the standard deviation, using a bootstrap of the bootstrap (about 200 resamples). At n = 10 it covered 93% in the slides' simulation, versus 85.5% for percentile and 86% for the t method.

54
New cards

Hypothesis testing

Assume the null hypothesis, then ask whether the statistic you observed would be rare under it. If it is rare, the result favors the alternative.

55
New cards

p-value (Pr(>|t|) in summary)

How rare your result would be if the true coefficient were 0. A small p-value means the coefficient is unlikely to be 0.

56
New cards

Cross Validation

Leave some data out of the fit, then predict it, to keep from fooling yourself. The slides' ethic is to bend over backwards to disprove yourself (Feynman).

57
New cards

Training set and test set

Fit the model on the training set, then predict the test set, which the model has not seen.

58
New cards

Overfitting

A model with extra, unneeded terms fits the training data but predicts new data worse, because the extra terms add noise.

59
New cards

K-fold cross validation

Split the data into k disjoint pieces. Each piece is the test set once while the rest is the training set. Add up the squared prediction errors. The split is random, so the answer changes a little each run.

60
New cards

Leave-one-out and PRESS

Set k = N so every point is left out once. There is no randomness. PRESS is the sum of the squared leave-one-out residuals, and smaller is better.

61
New cards

Leave-one-out residual

Residual ÷ (1 − leverage). This trick gives the answer without refitting N times.

62
New cards

Leverage (Hat Values)

How much each point contributes to its own prediction. It is the diagonal of the hat matrix H, and hat returns it.

63
New cards

Hat matrix H

The matrix that turns the observed y into the fitted y: fitted y = Hy.

64
New cards

Parsimony (KISS)

Prefer smaller models, because they are generally better predictors even when a larger one might be "correct."

65
New cards

R-squared

The fraction of variation the model explains. It never goes down when you add a variable, even pure noise, so it is the wrong tool for choosing variables.

66
New cards

Adjusted R-squared

R-squared with a penalty for extra variables. In the slides' noise-column example it dropped while R-squared rose.

67
New cards

Cp

A variable-selection statistic that compares a subset model with the full model. When the subset fits as well as the full model, Cp is close to p, the number of parameters in the subset.

68
New cards

Interaction (x1 * x2)

Lets the slope for one variable differ by the level of the other, such as a separate age slope for each gender.

69
New cards

Parallel slopes (x1 + x2)

The groups share one slope and differ only in height.

70
New cards

Smoothing parameter (lambda)

Controls how smooth a fitted curve is. gauss.reg1a chooses it with PRESS

71
New cards

Residual Standard Error

The typical size of the residuals, in the units of y.

72
New cards

Multicollinearity

Predictor columns that are nearly linear combinations of each other, so they carry almost the same information. The matrix (X-transpose X) inverse becomes unstable.

73
New cards

Symptoms of Multicollinearity

Big standard errors, few or no significant t-stats, yet the model still predicts well. Coefficients can be huge with opposite signs (the slides showed −15 and +14).

74
New cards

Eigenvalues ($eigen)

In the collinear case, some eigenvalues of the x covariance matrix become very small, which is the sign of near-redundant columns.

75
New cards

Dealing with collinearity

Combine variables (principal components), drop variables one at a time (t-stats can change a lot), or regularize. The best approach is to do both.

76
New cards

Regularization

Adding a penalty that keeps coefficients from growing, which stabilizes them.

77
New cards

Ridge regression

Minimizes squared error plus λ times the sum of the squared coefficients. It shrinks coefficients toward 0 and stabilizes them, but none reach exactly 0. In matrix form it uses (X-transpose X + kI) in place of (X-transpose X).

78
New cards

Lasso

Constrains the sum of the absolute values of the coefficients (the L1 norm) to be less than t. Variables drop out to exactly 0 as t shrinks, so it selects variables.

79
New cards

Ridge vs lasso

Ridge uses squared coefficients and only shrinks. Lasso uses absolute values and can remove variables.

80
New cards

LARS

Least Angle Regression, starts with the variable most correlated with y, nudges its coefficient up, and adds the next variable when it ties in correlation with the residuals. It computes the lasso path and gives df and Cp for choosing a stopping point.

81
New cards

glmnet

Minimizes squared error plus a mix of the ridge and lasso penalties. alpha = 0 is ridge, alpha = 1 is lasso, and values in between combine them.

82
New cards

Stein’s Theorem

In more than 2 dimensions you can construct a biased estimator with a smaller mean squared error than the unbiased one. This is why shrinking can help.

83
New cards

Biased Estimator

One whose average is not the true value. A little bias can buy a large drop in variance.

84
New cards

Random Variable

A numeric quantity that changes from trial to trial in a random process, such as the sum of two dice

85
New cards

Discrete Random Variable

Has a countable set of possible values (counting)

86
New cards

Continuous Random Variable

Takes values within an interval (measurement), such as the time to run a mile.

87
New cards

Probability function, p(x)

Assigns a probability to each value of a discrete random variable. The probabilities add to 1.

88
New cards

Binomial Random Variable

Counts successes in a fixed number n of independent trials, each with the same success probability p.

89
New cards

Binomial Coefficient

n! / (k! (n − k)!), the number of ways to arrange k successes among n trials. For 2 successes in 5 trials it is 10.

90
New cards

Binomial Probability

P(X = k) = (binomial coefficient) × p^k × (1 − p)^(n − k). For 3 sixes in 5 dice rolls it is about 0.0322. In R: dbinom, pbinom, rbinom.

91
New cards

Normal Distribution, X ~ N(μ, σ)

A symmetric bell-shaped curve. The mean μ is the center and the standard deviation σ is the spread. Areas under the curve are probabilities, found with pnorm (also dnorm, rnorm).

92
New cards

Rate (λ)

A rate per time or per area, so it scales up with the length of time or the size of area.

93
New cards

Binomail to Poisson

When n gets large with n × p held constant, the binomial turns into a Poisson.

94
New cards

R Function Letters

d gives the probability at a value, p gives the probability up to a value, and r generates random values

95
New cards

Binary (yes/no) response

An outcome with two values, such as default or no default, or a drought year or not.

96
New cards

GLM (Generalized Linear Model, glm)

Regression that is not limited to sums of squares. It only needs a base likelihood, and the family argument says what kind of response you have.

97
New cards

Logit Model

glm(y ~ x, family = binomial(link = logit)). It models the probability p = e^(xβ) / (1 + e^(xβ)), which stays between 0 and 1.

98
New cards

Probit Model

The same setup with link = probit, which uses the normal curve for the link instead.

99
New cards

Likelihood

How probable the observed data is under a model. GLMs fit by maximizing it.

100
New cards

Deviance

2 × (log likelihood of a base model minus log likelihood of your model). It lets you compare models directly. Lower is a better fit.