Understanding the dataset

Research Question: Do taller people tend to weigh more?

We will analyze R’s built in ‘women’ dataset.

Dataset Overview:

  • 15 tabulated height-weight observations
  • Height: 58-72 inches
  • Weight: 115-164 pounds

Sample of the Data:

Height (in) Weight (lb)
58 115
59 117
60 120
61 123
62 126

Goal: Determine whether height and weight have a positive linear relationship.

What is Correlation?

Correlation measures the strength and direction of a linear relationship between two numerical variables.

Correlation Coefficient:

\[ -1 \leq r \leq 1 \]

How to Interpret Correlation:

  • \(r = +1\): Perfect positive relationship
  • \(r = +0.8\): Strong positive relationship
  • \(r = 0\): No linear relationship
  • \(r = -0.8\): Strong negative relationship
  • \(r = -1\): Perfect negative relationship

Our Prediction

As height increases, weight will also increase in this dataset.

Exploring Height and Weight

Interpretation: The scatterplot shows a very strong positive relationship. As height increases, weight also increases.

Calculating correlation

Pearson’s correlation coefficient measures the strength of a linear relationship.

Formula:

\[ r = \frac{\operatorname{Cov}(X,Y)}{s_X s_Y} \]

Where:

  • \(X\) = Height; \(Y\) = Weight
  • \(\operatorname{Cov}(X,Y)\): Covariance
  • \(s_X\) and \(s_Y\) = Standard deviations

Calculated Correlation:

\[ r \approx 0.995 \] Interpretation: The correlation is positive and very close to +1, indicating a very strong positive linear relationship.

Analyzing the data using R

R Code for Correlation:

cor(women$height, women$weight)
## [1] 0.9954948

Weight by Height:

Interpretation: The line graph shows that the tabulated weight increases consistently as height increases.

Interactive Height and Weight Chart

Interpretation: Hover over each point to view its height and weight measurements.

What did we learn?

Key Findings:

  • Height and weight have a very strong positive correlation.
  • Pearson’s correlation coefficient is approximately 0.995.
  • Taller heights correspond to greater weights in the dataset.

Statistical Insight:

  • Correlation helps measure the strength and direction of relationships between numerical variables.
  • Scatterplots help visualize relationships between numerical variables.

Limitations:

  • The dataset contains only 15 tabulated observations.
  • The data is not representative of all women.
  • Correlation does not establish causation.

Conclusion:

Height and weight show a very strong positive linear relationship in this dataset, supporting our original prediction.