Question

The cost of a leading liquid laundry detergent in different sizes is given below. Size (ounces)...

The cost of a leading liquid laundry detergent in different sizes is given below.

Size (ounces) Cost ($) Cost per ounce
16 3.69
32 4.59
64 5.89
200 10.39

Part A) Using "size" as the independent variable and "cost" as the dependent variable, make a scatter plot.

Part B) Does it appear from inspection that there is a relationship between the variables? Why or why not?

Part C) Calculate the least squares line. Put the equation in the form of: ŷ = a + bx. (Round your answers to three decimal places.)

Part D) Find the correlation coefficient r. (Round your answer to four decimal places.)

Part E) If the laundry detergent were sold in a 30-ounce size, find the estimated cost. (Use your equation from part (c). Round your answer to two decimal places.)

Part F) If the laundry detergent were sold in an 86-ounce size, find the estimated cost. (Use your equation from part (c). Round your answer to two decimal places.)

Part G) What is the slope of the least squares (best-fit) line? (Round your answer to three decimal places.)

Homework Answers

Answer #1

The relevant R code is as follows:

# loading dataset
dataset <- data.frame(Size = c(16, 32, 64, 200), Cost = c(3.69, 4.59, 5.89, 10.39))

# making scatterplot
plot(x = dataset$Size, y = dataset$Cost, xlab = "Size", ylab = "Cost", main = "Scatterplot")
# seems to be a linear relationshipt with positive correlation

# calculating least squares line
(ls_line <- lm(formula = (dataset$Cost ~ dataset$Size)))
# regression line is y_hat = 3.377 + 0.035x

# finding correlation coefficient
(r <- cor(x = dataset$Size, y = dataset$Cost))
# correlation coefficient is r = 0.9974

# finding cost for 30 ounce size
(cost_est_30 <- (3.377 + 0.035 * 30))
# estimated cost is $4.43

# finding cost for 86 ounce size
(cost_est_86 <- (3.377 + 0.035 * 86))
# estimated cost is $6.39

# slope of the best fit line
(slope <- ls_line$coefficients[2])
# slope is 0.035

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
The cost of a leading liquid laundry detergent in different sizes is given below. Size (ounces)...
The cost of a leading liquid laundry detergent in different sizes is given below. Size (ounces) Cost ($) Cost per ounce 16 3.99 32 4.59 64 5.89 200 10.19 Part (a) Calculate the least squares line. Put the equation in the form of: ? = a + bx. (Round your answers to three decimal places.) ? = _______+ __________x
The cost of a leading liquid laundry detergent in different sizes is given below. Size (ounces)...
The cost of a leading liquid laundry detergent in different sizes is given below. Size (ounces) Cost ($) 16 3.79 32 4.79 64 5.59 200 10.49 Part (a) Using "size" as the independent variable and "cost" as the dependent variable, draw a scatter plot. Part (b) Does it appear from inspection that there is a relationship between the variables? Why or why not? Yes, it appears that cost increases with size.No, there is no visible relationship between the variables.   ...
The cost of a leading liquid laundry detergent in different sizes is given below. Size (ounces)...
The cost of a leading liquid laundry detergent in different sizes is given below. Size (ounces) Cost ($) Cost per ounce 16 3.99 32 4.79 64 5.59 200 10.99 What is the slope of the least squares (best-fit) line? (Round your answer to three decimal places.) __________________ Interpret the slope. Choose A or B A. As the cost of liquid laundry detergent increases by $1, the detergent size increases by this many ounces. B. As the number of ounces increases...
The following are advertised sale prices of color televisions at an electronics store. Size (inches) Sale...
The following are advertised sale prices of color televisions at an electronics store. Size (inches) Sale Price ($) 9 137 20 187 27 277 31 447 35 1177 40 2177 60 2497 A. Decide which variable should be the independent variable and which should be the dependent variable. Independent variable: size; Dependent variable: OR sale price Independent variable: sale price; Dependent variable: size     B. Draw a scatter plot of the data. C. Does it appear from inspection that there is...
The following are advertised sale prices of color televisions at an electronics store. Size (inches) Sale...
The following are advertised sale prices of color televisions at an electronics store. Size (inches) Sale Price ($) 9 157 20 197 27 267 31 447 35 1177 40 2177 60 2497 A. Decide which variable should be the independent variable and which should be the dependent variable. Independent variable: size; Dependent variable: OR sale price Independent variable: sale price; Dependent variable: size     B. Draw a scatter plot of the data. C. Does it appear from inspection that there is...
The following table gives the gold medal times for every other Summer Olympics for the women's...
The following table gives the gold medal times for every other Summer Olympics for the women's 100 meter freestyle (swimming). Year Time (seconds) 1912 82.2 1924 72.4 1932 66.8 1952 66.8 1960 61.2 1968 60.0 1976 55.65 1984 55.92 1992 54.64 2000 53.8 2008 53.1 A) Calculate the least squares line. Put the equation in the form of: ŷ = a + bx. (Round your answers to three decimal places.) B) Find the correlation coefficient r. (Round your answer to...
The average number of people in a family that received welfare for various years is given...
The average number of people in a family that received welfare for various years is given below. (Source: House Ways and Means Committee, Health and Human Services Department) Year Welfare family size 1969 4.0 1973 3.6 1975 3.2 1979 3.0 1983 3.0 1988 3.0 1991 2.9 Use “year” as the independent variable and “welfare family size” as the dependent variable, Answer from your excel sheet: a) Calculate the least squares line. Put the equation in the form of: y=a-bx. To...
A production line is designed to fill bottles with 200 ounces of laundry detergent. A manager...
A production line is designed to fill bottles with 200 ounces of laundry detergent. A manager wants to test the line's output to see if the machines really are filling the bottles with 200 ounces, or if they contain some other amount on average. This is a test to see whether the population mean is 200 ounces or some other value. To do this, a sample of 25 bottles is taken. The sample mean is 198 ounces, the sample standard...
The height (sidewalk to roof) of notable tall buildings in America is compared to the number...
The height (sidewalk to roof) of notable tall buildings in America is compared to the number of stories of the building (beginning at street level). Height (in feet) Stories 1050 58 428 29 362 25 529 40 790 60 401 22 380 38 1454 110 1127 100 700 46 Part a) Calculate the least squares line. Put the equation in the form of: ŷ = a + bx. Part b) Find the correlation coefficient r. Part c) Based on the...
An accountant wishes to predict direct labor cost (y) on the basis of the batch size...
An accountant wishes to predict direct labor cost (y) on the basis of the batch size (x) of a product produced in a job shop. Data for 12 production runs are given in the table below, along with the Excel output from fitting a least squares regression line to the data. Direct Labor Cost Data Direct Labor Cost, y ($100s) Batch Size, x 71 5 663 62 381 35 138 12 861 83 145 14 493 46 548 52 251...