1/112
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai | Chat |
|---|
No analytics yet
Send a link to your students to track their progress
what are Surveys?
· Sample a population to describe characteristics of the population
· Researcher has control over how the sample is collected
what is an Experiment?
· Establish causal relationships by assigning treatments to experimental units
· Experimenter has control over - selection of experimental units, which treatments to assign, randomization of treatments to experimental units, replication
what is Observational studies?
· Investigate relationships between variables as they occur in nature
· Researcher only has control over - data included, how they analyze that data
what is a Scope of inference?
The scope of inference defines the boundaries to which your study's conclusions can be legitimately applied
what is probability sampling?
- Every unit has a known, non-zero chance of selection
- This justifies extrapolation from sample to population
- Sampling design information should be treated like data
what is Non-probabilistic sampling methods?
Rely on untestable assumptions when extrapolating to a population
what is a Population of interest?
The group we want to draw conclusions about
what is a Sampling frame?
- The list or mechanisms from which the sample is drawn
- If the sampling frame does not cover the population of interest, some units may have zero probability of selection
what is Selection bias?
Occurs when some units of population have zero or systematically different chances of being included in the sample, and this is related to the outcome of interest
Examples:
- Parts of population have zero probability of being sampled.
Consequence:
- The sample cannot represent the population.
what is Selection bias risk?
Occurs when selection probabilities are unknown or unequal
Examples:
Voluntary response samples.
Lost sampling weights.
Consequence:
Inference relies on untestable assumptions.
what is Nonresponse or Missingness?
Occurs when units selected for the sample are not observed
Examples: Survey non-response, Loss to follow-up/attrition, Imperfect detection.
Key issue: When the probability of being observed is related to the outcome of interest.
Consequences:
The observed sample is systematically different from the target population.
Estimates may be biased, even with large sample sizes.
what is response bias?
Response or measurement from selected unit is systematically bias/incorrect. Also called information bias and measurement bias
Examples
Poorly calibrated instruments.
Leading questions.
True value not observed due to survey methods.
Look for anything in the question or survey design that influences or "pushes" the respondent's answer instead of letting them answer freely.
what are Three common Sampling designs?
1. Sample random sampling
- Every unit in the population has an equal chance of selection
- Conceptual benchmark for inference
- Rarely achievable in practice, but useful as a reference
2. Stratified sampling
- Population divided into known subgroups (strata)
- Samples taken within each stratum
- Improves precision and ensures representation
Advantages
- More precise estimate for same sample size
- Different sample sizes/proportions from different strata
- Can over-sample smaller strata
3. Cluster sampling
- Population divided into natural groups (clusters)
- Some clusters samples, then units within them
-Observations within clusters are typically more similar to each other than observations from different clusters
- Single stage- include all units in selected groups
- Two-stage - take simple random sample of units within groups
what is Randomization?
·After controlling for other sources of variation, randomly assign experimental units to treatments
what is Replication?
· Two or more experimental units assigned to a treatment
· Helps to establish reproducibility, robustness against aberrant results, experimental error and improves precision
· Replication is a key component of establishing valid experimental results and improving precision
what are Experimental units?
These are the units that a treatment is applied to, where manipulation occurs
what are measurement units?
where measurement occurs
what is Pseudoreplicaiton?
a statistical error in experimental design where data points are treated as independent replicates when they actually are not
How does study Design and analysis affect inference?
· Final conclusions must consider both design and analysis
· Strength of inference comes from study design: population and sampling, randomization and replication, avoiding bias and confounding
Parameters versus statistics
· A parameter describes an unknown feature of the data-generating process
(e.g. μ for a population of interest); a statistic is a function of the observed data (e.g. x̄ for data collected in some manner)
· Statistics can be calculated once data observed; parameters can only be estimated
what is a point estimate?
A point estimate is our best estimate for parameter
- Point estimates are derived from statistics, e.g. an estimate for the parameter μ is the statistic x̄; σ is estimated by s.
· Both accuracy and precision are important properties of estimators
· Good study design is crucial to linking statistics and parameters, e.g. by carefully defining the population and collecting appropriate data
what is Sampling distribution
· The sampling distribution is the distribution of a statistic across repeated samples drawn from the same data-generating process
· A statistic is a function of the sample data, and since the data are random variables, the statistic is itself a random variable
· If we could repeat a study many times, we would (almost always) get different statistics each time
· Statistics are used to estimate parameters. Knowledge of sampling distributions is used to quantify uncertainty in parameters
what is a Stanard error
· The standard error is the standard deviation of a statistics sampling distribution
· E.g. -> is the standard error for the mean
· We almost always estimate the standard error, e.g. the estimated standard error for the mean is always σ/squareroot of n (SD/ number of samples)
what is a Confidence Intervals
· A confidence interval is a range of parameter values that are consistent with the observed data (given a specified statistical model and study design)
· Confidence intervals are constructed using the sampling distribution implied by the model and design
· A 95% confidence interval is designed to that, under repeated studies conducted in the same way, 95% of such intervals would contain the true parameter value
· Example- "We are 95% confident that the true population mean exam score lies between 68 and 76."
what is Coverage
the real long-run percentage of intervals that contain the true parameter
· If the coverage is greater than the nominal rate, the interval is said to be conservative (or over-cover)
· If coverage is lower, the interval is said to be anti-conservative (under-cover)
· In practice, the biggest concern for scientists is whether the model and assumptions are wrong in a way that meaningfully affects inference
meh
beh
what is the Central Limit theorem
A fundamental statistical concept stating that the averages of sufficiently large random sample from any population will be normally distributed, regardless of the populations original distribution shape.
what is Prop.test ( ) used for?
The prop.test () function in R is used to perform hypothesis tests and calculate confidence intervals for proportions.
what is t.test ( ) used for?
to check if the mean of a sample significantly differs from a known population mean or if the means of two groups differ significantly from each other
Statistical models
· A model approximates reality
· They can be expressed conceptually/verbally or mathematically
· Interested in parameters of the model (as an approx. of the population)
· Interested in choosing between different models
what is loss functions?
A loss function measures how bad a prediction is from the observed data
For each observation we have a residual:
Ei= yi - yˆi
Loss functions can sometimes include additional terms (e.g. for model complexity), but for simple linear regression we focus on the residual for each observation:
L(ei)
It assigns a numerical "cost" or penalty" to inaccurate predictions
How can we fit a regression model?
-We want to estimate the parameters of a regression model so that it fits the observed data well
-There are three common ways to do this:
1. Minimise loss: choose parameters that minimise a loss function (usually based on prediction error but may include penalty terms)
2. Maximum likelihood: choose parameters that maximise how probable the data are under a statistical model
3. Bayesian inference: update prior beliefs about parameters using observed data and a statistical model
These approaches are closely related and often give similar answer for simple models
what is Bayesian Regression?
A Bayesian approach combines the probability model with prior information
- requires a statisical model
· We still use the same likelihood / probability for the observed data
· We also specify prior distribution for the parameters
· These represent what we believe about the parameters before seeing the data
Bayesian inference combines observed data with prior distributions for parameters
what is posterior distribution?
A posterior distribution is the updated probability distribution of an unknown parameter, calculated by combining initial beliefs (the prior) with newly observed data
what is R² (coefficient of determination)?
R² is the proportion of the variation in the response variable that is explained by all the predictors in a regression model.
Example:
· R² = 0.65
· Acetic acid, H₂S, and lactic acid together explained 65% of the variation in taste
R² depends on predictors in two ways
1. Adding important new information can substantially improve R². More predictors always increase R², even if they are unrelated to y
2. Predictors that span a wider ranger can explain more variation
- If predictors span a wider range, y will vary more (when a relationship is present)
- More variability in y means more variation that can potentially be explained
what are the assumptions we make during linear regression modelling?
Assumptions are more important when making predictions about future observations
- If variance changes or is non-normal, we need to incorporate that when describing how far a new observation might deviate from the line
Assumption 1: linearity
· Describes how two variables are related
· Misspecification can lead to incorrect inference
Assumption 2: independence
· Describes how observations are related to one another
· Can lead us to finding spurious patterns
· Artificially small standard errors (confidence intervals)
Violations in Assumption 1 -> violations in
Assumption 2
Poor modelling tends to create similar patterns for neighbouring observations
· Assumption 2 violations can be hard to diagnose without the knowledge of study design
The two final assumptions are less important for inferences about parameter
Assumption 3: Constant variance
· Only really a problem if there are major changes in variance
Assumption 4: non-normality
· Only a problem if small sample size
· Exception is outliers/influential points
what is Studentised residuals (plotted)?
Residuals that are adjusted for different levels of variability and influence, so they can be compared fairly across all data points.
what is a quantile-quantile (qq) plot?
a graphical scatterplot used to compare two probability distributions by plotting their quantiles (the values that divide data into equal fractions) against each other
Residuals are sorted from smallest to largest and compared to the expected sorted distribution form a normal distribution
what is Leverage?
measures how far an observation's predictor variables (independent variables) are from the average of all predictor values in a dataset
what is Influential observations?
· An observation is influential if removing it substantially changes the fitted model
· One measure of influence is Cooks distance
what are the two ingredients contribute to influence:
1. High leverage (unusual predictor values)
2. Large residuals (poorly fitted observation)
what is high leverage
- Occurs when a point has predictor values far from the center of the data
- Such points have more potential to affect the fitted regression line
what are large residuals?
(poorly fitted observation)
- In simple regression, these are obvious points, outliers with extreme x values
- In multiple regression, they are harder to identify visually
what does R² do?
The proportion of variation in a response variable explained by the predictors in a regression model
shows how well a model explains and predicts real-world data
what is Internal predictive validation?
techniques that assess a model's performance and stability on the same dataset used for development, designed to identify overfitting and measure reproducibility
what is External predictive validation?
techniques that assess a models performance on new, independent datasets, to assess to see how accurately it forecasts future outcomes
what is a training/ test split?
· Randomly divide the data into two parts
· Fit the model using the training set
· Evaluate prediction error on the test set
· Test data act like new observations not used in the model fitting
what is K-fold cross-validation?
· Divide the data into k approximately equal subsets (folds)
· Fit the model using k - 1-fold and predict the remaining fold
· Repeat so each fold is used once for testing
· Average the prediction errors across folds
It checks model performance by repeatedly training and testing on different parts of the data, then averaging the results.
what is covariance?
measures how two random variables vary together
Positive covariance:
· Large values of X tend to occur with large values of Y
Negative covariance:
· Large values of X tend to occur with small values of Y
Covariance near zero:
· Nonsystematic liner relationship
what does off-diagonal elements explain?
covariance between estimates
what scale is crucial to interpreting effect size?
predictor variable scale
what is a classic technique for comparing multiple groups?
analysis of variance
what is a factor?
is a categorical explanatory variable used to define treatments
what is a classic technique for comparing multiple groups, adjusting for continuous variables?
analysis of covariance
what does a linear regression model look like?
ŷ = b₀ + b₁x [1, 2]
Where:
ŷ = the predicted value of the dependent variable you are trying to guess.
x = the independent variable (your predictor or feature).
b₀ = the y-intercept (the value of ŷ when x is 0).
b₁ = the slope (how much ŷ changes for every single-unit increase in x).
The average response expected at a given value of (x)
what does an intercation term formula look like?
Y = β0 + β1X + β2f + β3(Xf) + ε
β3 shows how the effect of X on Y changes depending on F (and vice versa)
what is a confidence interval?
It gives a plausible range for the true value.
If the CI does NOT include 0 → result is statistically significant
If the CI includes 0 → not statistically significant
what are you saying when you reject H0?
"the data provides enough evidence that there is probabily and effect/difference/association"
what does a logistic regression model look like?
log(p / (1 - p)) = β0 + β1X
p= probability of the event occuring
x= predictor variable
β1= effect of the predictor
β1 = odds ratio
what is standardising a variable?
standardising changes a variable from its original unit to standard deviation units
when should you standarise a variable?
- when original units arent very meaningful
- when you want to compare variables that are measured on different scales (e.g. $, kg, cm)
when should you NOT standardise a variable?
- when the original units already have a clear real world meaning
what is Z1?
- a new variable that is created by combining all the original variables
- simply a weighted combination of original variables
- summerises lots of variables with one score (e.g. GPA)
abg
bbc
what is a stratified sampling appraoch
Stratified sampling is a method where the population is divided into subgroups (called strata), and then a random sample is taken from each subgroup.
what does a good sampling unit ensure?
All units have a non-zero probability
why is replication important in an experiment?
allows estimation ov experimental error and reproducibility
what are limitations of convenience sampling?
1. High risk of bias
2. Not representative of the population
3. Low external validity
4. Hidden systematic differences
5. Overestimates or underestimates effects
what is a split plot design?
An experiment where one factor is applied to main plots (large groups) and a second factor is applied to subplots within those groups, usually because the first factor is harder to change.
in simple linear regression, intercept β₀ referes to what?
to expected value of the response when the predictor is zero
In multiple linear regression, the intercept β₀ refers to what?
β₀ is the expected value of the response (Y) when ALL predictors are equal to 0.
what assumption is made about the error term ε in linear regression?
that it has a mean zero and constant variance
what is the primary purpose of a statistical model?
to provide a simplified description of patterns in data
the least squares estimates of β₀ and β1 are abtained how?
by minimising the sum of squared residuals
in a regression model, what is a parameter?
These are characteristics of a model eg the slope coeffiencent β1
what is an estimator?
a rule or procedure used to estimate an unknown parameter
what is a laboratory data-entry spread sheet?
a digital tool used to systematically record, organize, and track scientific or clinical test results
designed to minimise error
what is an analysis dataset?
a structured, cleaned, and organized collection of data prepared specifically for statistical evaluation.
usually have one row per observation
which data workflow is generally the most reproducible?
preserving the raw spreadsheet and using an R script to generate the data analysis
It makes your whole process transparent, consistent, and repeatable.
what does the standard error of an estimate provide?
the estimated variability in a parameter estimate due to sampling
what is a spurious inference?
incorrect assumption that there is a relationship
avoid assumption of: linearity of the mean response
what is a residual?
the difference between an observed and a fitted value
in regression, what is the prediction interval most likely to contain?
the response value for a new observation give the value(s) of an independent variable or variables
when would you prefer a prediction interval over a CI for the mean response?
when estimating the range of values an individual new observation might take
how does multiple linear regression differ from simple linear regression?
mutiple linear regression uses more than one predictor
R function emmeans() is used to what?
estimate or compare groups means from a linear model
what does Bj interpret as in mutiple regression?
the change in the mean response for a one-unit change in Xj, holding other predictors fixed
in multiple regression, what does an intercation between two predictors imply?
the relationship between x1 and x2 depends on the value of x2
what is an overall f-test used for in regression?
Test if any of the predictor coeffiencients do not equal 0
what does AIC mean?
Akiake Information Criterion
What is AIC used for?
select a model that best balances fit and complexity
what is plot(m1) used for?
plotting diagnotic plots that help assess whether the assumption of the regression model are reasonable
why are indicator variables needed when fitting a ANOVA model as regression?
to represent group membership numerically so that treatment effects can eb estimated
in a one-way ANOVA, whya re two indicator variables sufficient?
the refrence level is represented when both indicators are equal to zero
if a researcher fits a model with several highly correlated predictors, what outcome will occur?
individual coeffeicients estimates may become unstable, have large SE and even change sign when the model is slightly modified
what is multicollinearity?
Highly correlated predictors
what is heteroscedasticity?
The spread (variance) of the errors is not constant across all values of the predictor.
what is Homoscedasticity?
Errors are evenly spread out across all values. Think of a rectangular cloud of data points.
why shoudl you standardise vairbales before fitting a multiple regression model?
to place predictors on a common scale so that the sizes of regression coefficients can be compared more meaningfully
what is a backwards model selection?
a step-by-step statistical technique used to build the most efficient predictive model by starting with all available variables and removing the least useful ones one at a time.
some possible models may never be examined