Question

In: Statistics and Probability

COMPUTER CALCULATIONS: I need to know how to code in R for the solutions, not by...

COMPUTER CALCULATIONS:

I need to know how to code in R for the solutions, not by hand.

2. Look at the data in Table 7.18 on page 368 of the textbook. These data are also

given in the SAS code labeled “SAS_basketball_goal_data” and R code labeled basketball goal data .

The dependent variable is goals and the independent variable is height of basketball players.

Complete a SAS /R program and answer the following questions about the data set:

(a) Does a scatter plot indicate a linear relationship between the two variables?

Is there anything disconcerting about the scatter plot? Explain.

(b) Fit the least-squares regression line (using SAS / R) and interpret the estimated slope

in the context of this data set. Does it make sense to interpret the estimated intercept? Explain.

(c) For these data, what is the unbiased estimate of the error variance? (Give a number.)

(d) Using the SAS / R output, test the hypothesis that the true slope of the regression line

is zero (as opposed to nonzero). State the appropriate null and alternative hypotheses,

give the value of the test statistic and give the appropriate P-value. (Use significance

level of 0.05.) Explain what this means in terms of the relationship between the two

variables.

(e) Using SAS / R, find a 95% confidence interval for the mean basketball goal for

a player with a height of 77 inches. In addition find a 95% prediction interval for

basketball goal for a player with a height of 77 inches.

Data:

Height Goals
71 15
74 19
70 11
71 15
69 12
73 17
72 15
75 19
72 16
74 18
71 13
72 15
73 17
72 16
71 15
75 20
71 15
75 19
78 22
79 23
72 16
75 20
76 21
74 19
70 13

Solutions

Expert Solution

(a) Does a scatter plot indicate a linear relationship between the two variables?

Is there anything disconcerting about the scatter plot? Explain.

there is existence of linear relationship.

(b) Fit the least-squares regression line (using SAS / R) and interpret the estimated slope

in the context of this data set. Does it make sense to interpret the estimated intercept? Explain.

(Intercept) x  
-71.451 1.209  

there is 1.209 times effect on y in terms of x.

(c) For these data, what is the unbiased estimate of the error variance? (Give a number.)

MSE=0.6463807

(d) Using the SAS / R output, test the hypothesis that the true slope of the regression line

is zero (as opposed to nonzero). State the appropriate null and alternative hypotheses,

give the value of the test statistic and give the appropriate P-value. (Use significance

level of 0.05.) Explain what this means in terms of the relationship between the two

variables.

Estimate Std. Error t value Pr(>|t|)   
(Intercept) -71.45054 4.82700 -14.8 3.02e-13 ***
x 1.20946 0.06609 18.3 3.32e-15 ***

# R code for this problem is

data=read.csv("Book1.csv")
y=data$Goals
x=data$Height

plot(x,y,main = "plot of basketball goal data ")
fit=lm(y~x)
fit

# MSE
deviance(fit)/df.residual(fit)

#summary of fit
summary(fit)


Related Solutions

USE R CODING! Pleaseee I need the code With R coding Obs: it supposed to use...
USE R CODING! Pleaseee I need the code With R coding Obs: it supposed to use probability density function like X ~ Binomial( n ,p ) dbinom(X=?, n, prob) pbinom(X=?, n, prob) rbinmo(幾個符合二項分配的X, n, prob) X~Poisson (lamda) dpois(X=?, lamda) ppois (X=?, lamda) rpois (X, lamda) **Suppose the random variable X obeys the binomial allocation B (n=100, p=0.1) (a) Use X as the binomial allocation to calculate P(12≤X≤14) (b) In practice, when np ≥ 5 and n(1-p) ≥ 5, X will...
Hello I have this error in the code, I do not know how to fix it....
Hello I have this error in the code, I do not know how to fix it. It is written in C++ using a Eclipse IDE Error: libc++abi.dylib: terminating with uncaught exception of type std::out_of_range: basic_string bus.h =========== #pragma once #include using namespace std; class Bus { private:    string BusId; // bus ID    string Manufacturer; // manufacturer of the bus    int BusCapacity; // bus capacity    int Mileage; // mileage of bus    char Status; // current status...
I need this in R code please: Use the dataset ’juul’ in package ’ISwR’ to answer...
I need this in R code please: Use the dataset ’juul’ in package ’ISwR’ to answer the question. (1) Conduct one-way ANOVA test to test if the mean of igf1 of each level of tanner are the same? (2) What is the mean of igf1 in each level of tanner? (3) If there is any difference, which ones appear to be different? (Use pairwise t test for each pair of level with bonferroni method)
I need the code in SAS and R and outputs please 2. The data below come...
I need the code in SAS and R and outputs please 2. The data below come from a study investigating a method of measuring body composition, and give the body fat percentage (% fat), age and sex for 18 adults aged between 23 and 61 years. Source: Mazess, R.B., Peppler, W.W., and Gibbons, M. (1984) Total body composition by dual-photon (153GD) absorptiometry. American Journal of Clinical Nutrition, 40, 834-839. age % fat sex 23 9.5 male 23 27.9 female 27...
how can i find the number of linear discriminant functions? I need to know how i...
how can i find the number of linear discriminant functions? I need to know how i can find out if there is one function, two functions, more? how do i know how many LDF's are there?
I need to write a resume and I do not know how to write it. Please...
I need to write a resume and I do not know how to write it. Please help me. My name is John Doe. I finished Associate of Science in (Electrical Engineering, Computer Engineering, Physics and Math) from Community College. I have work experience over 10 years at food company. Please help me write as completely as possible. Thanks a lot for your help!
I need to know how to make an ethical decision in detail?
I need to know how to make an ethical decision in detail?
R code Need assistance in getting this R code to run variables (Process) char ( Age)...
R code Need assistance in getting this R code to run variables (Process) char ( Age) char tmp <- expand.grid(Process = unique(words$Process),Age =unique(words$Age)) X <- model.matrix(~ factor(Process):factor(Age), data = tmp) glht(mod, linfct = X)
I didn't know , how to write this code // This file is part of www.nand2tetris.org...
I didn't know , how to write this code // This file is part of www.nand2tetris.org // and the book "The Elements of Computing Systems" // by Nisan and Schocken, MIT Press. // File name: projects/04/Fill.asm // Runs an infinite loop that listens to the keyboard input. // When a key is pressed (any key), the program blackens the screen, // i.e. writes "black" in every pixel; // the screen should remain fully black as long as the key is...
Need step by step solutions and calculations The following is a set of data from a...
Need step by step solutions and calculations The following is a set of data from a sample of 11 items X: 7 5 8 3 6 0 2 4 9 5 8 Y: 1 5 4 9 8 0 6 2 7 5 4 a. Construct a scatter plot using the sample data. b. Calculate the mean, median variance and coefficient of variation and z-scores for X. c. Determine the outliers. d. Determine the quartiles of X. e. Construct a...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT