A candy bar manufacturer is interested in trying to estimate how sales are influenced by the price of their product. To do this, the company randomly chooses six small cities and offers the candy bar at different prices. Using candy bar sales as the dependent variable, the company will conduct a simple linear regression on the data below:


City Price (R) Sales
River Falls 1.30 100
Hudson 1.60 90
Ellsworth 1.80 90
Prescott 2.00 40
Rock Elm 2.40 38
Stillwater 2.90 32

What is the coefficient of correlation for these data?

1 answer

To calculate the coefficient of correlation (often denoted as r) for the given data, we'll use the formula to compute r:

r=n(xy)(x)(y)[nx2(x)2][ny2(y)2]

Where:

  • n is the number of data points
  • x is the independent variable (Price)
  • y is the dependent variable (Sales)

Step 1: Calculate the necessary sums

First, let's define our variables based on the given data.

Data: | City | Price (x) | Sales (y) | |----------------|-----------|-----------| | River Falls | 1.30 | 100 | | Hudson | 1.60 | 90 | | Ellsworth | 1.80 | 90 | | Prescott | 2.00 | 40 | | Rock Elm | 2.40 | 38 | | Stillwater | 2.90 | 32 |

Step 2: Calculate the sums

Now, we need to calculate x, y, xy, x2, y2.

  1. n=6 (the number of cities)
  2. x=1.30+1.60+1.80+2.00+2.40+2.90=11.00
  3. y=100+90+90+40+38+32=390
  4. xy=(1.30100)+(1.6090)+(1.8090)+(2.0040)+(2.4038)+(2.9032)
    • =130+144+162+80+91.2+92.8=700
  5. x2=(1.302)+(1.602)+(1.802)+(2.002)+(2.402)+(2.902)
    • =1.69+2.56+3.24+4.00+5.76+8.41=25.66
  6. y2=(1002)+(902)+(902)+(402)+(382)+(322)
    • =10000+8100+8100+1600+1444+1024=25668

Step 3: Calculate the components

Now let's plug the values into the formula to get r:

r=6(700)(11.00)(390)[6(25.66)(11.00)2][6(25668)(390)2]

Calculating the numerator:

6(700)=4200 (11.00)(390)=4290 Numerator=42004290=90

Calculating the denominator components:

  1. First component: 6(25.66)=153.96 (11.00)2=121 6(25.66)(11.00)2=153.96121=32.96

  2. Second component: 6(25668)=154008 (390)2=152100 6(25668)(390)2=154008152100=1908

Now we compute the denominator:

[32.96][1908]=62964.48251.9

Finally, compute r:

r=90251.90.357

Conclusion

The coefficient of correlation for the data is approximately r0.357, indicating a moderate negative correlation between price and sales.