在線即時計算器 · 純前端本地秒算 · 零數據上傳

🧮 Pearson Correlation Coefficient 計算機

專業免費的 Pearson Correlation Coefficient 計算機。純前端本機毫秒級計算、零資料上傳、極致隱私保護。提供詳細公式推導、實例示範與常見問答。

即時推算結果 (Computed Output)
0.7746 range −1 to +1
專業公認計算模型,即時運算完畢
📜 計算歷史記錄 (試算軌跡)
尚無歷史記錄,每次點擊「計算」將在此留下試算軌跡...

What Is the Pearson Correlation Coefficient?

The Pearson correlation coefficient, denoted r, measures the strength and direction of the linear relationship between two numeric variables. Its value always falls between −1 and +1: a value of +1 means a perfect positive linear relationship, −1 means a perfect negative relationship, and 0 means no linear correlation at all. It is one of the most widely used statistics in research, finance, and data science.

How to Use This Calculator

Enter your X values and Y values as comma- or space-separated lists. Each X must pair with the Y in the same position, so both lists should contain the same number of values. The calculator returns r, the coefficient of determination r², the number of paired observations, and the mean of each variable.

The Formula Explained

The formula subtracts each value from its mean to get deviations, multiplies the paired X and Y deviations and sums them (the numerator), then divides by the square root of the product of the summed squared deviations (the denominator):

r = ((\sum (x_i - \bar{x})(y_i - \bar{y})) ÷ (\sqrt{\sum (x_i - \bar{x})^2 \sum (y_i - \bar{y})^2}))

The numerator captures how the variables move together (covariance), while the denominator normalises the result so it stays in the −1 to +1 range.

Worked Example

Suppose X = 1, 2, 3, 4, 5 and Y = 2, 4, 5, 4, 5. The means are \bar{x} = 3 and \bar{y} = 4. The sum of deviation products is 6, \sum (x_i - \bar{x})^2 = 10, and \sum (y_i - \bar{y})^2 = 6. So

r = ((6) ÷ (√(10 × 6))) = ((6) ÷ (√(60))) ≈ 0.7746
This indicates a strong positive linear relationship, with r^2 ≈ 0.60 meaning about 60% of the variance is shared.

使用注意事項與精準校對原則(6 大核心守則)

📐 1. 嚴格對齊輸入量綱與單位

輸入各項數值時請務必確認量綱(例如小時、天數、金額、百分比),避免單位不匹配引發推算偏差。

🔒 2. 純前端本機毫秒級隱私保障

所有計算邏輯 100% 在您的終端瀏覽器內完成,資料絕不上傳伺服器,嚴格守護商業與個人隱私。

📊 3. 符合公認學術與產業計算模型

演算法嚴格遵循國際通用數學公式與標準計算模型,經多重情境交叉核對,數值嚴密精確。

📋 4. 一鍵複製與免登入 PDF 匯出

支援一鍵複製推算結果字串至剪貼簿,亦可直接點擊列印按鈕輸出純淨 PDF 工作報表。

🔄 5. 多情景敏感度動態對比

建議針對極端值與多組預期情景分別試算,觀察輸出數據的波動區間,輔助做出更穩健的決策。

🛡️ 6. 專業諮詢與日常參考免責聲明

本工具運算結果供日常排程、學業研習與事前參考之用,如涉及重大法規或投資決策請諮詢持證專家。

常見問題 (FAQ)

What does r² tell me?
r² (r squared) is the proportion of variance in one variable that is predictable from the other — useful for judging how well a linear model fits.
Does a high r mean causation?
No. Correlation measures association, not cause. A strong r can arise from coincidence or a hidden third variable.
Why must X and Y have equal length?
Pearson's r works on paired observations. If the lists differ in length, only the first n pairs are used, where n is the shorter count.