Question

In: Statistics and Probability

Consider the following dataset: x1 Yellow Yellow Green Green Red Red Green Red Yellow x2 5...

Consider the following dataset:

x1 Yellow Yellow Green Green Red Red Green Red Yellow

x2 5 2 10 4 3 7 2 5 4

y 1 3 7 5 10 18 4 8 3

(a) (3pts) Split the data into a train and test set where the test set contains observations 1 and 7. Answer this by writing down the two datasets.

(b) (2pts) Use Rstudio to estimate a model (which uses both x1 and x2 as predictor variables) using the train set

(c) (2pts) According to this model, what is the impact of an observation being Red (as opposed to Yellow) on our prediction of the response variable?

(d) (2pts) Use Rstudio to estimate a model (which uses only x2 as the predictor variable) using the train set.

(e) (3pts) Compute the MAE on the test set for both estimated models. Note: You must show all calculations for this solution. That is, it should not be done using Rstudio aside from using Rstudio for arithmetic computations (like a calculator) and to obtain the estimated models from (b) and (d).

Solutions

Expert Solution


Related Solutions

Consider the following three consumption bundles (X1,X2)=(10,10) ; (X1,X2)=(15,10) ; (X1,X2)=(3000,8).
Answer each of the following statements True/False/Uncertain. Give a full explanation of your answer including graphs where appropriate. (When in doubt, always include a fully labeled graph.)A) Consider the following three consumption bundles (X1,X2)=(10,10) ; (X1,X2)=(15,10) ; (X1,X2)=(3000,8). Non-satiation implies that (15,10) is preferred to (10,10) but does not imply that (3000,8) is preferred to (10,10).B) It is not theoretically possible for two indifference curves to cross if the preference relations they are based on satisfy the assumptions of completeness,...
In an urn, there are 5 red balls, 5 green balls, 4 yellow balls, and 6...
In an urn, there are 5 red balls, 5 green balls, 4 yellow balls, and 6 white balls. You are drawing balls without replacement. a. When you draw the first ball, what is the probability that the ball will be white? b. Let us assume that you have drawn two balls and both of them are green. What is the probability that the next ball drawn will be green? c. Let us assume that the third ball drawn is also...
An urn contains 4 red, 5 blue, 2 yellow, and 9 green balls. A group of...
An urn contains 4 red, 5 blue, 2 yellow, and 9 green balls. A group of 5 balls is selected at random without replacement. What is the probability that the sample contains: a. atleast one of each color? b. at most 3 green balls?
A boy has 5 red , 2 yellow and 4 green marbles. In how many ways...
A boy has 5 red , 2 yellow and 4 green marbles. In how many ways can the boy arrange the marbles in a line if: a) Marbles of the same color are indistinguishable? b) All marbles have different sizes?
An urn contains 5 red balls, 4 green balls and 4 yellow balls, for a total...
An urn contains 5 red balls, 4 green balls and 4 yellow balls, for a total of 13 balls. if five balls are randomly selected without replacement, what is the probability of selecting at least two red balls, given that at least one yellow ball is selected?
Consider the following quadratic forms q(x1, x2) = 3x1^2 − 6x1x2 + 11x2^2 and r(x1, x2,...
Consider the following quadratic forms q(x1, x2) = 3x1^2 − 6x1x2 + 11x2^2 and r(x1, x2, x3) = x1^2 − x2^2+x3^2+ 2x1x2 − 6x1x3+2x2x3, on R 2 and R 3 , respectively. In both cases do the following. (a) Find the symmetric matrix A representing the quadratic form. (b) Find a corresponding orthogonal matrix P of eigenvectors of that matrix. (c) Write down the maximum and minimum values of the quadratic form over the unit vectors (in R 2 and...
You have 50 of each of the following kinds of jellybeans: red, orange, green, yellow. The...
You have 50 of each of the following kinds of jellybeans: red, orange, green, yellow. The jellybeans of each color are identical. (a)how many ways can you put all the jellybeans in a row? (b)How many handfuls of 12 are possible?
(5 pts) Suppose that the five standard Skittles colors (red, orange, yellow, green, purple) occur with...
(5 pts) Suppose that the five standard Skittles colors (red, orange, yellow, green, purple) occur with equal relative frequency. Use the random digits below to simulate the colors of 4 randomly selected Skittles. Continue to do this until you have generated 12 such samples of 4 Skittles. Use the results of these simulations to approximate that probability that a sample of 4 Skittles will contain at least two Skittles of the same color. 28491 06339 65216 31007 92314 50271 82943...
5. Consider the following set of dependent and independent variables. y   x1   x2 10   1   17...
5. Consider the following set of dependent and independent variables. y   x1   x2 10   1   17 11   5   9 14   5   13 14   8   10 21   6   3 24   10   8 26   16   7 33   20   3 a. Using​ technology, construct a regression model using both independent variables. y=___+___x1+___x2 ​(Round to four decimal places as needed.) b. Test the significance of each independent variable using a=0.05 Test the significance of x1, Identify the null and alternative hypothesis c. Calculate the...
An industry has 1000 firms, each with the production function f(x1; x2 ) x1^.5 x2^.5. Theprice...
An industry has 1000 firms, each with the production function f(x1; x2 ) x1^.5 x2^.5. Theprice of factor 1 is 1 and the price of factor 2 is 1. In the long run, both factors are variable, but inthe short run, each firm is stuck with using 100 units of factor 2.The long run industry supply curve:Can somebody explain how to solve?
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT