相関

統計学入門

George Boorman

Curriculum Manager, DataCamp

2つの変数間の関係

scatter_plot_displaying_monthly_gym_costs_vs_cost_of_a_bottle_of_water.png

統計学入門

ピアソン相関係数

  • カール・ピアソンが1896年に発表!
  • 2つの変数間の関係の強さを定量化
  • −1+1で表す
  • 大きさは関係の強さを示す
  • 符号(+ または -)は関係の方向を示す
1 https://royalsocietypublishing.org/doi/10.1098/rsta.1896.0007
統計学入門

線形関係

  • 線形 = 従属変数と独立変数の比例変化

scatter_plot_of_gym_vs_water_costs_with_annotations_for_observations_of_one_dollar_water_and_thirty_dollar_gym_costs_plus_one_dollar_fifty_water_and_forty_five_dollar_gym_costs_and_correlation_coefficient_equals_zero_point_three_six.png

統計学入門

数値 = 関係の強さ

0.99(非常に強い)

Scatterplot with points very close to an invisible line.png

統計学入門

数値 = 関係の強さ

0.99(非常に強い)

Scatterplot with points very close to an invisible line.png

0.75(強い)

Scatterplot with points further from the invisible line.png

統計学入門

数値 = 関係の強さ

0.56(中程度)

Scatterplot with points even further from the invisible line.png

統計学入門

数値 = 関係の強さ

0.56(中程度)

Scatterplot with points even further from the invisible line.png

0.21(弱い)

Scatterplot with points that look almost totally randomly scattered.png

統計学入門

数値 = 関係の強さ

0.04(関係なし)

Scatterplot with points that look totally randomly scattered.png

  • xの値がわかってもyについて何も予測できない
統計学入門

符号 = 方向

0.75: xが増加するとyも増加する

Scatterplot where y increases as x increases.png

-0.75: xが増加するとyは減少する

Scatterplot where y decreases as x increases.png

統計学入門

ジムの会費 vs. 水の費用

scatter_plot_displaying_monthly_gym_costs_vs_cost_of_a_bottle_of_water.png

統計学入門

傾向線を追加

scatter_plot_displaying_monthly_gym_costs_vs_cost_of_a_bottle_of_water_with_trendline_and_annotated_p_equals_zero_point_three_five.png

統計学入門

平均寿命 vs. 水1本の価格

scater_plot_of_life_expectancy_vs_water_bottle_cost_showing_trendline_and_p_equals_zero_point_six_one.png

統計学入門

相関は因果関係を意味しない

  • 水の価格を上げると平均寿命は延びるのか?

water_bottles.png

elderly_couple.png

  • 相関は因果関係ではない
1 画像クレジット: https://unsplash.com/@micheile; https://unsplash.com/@jon_chng
統計学入門

交絡変数

  • 平均寿命に影響している可能性があるものは?

    • 経済力が強い地域では水の価格が高い
    • そういった地域では質の高い医療へのアクセスが提供される傾向がある
  • 経済力の強さが交絡変数である可能性がある

    • 交絡変数は測定されないが、変数間の関係に影響する可能性がある

doctor.jpg

統計学入門

練習しましょう!

統計学入門

Preparing Video For Download...