Atbilstības koeficents
Aprēķināt Pearson ir r starp diviem sarakstu skaitļiem.
Rezultāti atjaunināt, kā jūs tipa.
Par šo kalkulatoru
Pearson’s correlation coefficient (r) measures 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 standardises the result into that fixed −1 to +1 range.
Enter paired x and y values in the same order; the two lists must have the same number of values. The calculator returns r, the coefficient of determination r², the covariance, and the least-squares regression line (slope and intercept), plus a plain-English reading of the strength, and plots the data with its best-fit line. It needs at least two pairs, and the result is undefined if either variable never changes.
Worked example: for x = 1, 2, 3, 4, 5 and y = 2, 4, 5, 4, 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. Correlation is used in finance, science and social research to spot which variables move together.
Bieži uzdotie jautājumi
Ko man saka korelācijas koeficients?
Tā kvantificē, cik cieši divi mainīgie kustas taisnā līnijā. Vērtības tuvu +1 vai -1 norāda uz spēcīgu lineāro attiecību, bet vērtības tuvu 0 nozīmē nelielu vai vispār nelineāru saistību. Zīme parāda attiecību virzienu.
Vai korelācija nozīmē cēloņsakarību?
Nē. Augsts korelācija rāda divus mainīgos kustas kopā, bet ne, ka viens izraisa otru. Slēptais trešais faktors, vai tīra sakritība, var radīt spēcīgu korelāciju ar bez cēloņsakarību.
Kas ir R2?
R2 ir korelācijas koeficienta kvadrāts. Tā ir y variācijas proporcija, ko izskaidro ar lineāro attiecību ar x – r no 0,8 dod R2 no 0.64, kas nozīmē 64% no variācijas tiek uzskaitīts.
Kas ir spēcīga saistība?
Kā aptuvens ceļvedis, absolūta r zem 0,3 ir vājš, aptuveni 0,3 līdz 0,5 mērens, 0,5 līdz 0,7 mērens līdz stipra un virs 0,7 stipra. Šis kalkulators marķē izturību jums, bet saprātīgu griezumi atšķiras atkarībā no lauka.
Ko nozīmē negatīva korelācija?
Negatīvs r nozīmē mainīgos kustas pretējā virzienā: kā viens paceļas otru mēdz krist. R no -0,9 ir tikpat spēcīga lineāras attiecības kā +0,9, tikai apgriezts virzienā.
Kāda ir atšķirība starp korelāciju un kovariāciju?
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.
Kā regresijas līnija ir saistīta ar korelāciju?
Vismaz kvadrātu regresijas līnija ir taisna līnija, kas vislabāk atbilst punktiem, un tās slīpums dalās ar r zīmi. Korelācija stāsta, cik cieši punkti apskauž, ka līnija, bet r2 dod variācijas daļu līnijas izskaidrot.
API – izmantot šo kalkulatoru no koda
Sūtīt lauka vērtības zemāk kā vaicājumu parametrus vai JSON. Jebko, ko nelaižat, izmanto to pašu noklusēto šo lapu, ar kuru tiek aizpildīta nezināma parametra versija 400, nekad kluss nulles variants. Lasīt visus API dokumentus →
Mērķa punkts
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);
Rezultāti ir aprēķini tikai par vispārējiem norādījumiem, nevis finanšu, medicīnas vai nodokļu konsultācijām.