Lab 7 Pre-Lab and Exercises

pdf

School

University of Calgary *

*We aren’t endorsed by this school

Course

213

Subject

Statistics

Date

Apr 3, 2024

Type

pdf

Pages

4

Uploaded by trist8182

Report
11/20/2019 Statistics 213 Lab Exercises – Simple Linear Regression https://scott-robison.rstudio.cloud/a8c401512bf9446cb9e30f29e3a95885/file_show?path=%2Fcloud%2Fproject%2FLab7.html 1/4 Statistics 213 Lab Exercises – Simple Linear Regression © Jim Stallard, Scott Robison, and Claudia Mahler 2019 all rights reserved. Pre-Lab Exercise: Is there a relationship between the number of tweets an item receives on Twitter and the success of a product? A study was taken where the tweet rate of a motion picture and its opening weekend box office revenue was observed. The `tweet rate’ represents the average number of tweets per hour where the movie was referenced. The revenue of the movie is in millions of $s. The bivariate data was analyzed and summarized below with the statistical software. Average Tweets per hour Revenue (in Millions of dollars) 1365.80 142.0 1212.80 77.0 581.50 61.0 310.00 32.0 455.00 31.0 290.00 30.0 250.00 21.0 680.50 18.0 150.00 18.0 164.50 17.0 113.90 16.0 144.50 15.0 418.00 14.0 98.00 14.0 100.80 12.0 115.40 11.0 74.40 10.0 87.50 9.0 127.60 9.0
11/20/2019 Statistics 213 Lab Exercises – Simple Linear Regression https://scott-robison.rstudio.cloud/a8c401512bf9446cb9e30f29e3a95885/file_show?path=%2Fcloud%2Fproject%2FLab7.html 2/4 Average Tweets per hour Revenue (in Millions of dollars) 52.20 9.0 144.10 8.0 41.30 2.0 2.75 0.3 Average_Tweets_Per_Hour=c(1365.8,1212.8,581.5,310,455,290,250,680.5,150,164.5,113.9,144.5,418,98,100.8,115.4,74.4,87.5,12 7.6,52.2,144.1,41.3,2.75) Revenue=c(142,77,61,32,31,30,21,18,18,17,16,15,14,14,12,11,10,9,9,9,8,2,.3) fit=lm(Revenue~Average_Tweets_Per_Hour) cor(Revenue~Average_Tweets_Per_Hour) ## [1] 0.9078671 fit ## ## Call: ## lm(formula = Revenue ~ Average_Tweets_Per_Hour) ## ## Coefficients: ## (Intercept) Average_Tweets_Per_Hour ## 1.15056 0.07877 a. Identify the predictor/ -variable and the response/ -variable. 0 200 400 600 800 1000 1200 1400 0 20 40 60 80 100 120 140 Average Tweets per hour Revenue (in Millions of dollars)
11/20/2019 Statistics 213 Lab Exercises – Simple Linear Regression https://scott-robison.rstudio.cloud/a8c401512bf9446cb9e30f29e3a95885/file_show?path=%2Fcloud%2Fproject%2FLab7.html 3/4 b. What does the scatterplot tell you about the (i) direction of the relationship and (ii) the strength of the relationship? c. Consider the provided value of the correlation coefficient. What does the value of this statistic tell you about (i) the direction and (ii) the strength of the relationship? d. From the information given, estimate the model that expresses a movie’s opening weekend revenue as a linear function of its social media prevalence, the latter measures by the average number of tweets per hour. That is, estimate the model . e. Suppose a certain movie receives an average of 500 tweets per hour during its opening weekend. Using the estimate of the model, predict this movie’s opening weekend revenue. f. If the average number of tweets per hour increases by one, how does this affect the movie’s opening weekend revenue? g. What percentage of the variation in a movie’s opening weekend revenue can be explained by its linear relationship with the average number of tweets the movie receives in an hour? h. The ability to predict the opening weekend revenue of a movie – what you did in part (e) – depends on a certain condition. State this condition. Lab Exercise 1: In a certain jurisdiction, all students in Grade Three are required to take a standardized test to evaluate their reading comprehension skills. Educators believe that such standardized testing is not helpful, as a student’s ability can be affected by various socio-economic factors. School ID Average score on the standardized reading test for all Grade Three students Percentage of Grade Three students who live below the poverty-line School 1 165 91.7 School 2 157.2 90.2 School 3 164.4 86 School 4 162.4 83.9 The data sample actually has entries that must be input into R.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
11/20/2019 Statistics 213 Lab Exercises – Simple Linear Regression https://scott-robison.rstudio.cloud/a8c401512bf9446cb9e30f29e3a95885/file_show?path=%2Fcloud%2Fproject%2FLab7.html 4/4 Average_Reading_Score =c(165.0, 157.2, 164.4, 162.4, 162.5, 164.9, 162.0, 165.0, 173.7, 171.0, 169.4, 172.9, 172.7, 174.9, 174.8, 170.1, 181.4, 180.6, 178.0, 175.9, 181.6, 183.8) Percent_below_poverty = c(91.7, 90.2, 86.0, 83.9, 80.4, 76.5, 76.0, 75.8, 75.6, 75.0, 74.7, 63.2, 52.9, 48.5, 39.1, 38.4, 34.3, 30.3, 30.3, 29.6, 26.5, 13.8) fit=lm(Average_Reading_Score~Percent_below_poverty) This data resulted by sampling random schools within this jurisdiction. For each school, the average score on the standardized reading test for all Grade Three students as well as the percentage of Grade Three students who live below the poverty-line was observed. a. create a scatterplot. Complete the statement: From this, the relationship between the Grade Three reading comprehension test result and the proportion of Grade Three students living below the poverty line is ____________. (non- existent, positive, negative) b. Compute the correlation coefficient. c. Compute the model that estimates the average Grade Three reading test score based on its linear relationship to the proportion of Grade Three students who live below the poverty line. d. In a certain school, the proportion of children in Grade Three who live below the poverty line is 21%. Predict the average reading comprehension score this school’s Grade Three students. e. Complete the sentence: “As the proportion of a school’s Grade Three children who live below the poverty line increases by 1%, the reading comprehension score will _______ by ______ of _______. f. Find the coefficient of determination. g. What does the coefficient of determination measure? h. What conditions are required in order to estimate (from some data), then predict the reading comprehension score (Y) of a Grade Three class at a certain school based on the proportion of Grade Three students who live below the poverty line (X)? Use the skills you have learned in this lab to complete the lab quiz.