Example

Power

Return to the Lewis power (\(y\)) and weight (\(x\)) example. The scatterplot highlights that the relationship appears roughly linear. We can calculate the correlation coefficient to assess the strength of the linear relationship. The basis of the calculation are the summary statistics below.

\(\bar{x}\) = 968, \(\bar{y}\) = 64.42, \(n\)=38, \(S_{xx}=1871277, S_{yy}=3415.59, S_{xy}=72217.8\)

Hence

\[r=\frac{S_{xy}}{\sqrt{S_{xx}S_{yy}}} = \frac{72217.8}{\sqrt{(1871277 \times 3415.59) }} = 0.903\]

Hypothesis Test

\[H_0:\rho= 0 \mbox{ vs } H_1:\rho \neq 0\]

  • From statistical tables the critical value for \(n=38\) and \(\alpha\) = 5% is \(r_{n,\alpha} = r_{38,5\%} = 0.320\).

  • The sample correlation coefficient \(r = 0.903>0.320\).

  • Reject \(H_0\)

  • Conclude that \(\rho\) is statistically significantly different from 0.

  • There is evidence of a strong linear relationship between power and weight

  • The estimated correlation \(r\) suggests that this relationship is positive.

Effect of laser treatment on pain felt during dental procedure

A final year dental student has conducted a trial where he has assessed the pain felt during a dental examination under two situations: a) using a laser and b) simulating using a laser.

Estimate the correlation coefficient and formally test its significance.

Plot the data

Based on this plot alone, there looks to be a positive correlation between \(X\) and \(Y\). However, this correlation may be dictated by the data point on the top right corner - with an `unusually’ high value of \(Y\).

Estimate sample correlation

\[\sum_{i=1}^nx_i = 272,\sum_{i=1}^ny_i = 250\] \[\bar{x} = 27.2, \bar{y} = 25, \sum x_i^2 = 8066, \sum y_i^2 = 7072, \sum x_iy_i = 7396, n=10\]

  • \(S_{xx} = \sum{x_i^2} - \frac{(\sum{x_i})^2}{n}=8066 - \frac{272^2}{10}=667.6\)

  • \(S_{yy} = \sum{y_i^2} - \frac{(\sum{y_i})^2}{n}=7072 - \frac{250^2}{10}=822\)

  • \(S_{xy} = \sum{x_iy_i} - \frac{\sum{x_i}\sum{y_i}}{n}=7396 - \frac{272 \times 250}{10}=596\)

\[r=\frac{S_{xy}}{\sqrt{S_{xx}S_{yy}}} = \frac{596}{\sqrt{(667.6 \times 822) }} = 0.8045\]

Hypothesis Test

\[H_0:\rho= 0 \mbox{ vs } H_1:\rho \neq 0\]

  • From statistical tables the critical value for \(n=10\) and \(\alpha\) = 5% is \(r_{n,\alpha} = r_{38,5\%} = 0.6319\).

  • The sample correlation coefficient \(r = 0.0.8045>0.6319\).

  • Reject \(H_0\)

  • Conclude that \(\rho\) is statistically significantly different from 0.

  • There is evidence of a strong linear relationship between pain felt under laser and simulation.

  • The estimated correlation \(r\) suggests that this relationship is positive.