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 = \frac{n(\sum xy) - (\sum x)(\sum y)}{\sqrt{[n \sum x^2 - (\sum x)^2][n \sum y^2 - (\sum 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 \( \sum x \), \( \sum y \), \( \sum xy \), \( \sum x^2 \), \( \sum y^2 \).

  1. \( n = 6 \) (the number of cities)
  2. \( \sum x = 1.30 + 1.60 + 1.80 + 2.00 + 2.40 + 2.90 = 11.00 \)
  3. \( \sum y = 100 + 90 + 90 + 40 + 38 + 32 = 390 \)
  4. \( \sum xy = (1.30 \cdot 100) + (1.60 \cdot 90) + (1.80 \cdot 90) + (2.00 \cdot 40) + (2.40 \cdot 38) + (2.90 \cdot 32) \)
    • \( = 130 + 144 + 162 + 80 + 91.2 + 92.8 = 700 \)
  5. \( \sum x^2 = (1.30^2) + (1.60^2) + (1.80^2) + (2.00^2) + (2.40^2) + (2.90^2) \)
    • \( = 1.69 + 2.56 + 3.24 + 4.00 + 5.76 + 8.41 = 25.66 \)
  6. \( \sum y^2 = (100^2) + (90^2) + (90^2) + (40^2) + (38^2) + (32^2) \)
    • \( = 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 = \frac{6(700) - (11.00)(390)}{\sqrt{[6(25.66) - (11.00)^2][6(25668) - (390)^2]}} \]

Calculating the numerator:

\[ 6(700) = 4200 \] \[ (11.00)(390) = 4290 \] \[ \text{Numerator} = 4200 - 4290 = -90 \]

Calculating the denominator components:

  1. First component: \[ 6(25.66) = 153.96 \] \[ (11.00)^2 = 121 \] \[ 6(25.66) - (11.00)^2 = 153.96 - 121 = 32.96 \]

  2. Second component: \[ 6(25668) = 154008 \] \[ (390)^2 = 152100 \] \[ 6(25668) - (390)^2 = 154008 - 152100 = 1908 \]

Now we compute the denominator:

\[ \sqrt{[32.96][1908]} = \sqrt{62964.48} \approx 251.9 \]

Finally, compute \( r \):

\[ r = \frac{-90}{251.9} \approx -0.357 \]

Conclusion

The coefficient of correlation for the data is approximately \( r \approx -0.357 \), indicating a moderate negative correlation between price and sales.