BaşlayınÜcretsiz Başlayın

Assessing Pearson assumptions

For a Pearson correlation to be appropriate, the data must follow two assumptions: linearity and normally distributed.

A company is interested in running a Pearson correlation on the amount of time spent on a website and the amount of money spent purchasing items on the website, first assessing the correlation ignoring groups. Assess whether a Pearson correlation is appropriate given the linear and normal distribution assumptions that must be met.

The ggplot2 package and SiteSales dataset have been loaded for you.

Bu egzersiz

A/B Testing in R

kursunun bir parçasıdır
Kursu Görüntüle

Egzersiz talimatları

  • Create a scatter plot with AmountSpent on the x-axis and TimeSearching on the y-axis to assess the linearity of the relationship.
  • Use shapiro.test() to determine whether AmountSpent is normally distributed.
  • Use shapiro.test() to determine whether TimeSearching is normally distributed.

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

# Assess the assumption of linearity
ggplot(___) +
  ___

# Assess the normality of the `AmountSpent` variable
___

# Assess the normality of the `TimeSearching` variable
___
Kodu Düzenle ve Çalıştır