OLS Autograder (Q1 to Q9)

Score: 0%

Group members present

List everyone in your group who is here today (one per line).

Q1. Coin flip game (cost 30¢)

NOT YET

Answer all parts, then click “Check Q1”.


    

Q2. Unfair coin break-even probability

NOT YET

It still costs 30¢ to play, but the coin is not fair. Enter the probability of heads that makes the expected value exactly 30¢.


    

Q3. Expected value and variance

NOT YET

Let X take on values 0 through 4 with equal probability. Enter the expected value and the variance.


    

Q4. Sample estimates using sum() and length()

NOT YET

The sample is x <- c(1,1,1,2,2,2,2,3,3,3). Enter your estimates for E[X] and Var(X). Also paste the R code you used. Your code should use sum() and length().


    

Q5. OLS slope and intercept from cov() and var()

NOT YET

Enter your values for b1 and b0, then paste the R code you used. Your code should use cov(), var(), and mean().


    

Q6. Fit OLS in one pipeline

NOT YET

First paste the R code you used to fit the model. Then fill in the two interpretation blanks.


    

Q7. Describing the contestants dataset

NOT YET

Answer parts (a) through (f), then click “Check Q7”.

a) Out of the three seasons, how many people won?

b) What is the minimum, maximum, and median age of contestants?

c) Are male contestants, on average, older than female contestants?

d) What are the three most common professions among contestants?

e) What are the two most common professions for male contestants and for female contestants?

f) What region of the UK are most of the contestants from?


    

Q8. Plot code

NOT YET

Paste the exact R code you used to draw the plot:


    

Q9. Interpreting linear probability models

NOT YET

Completion PDF

READY

(a) win ~ age

Use lm() to estimate the model wini = β0 + β1 agei + ui. The baseline probability someone who is zero years old wins is , which statistically significantly different from zero: the p-value less than 0.05. A one year increase in age means someone's probability of winning increases by , which statistically significantly different from zero.

(b) win ~ day joined

Use lm() to estimate the model wini = β0 + β1 day joinedi + ui. The baseline probability that someone who joins the show on day zero wins is , which statistically significantly different from zero. A one day increase in day joined means someone's probability of winning by , which statistically significantly different from zero.


    

Download a completion PDF that includes your name, a timestamp, and your score.