Problem 1: Descriptive Statistics in R
For the Superbowl data.
1. Plot the spread and outcome variables. Calculate means, standard deviations,
PROBLEM 1 :
Y = Respondent answers yes
Q1 = Random clicker
Q2 = Truthful clicker
BY the law of total probability :
P(Y) = P(Y |RC)P(RC) + P(Y |TC)P(TC)
0.5= (0.5)*(0.5) + P(Y |TC) (0.5)
0.25/0.5= p(Y | TC)
P ( Y | TC ) = 0.5
50 % truthful click
(a) The sample size n is extremely large, and the number of predictors
p is small.
By using a flexible approach we can able to fit data closer and in case of larger
sample size we can find a good fit when compared to inflexible approach
(a) Using visualizations, explore the predictor variables to understand their
distributions as well as the relationships between predictors.
From the visualization , the predictoes such as k and Mg have the modes around zero .where
as all the othe