DATA 2
ID | X1 | X2 | X3 | Y |
A | 0 | 2 | 4 | 9 |
B | 1 | 0 | 8 | 10 |
C | 0 | 1 | 0 | 5 |
D | 1 | 1 | 0 | 1 |
E | 0 | 0 | 8 | 10 |
CORRELATION MATRIX
Y | X1 | X2 | X3 | |
Y | 1 | ? | -0.304 | +0.889 |
X1 | ? | 1 | -0.327 | 0 |
X2 | -0.304 | -0.327 | 1 | -0.598 |
X3 | +0.889 | 0 | -0.598 | 1 |
1. What is the mean squared error of the full model? (Correct answer is 4, please show me how to get there)
2.What is the typical deviation when you use the full model to predict scores on Y in the sample? (Correct answer is 0.89, please show me how to get there)
R code and output
y=c(9,10,5,1,10)
x1=c(0,1,0,1,0)
x2=c(2,0,1,1,0)
x3=c(4,8,0,0,8)
x=rbind(y,x1,x2,x3)
cor(t(x))
y x1 x2 x3
y 1.0000000 -0.3478042 -0.3035884 0.8890009
x1 -0.3478042 1.0000000 -0.3273268 0.0000000
x2 -0.3035884 -0.3273268 1.0000000 -0.5976143
x3 0.8890009 0.0000000 -0.5976143 1.0000000
fit=lm(y~x1+x2+x3)
summary(fit)
Call:
lm(formula = y ~ x1 + x2 + x3)
Residuals:
1 2 3 4 5
-1.49e-16 1.00e+00 1.00e+00 -1.00e+00 -1.00e+00
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 3.0000 2.8868 1.039 0.488
x1 -2.0000 2.0000 -1.000 0.500
x2 1.0000 1.6330 0.612 0.650
x3 1.0000 0.3227 3.098 0.199
Residual standard error: 2 on 1 degrees of freedom
Multiple R-squared: 0.9355, Adjusted R-squared: 0.7419
F-statistic: 4.833 on 3 and 1 DF, p-value: 0.3199
anova(fit)
Analysis of Variance Table
Response: y
Df Sum Sq Mean Sq F value Pr(>F)
x1 1 7.5 7.5 1.875 0.4016
x2 1 12.1 12.1 3.025 0.3322
x3 1 38.4 38.4 9.600 0.1987
Residuals 1 4.0 4.0
y1=3-2*x1+x2+x3
y1
[1] 9 9 4 2 11
DATA 1 ID X1 Y A 0 9 B 1 10 C 0 5 D 1 1 E 0 0 The zero order model is Ŷ = 8 − 2.5X1 1. What is the residual error in using the zero order model to predict Y for ID C? (Correct answer is -3, please show me how to find it) 2. What is the error in using the mean of Y to predict Y for ID C? (correct answer is -2,...
Let X1,X2 and X3 be three discrete random variables withP[X1 = 0] = P[X1 = 1] = P[X2 = 0] = P[X2 = 1] = 1/2and P[X3 = 0] = 1.(i) Characterize all possible coupling between X1 and X2.(ii) Which coupling maximizes the correlation? Which coupling minimizes thecorrelation? Do you have an intuitive explanation why these couplings are theones that minimize/maximize the correlation?(iii) Which coupling makes the two random variables uncorrelated?(iv) Do the tasks (i) − (iii) but for X1...
1. Suppose that X1, X2, and X3 E(X1) = 0, E(X2) = 1, E(X3) = 1, Var(X1) = 1, Var(X2) = 2, Var(X3) = 3, Cov(X1, X2) = -1, Cov(X2, X3) = 1, where X1 and X3 are independent. a.) Find the covariance cov(X1 + X2, X1 - X3). b.) Define U = 2X1 - X2 + X3. Find the mean and variance of U.
Q3. (Dual Simplex Method) (2 marks) Use the dual Simplex method to solve the following LP model: max z= 2x1 +4x2 +9x3 x1 x2 x3 S 1 -x1+ X2 +2x3 S -4 x2+ X1,X2,X3 S 0 Q3. (Dual Simplex Method) (2 marks) Use the dual Simplex method to solve the following LP model: max z= 2x1 +4x2 +9x3 x1 x2 x3 S 1 -x1+ X2 +2x3 S -4 x2+ X1,X2,X3 S 0
= = 3, Cov(X1, X2) = 2, Cov(X2, X3) = -2, Let Var(X1) = Var(X3) = 2, Var(X2) Cov(X1, X3) = -1. i) Suppose Y1 = X1 - X2. Find Var(Y1). ii) Suppose Y2 = X1 – 2X2 – X3. Find Var(Y2) and Cov(Yı, Y2). Assuming that (X1, X2, X3) are multivariate normal, with mean 0 and covariances as specified above, find the joint density function fxı,Y,(y1, y2). iii) Suppose Y3 = X1 + X2 + X3. Compute the covariance...
Let X1, X2, X3 be independent random variables with E(X1) = 1, E(X2) = 2 and E(X3) = 3. Let Y = 3X1 − 2X2 + X3. Find E(Y ), Var(Y ) in the following examples. X1, X2, X3 are Poisson. [Recall that the variance of Poisson(λ) is λ.] X1, X2, X3 are normal, with respective variances σ12 = 1, σ2 = 3, σ32 = 5. Find P(0 ≤ Y ≤ 5). [Recall that any linear combination of independent normal...
Answer the following question for where Y has been regressed on X1, X2, and X3. Use the linear regression output in the Excel file. Your answers should be rounded to 2 decimal places. a. What is the equation for the line of best fit or regression line? b. The proportion is for the amount of the variability of Y that is explained or accounted for by the model. C. The correlation between the observed values of y and the expected...
Question 1 Solve the system of equations. X1 - X2 + x3 = 8 X1 + X2 + x3 = 6 X1 + X2 - X3 = -12 O (2,-1,-9) O (-2,-1,9) O (-2,-1,-9) (2, -1,9)
2 = -4 and x3 = 0, with p = 1 and W = span{x1, X2, X3}. 4) Let x1 = -2, X2 3 (a) W is a subspace of R". What is n? (b) Find a basis for W. (c) Isp EW? (d) Give a geometric description of W.
3) Let (x, y), (X2, y2), and (X3. Y3) be three points in R2 with X1 < x2 < X3. Suppose that y = ax + by + c is a parabola passing through the three points (x1, yı), (x2, y), and (x3, Y3). We have that a, b, and c must satisfy i = ax + bx + C V2 = ax + bx2 + c y3 = ax} + bx3 + c Let D = x X2 1....