I-Calculator ye-Correlation Coefficient
Bhala i-r ye-Pearson phakathi kwezinhlamvu ezimbili ezibhalwe ngezansi.
Iziphetho zivuselelwa uma ubhala.
Malunga nale khadi
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. 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.Worked example:Enter paired x and y values in the same order; the two lists must have the same number of values.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 y.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, 3
Imibuzo ebuzwa kaningi
Yini okushoyo i-correlation coefficient?
Ichaza ukuthi zingakanani iziguquki ezimbili ezihamba ndawonye emgqeni oqondile. Amaxabiso aphakathi kuka +1 noma -1 abonisa ubudlelwane obuqinile obuhamba phambili, kanti amaxabiso aphakathi kuka 0 abonisa ubudlelwane obuncane noma obungena phambili. Isibonakaliso sibonisa indlela yobudlelwane.
Ingabe ukuhambisana kusho ukuveza?
Akukho. Ukuhambisana okuphezulu kubonisa ukuthi ama-variables amabili ahamba ndawonye kodwa hhayi ukuthi omunye ubangela omunye. Ingxenye yesithathu efihlakele, noma ukuhambisana okuphelele, kungadala ukuhambisana okuqinile ngaphandle kokuxhumana okuholela.
Yini i-R²?
R² yisikwere se-correlation coefficient. Yingxenye yoshintsho e-y echazwe ngokuxhumana okuqondile ne-x — r ka-0.8 inikeza i-R² ka-0.64, okusho ukuthi i-64% yoshintsho ithathwa njengento ebalulekile.
Yini ebalwa njenge-correlation enamandla?
Njengendlela elula, i-r ephansi kuka-0.3 iphansi, 0.3 kuya ku-0.5 iphakathi, 0.5 kuya ku-0.7 iphakathi-kuya-kunamandla futhi ngaphezu kuka-0.7 inamandla. Le kalkuli iphawula amandla akho, kodwa ukucisha okunolwazi kuhluka ngokwendawo.
Yini okushoyo ukuxhumana okubi?
I-r elahlekile isho ukuthi iziguquki zihamba ngezinhlangothi ezihlukile: njengoba enye ikhula enye ivame ukuwa. I-r ye-−0.9 inamandla okuxhumana okuqondile njenge +0.9, ishintshwe kuphela ngesivinini.
Yini ushintsho phakathi kokuxhumana ne-covariance?
I-Covariance ilinganisela ukuthi kanjani iziguquki ezimbili zishintshana ndawonye kodwa ubukhulu bayo buxhomekeke eziyunithini zabo, ngakho kunzima ukuchaza. I-r ye-Pearson yi-covariance ehlukaniswe ngezigaba ezimbili ezijwayelekile, ezizoyiguqula ibe yiyunithi ekhululekile -1 kuya +1.
Ingabe i-regression line ihlobene kanjani nokuxhumana?
I-line yokubuyela emuva encane-eyisikwere yi-line eqondile elungele kakhulu amaphuzu, futhi i-slope yayo ihlanganisa inkomba yayo ne-r. Ukuqhathaniswa kutshela ukuthi amaphuzu abamba umgwaqo, ngenkathi i-r² inikeza inkontileka yoshintsho lomgwaqo ochazayo.
API — sebenzisa le calculator kusuka kukhodi
Nquma le calculator njenge JSON evulekile yendawo yokuqeda - akukho isithonjana esidingekayo. Thumela amaxabiso endawo ngezansi njengezilungiselelo zombuzo noma i-JSON. Noma yini ongayishiya isebenzisa iphutha elifanayo elifakwe ngaphambili lekhasi; ipharamitha engaziwa yi-400, ayikho i-zero emnyama. Funda i-API egcwele →
Ingxenye yendawo
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);
Izibalo ziyisilinganiso esisetshenziswa ukuqondisa kuphela, hhayi ukucebisa ngezimali, ukwelashwa noma ukukhokha.