Starting from:

$25+

STAT40001_59800 - Hw4 -Solved

Q.N. 1) An ice-cream store is interested to determine whether or not there is an association between gender and preference for ice cream flavor. Data below provides the information based on the order received in a randomly chosen day. Perform an appropriate analysis to check whether the ice cream flavor and gender are independent.

 

Flavor

                          Chocolate      Vanilla      Strawberry

      Men           100                 120            60

      Women     350                 200            90

 

Q.N. 2) A clinical dietician wants to compare two different diets, A and B, for diabetic patients. She hypothesizes that diet A (Group 1) will be better than diet B (Group 2), in terms of lower blood glucose. She plans to get a random sample of diabetic patients and randomly assign them to one of the two diets. At the end of the experiment, which lasts 6 weeks, a fasting blood glucose test will be conducted on each patient. She also expects that the average difference in blood glucose measure between the two group will be about 10 mg/dl. Furthermore, she also assumes the standard deviation of blood glucose distribution for diet A to be 15 and the standard deviation for diet B to be 17. How many subjects are needed in each group assuming equal sized groups? (Please use α = 0.05 and Power=0.8).

Q.N. 3) The mammals data set in the MASS package records brain size and body size of 62 different mammals.

a)   Display a scatter plot of the log(brain) vs. log(body).

b)   Fit a simple linear regression model to the transformed data.

c)   What is the equation of the fitted model.

Q.N. 4) The data set cars is one of the data sets installed with R and is available in base package. The data set contains 50 observations of speed(mph) and dist(stopping distance in feet). a) Display the data using scatter plot.

b)   Fit a simple regression model using speed as a predictor variable.

c)   Add the fitted line to the scatter plot.

d)   Calculate the residuals and fitted values and print only first five observations of the residuals and fitted values.e) Create a scatter plot of the residuals and fitted values.

f)    Assuming that no intercept model is appropriate fit a simple linear regression model.

g)   Calculate and compare the coefficient of determination for both the with intercept and no-intercept models.

h)   Using your fitted model predict the stopping distance for a car with an speed of 21 mph.

1

Q.N. 5) An author maintains a website on a particular book and using Google Analytics, records the number of visits on this particular website on each day of the year. As expected there are more hits during weekdays then on weekends. Since the book is used as a textbook for a statistics course there are more hits during the time when the classes are in session. Table below provides the data for 35 weeks from April through November 2009. To explore the week by week visit patterns of these

                                                                                                    Week      Hits

 

1                    148

2                    148

3                    157

4                    112

5                    125

6                    155

7                    154

8                    135

9                    140

10                164

11                154

12                138

13                129

14                131

15                113

16                124

17                119

18                110

19                166

20                105

21                132

22                132

23                144

24                152

25                152

26                166

27                161

28                168

29                170

30                179

31                154

32                136

33                147

34                151

35                188

 

a)  Display the data using a scatterplot.

b)  Calculate the rank correlation coefficient to measure the association between the week and the number of hits onthe website.

c)   Test for the significance of the correlation at 0.05 level.


More products