相関係数計算器
2つの数列の間のPearsonのrを計算する。
結果はタイプすると更新されます。
この計算機の情報
is a metric for the correlation between two variables. It is used to measure the correlation between two variables. The Pearson’s correlation coefficient (r) is a measure of the strength and direction of the linear relationship between two variables, ranging from −1 (perfect negative) through 0 (no linear relationship) to +1 (perfect positive). It is found by dividing the covariance of x and y by the product of their standard deviations, which standardizes the result into that fixed −1 to +1 range. It needs at least two pairs, and the result is undefined if either variable never changes. It needs at least two pairs, and the result is undefined if either variable never changes. It needs at least two pairs, and the result is plotted with its best-fit line.Worked example: for x = 1, 2, 3, 4, 5 and y = 2, 4, 5, 6 the points trend upward together, giving r ≈ 0.85 — a strong positive correlation — and r² ≈ 0.73, meaning about 73% of the variation in y is explained by a straight-line relationship with x.Worked example: for x = 1, 2, 3, 4, 5 and y = 2, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
よくある質問
相関係数は何を示す?
直線上で二つの変数がどれだけ近くに移動するかを定量化します。+1 または -1 に近い値は強い線形関係を示し、0 に近い値は線形関係が少ないか無いことを示します。符号は関係の方向を示します。
相関は因果関係を意味するのか?
いや、高い相関は二つの変数が一緒に動いていることを示しますが、 それが他の変数を引き起こすことはありません。隠された第三の要因、または純粋な偶然は、因果関係のない強い相関を生み出すことができます。
R² は何ですか?
R² is the square of the correlation coefficient. It is the proportion of the variation in y explained by a linear relationship with x — an r of 0.8 gives an R² of 0.64, meaning 64% of the variation is accounted for.
強い相関は何を意味する?
0.3以下の絶対rは弱い、0.3から0.5の範囲は中等度、0.5から0.7は中等度から強い、0.7以上は強いと言います。この計算機は強さをラベル付けしますが、適切なカットオフは分野によって異なります。
負の相関は何を意味するのか。
A negative r means the variables move in opposite directions: as one rises the other tends to fall. An r of −0.9 is just as strong a linear relationship as +0.9, only reversed in direction.
相関と共分散の違いは何か。
Covariance measures how two variables vary together but its size depends on their units, so it is hard to interpret. Pearson’s r is the covariance divided by the two standard deviations, which rescales it to a unit-free −1 to +1 range.
回帰線は相関とどのように関係するのか。
相関は点がその回帰線をどれだけ強く抱えているかを示し,r2は回帰線が説明する変動の割合を与える。
API — コードからこの計算機を使う
この計算機を自由な JSON エンドポイントとして呼び出します。鍵は必要ありません。下のフィールド値をクエリパラメータまたは JSON として送信してください。 省略したものは、このページに既に入力されているデフォルトと同じ値を使用します。未知のパラメータは 400 で、サイレンスゼロはありません。 API ドキュメントを読む →
エンドポイント
GET https://calculator.free/api/v1/correlation-coefficient/
curl
curl "https://calculator.free/api/v1/correlation-coefficient/?x=1, 2, 3, 4, 5&y=2, 4, 5, 4, 6"
JavaScript fetch()
const r = await fetch(
"https://calculator.free/api/v1/correlation-coefficient/?" + new URLSearchParams({
"x": "1, 2, 3, 4, 5",
"y": "2, 4, 5, 4, 6"
}));
const data = await r.json();
console.log(data.results);
結果は一般的な指導のための推定であり,財務的,医療的または税務的な助言ではない。