INST314 Exam Review
Chien-Chi Liu
Agenda
1.
2.
3.
4.
5.
Categorical vs. Numerical Data
Hypothesis Testing and Confidence Intervals
Errors
ANOVA
Regression
Identity Categorical vs. Numerical Data
●
●
Categorical
○ Nominal: unordered categories (red, blue, green…)
○ Ordinal: ordered categories (small, medium, large)
Numerical
○ Discrete: whole numbers (how many people in a class)
○ Continuous: infinite number of possible values (height, weight)
Summaries of Categorical data
●
Describe with proportions and counts within each category
○ Tables or charts
Summaries of Numerical Data
●
Describe the distribution - shape, center, spread
○ Shape: symmetric or skewed, and number of modes
■ Visualization through histogram or boxplot
○ Center: Mean and Median
○ Spread: Interquartile Range and Standard Deviation/Variance
Practice
1.
What is the third quartile?
A) 1
B) 4
C) 5
D) 8
Practice
1.
What is the third quartile?
A) 1
B) 4
C) 5
D) 8
Practice
1.
What is the third quartile?
A) 1
2.
B) 4
C) 5
D) 8
What is the median?
A) 1
B) 4
C) 5
D) 8
Practice
1.
What is the third quartile?
A) 1
2.
B) 4
C) 5
D) 8
What is the median?
A) 1
B) 4
C) 5
D) 8
Practice
1.
What is the third quartile?
A) 1
2.
C) 5
D) 8
What is the median?
A) 1
3.
B) 4
B) 4
C) 5
D) 8
C) 8
D) 4
What is the IQR?
A) 10
B) 9
Practice
1.
What is the third quartile?
A) 1
2.
C) 5
D) 8
What is the median?
A) 1
3.
B) 4
B) 4
C) 5
D) 8
C) 8
D) 4
What is the IQR?
A) 10
B) 9
Practice
1.
Samantha took a final exam in English and in Chemistry. Her English score was 82,
and her Chemistry score was 73. The mean and standard deviation for each class
are shown below.
Mean
Standard Deviation
English
75
5
Chemistry
70
4
Based on her relative standing within each class, in which subject did Samantha
perform better? Assume scores in both subjects are unimodal and symmetric.
A) English
B) Chemistry
C) She did equally well
D) I don’t know
Practice
1.
Samantha took a final exam in English and in Chemistry. Her English score was 82,
and her Chemistry score was 73. The mean and standard deviation for each class
are shown below.
Mean
Standard Deviation
English
75
5
Chemistry
70
4
Based on her relative standing within each class, in which subject did Samantha
perform better? Assume scores in both subjects are unimodal and symmetric.
A) English
B) Chemistry
C) She did equally well
D) I don’t know
Hypothesis Testing
●
When should I use which statistical test?
P-value & Confidence Intervals
●
●
P-value: probability of observing data as extreme or more extreme than
what we got if H0 is true
P-value
Interpretation
Low (<= alpha)
Strong evidence against H0 -> reject H0
High (>alpha)
Weak evidence -> fail to reject H0
Confidence interval: a range of values that is likely to contain the true population
parameter with a certain level of confidence (most common 95%)
Errors
●
●
Type I error: Reject the null hypothesis when it’s actually true
Type II error: Fail to reject the null hypothesis when it’s not true
ANOVA
● Hypothesis:
● Conditions to check:
○ Independence
○ Approximately Normal
○ Constant Variance
Practice
1.
Suppose a nutrition researcher wants to compare the average daily calorie intake
among students in three different universities. Each university’s sample includes 40
randomly selected students who self-report their average daily calorie intake.
What is the most appropriate statistical method to determine whether there is a
significant difference in average calorie intake among the three universities?
A. Paired t-test
B. Chi-squared test of independence
C. One-way ANOVA
D. Two-sample z-test
E. Regression analysis
Practice
1.
Suppose a nutrition researcher wants to compare the average daily calorie intake
among students in three different universities. Each university’s sample includes 40
randomly selected students who self-report their average daily calorie intake.
What is the most appropriate statistical method to determine whether there is a
significant difference in average calorie intake among the three universities?
A. Paired t-test
B. Chi-squared test of independence
C. One-way ANOVA
D. Two-sample z-test
E. Regression analysis
Practice
1.
A sleep researcher wants to test whether people who drink coffee in the evening sleep
fewer hours than those who do not. She randomly selects 30 coffee drinkers and 30
non-coffee drinkers, and records how many hours each person sleeps per night.
Which statistical test is most appropriate to compare the average sleep duration
between the two groups?
A. One-way ANOVA
B. t-test
C. Two-sample t-test
D. Chi-square goodness of fit
E. z-test
Practice
1.
A sleep researcher wants to test whether people who drink coffee in the evening sleep
fewer hours than those who do not. She randomly selects 30 coffee drinkers and 30
non-coffee drinkers, and records how many hours each person sleeps per night.
Which statistical test is most appropriate to compare the average sleep duration
between the two groups?
A. One-way ANOVA
B. t-test
C. Two-sample t-test
D. Chi-square goodness of fit
E. z-test
Practice
1.
A sleep researcher wants to test whether people who drink coffee in the evening sleep
fewer hours than those who do not. She randomly selects 30 coffee drinkers and 30
non-coffee drinkers, and records how many hours each person sleeps per night.
Which of the following correctly states the null and alternative hypotheses?
A.
B.
C.
D.
Practice
1.
A sleep researcher wants to test whether people who drink coffee in the evening sleep
fewer hours than those who do not. She randomly selects 30 coffee drinkers and 30
non-coffee drinkers, and records how many hours each person sleeps per night.
Which of the following correctly states the null and alternative hypotheses?
A.
B.
C.
D.
Regression - Correlation & Linear Regression
Correlation:
●
●
●
Measuring the strength and direction of a linear relationship
The closer to 0, the weaker the relationship, and vice versa
The correlation is for measuring the linear relationship (the correlation value will
not make sense if the relationship is not linear)
Linear Regression:
●
●
●
You need to predict a dependent variable from one or more predictors
You want to quantify the relationship between variables
You need an equation that describes the relationship
Practice
Practice
Residuals
●
●
A residual is the difference between observed value and the value predicted by the
regression model
To calculate residual, we calculate the vertical distance between an actual data
point and the regression line
Regression Models
Simple Linear Regression:
●
●
𝛽0 (intercept) = the predicted value of y when x=0
𝛽1 (slope) = the rate of change of the relationship between x and y
Regression Models
Simple Linear Regression:
●
●
𝛽0 (intercept) = the predicted value of y when x=0
𝛽1 (slope) = the rate of change of the relationship between x and y
Multiple Regression:
●
Regression with multiple predictor variables
Regression - Measures of Model Fit
● R-squared: measures how well your regression model explains the
variability in the response variable y
● Adjusted R-squared: Modifies the R-squared by taking into account
the number of predictors in the model
Regression Diagnostics
●
To evaluate the validity of a regression model and check whether the
assumptions are met
●
Simple Linear Regression:
○ Linearity
○ Approximately normal residuals
○ Constant variability
○ Independence
●
Multiple Linear Regression:
○ Residuals vs. Fitted values
○ Residuals vs. each predictor
○ Normal QQ-plot of residuals
○ Residuals in order of observation (if available)