I-Calculator ye-Correlation Coefficient
Bala i-r yePearson phakathi kwee-odolo ezimbini zenani.
Iinketho ze projekti
Malunga nale Calculator
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.
Imibuzo ebuza rhoqo
Ithetha ntoni i-correlation coefficient?
Ichaza ukuba ngaba amaxabiso amabini atshintshayo ahamba kunye kumgca othe tye. Amaxabiso afutshane ne +1 okanye -1 abonisa ubudlelwane obuqinileyo obuthe tye, ngelixa amaxabiso afutshane ne 0 athetha ukuba akukho budlelwane obuthe tye. Iphawu libonisa indlela yobudlelwane.
Ingaba ubudlelwane buthetha ukuba kukho isizathu?
Hayi. Uthelekiso oluphezulu lubonisa iiparameter ezimbini ezihamba kunye kodwa hayi ukuba enye ibangela enye. Uphawu olufihlakeleyo lwesithathu, okanye ukudibana okucacileyo, kungavelisa uthelekiso olunamandla ngaphandle koqhagamshelwano olunobangela.
Yintoni i-R²?
R² yisiqwenga se-correlation coefficient. Yinxalenye yotshintsho kwi-y echazwe ngumqhagamshelwano oluthe tye ne-x — i-r ye-0.8 inika i-R² ye-0.64, ethetha ukuba i-64% yotshintsho ihlawulwe.
Yintoni ebalaseleyo njengenxulumano elinamandla?
Njengesikhokelo esinzima, i-r epheleleyo engaphantsi kwe-0.3 iphantsi, malunga ne-0.3 ukuya kwi-0.5 ephakathi, i-0.5 ukuya kwi-0.7 ephakathi- ukuya kwi-strong kwaye ngaphezulu kwe-0.7 enamandla. Le kalkuli iphawula amandla akho, kodwa iinqununu ezifanelekileyo zitshintsha ngokwendawo.
Yintoni ethetha ukuba ubudlelwane obubi?
I-r elahlekile ithetha ukuba abatshintshi bahamba ngeendlela ezichaphazelayo: njengoko omnye enyuka omnye uhlala ehla. I-r ye-0.9 inamandla obudlelwane obuthe tye njenge +0.9, kuphela ijikeleze kwindlela.
Yintoni utshintsho phakathi koqhagamshelwano nokungafani?
I-Covariance ilinganisela indlela amaxabiso amabini aguqukayo aguqukayo kunye kodwa ubungakanani bayo buxhomekeke kwiyunithi zabo, ngoko kunzima ukuchaza. I-r yePearson yi-covariance ehlukaniswe zii-deviations ezimbini eziqhelekileyo, eziphinda ziyilinganise kwiyunithi-ekhululekileyo -1 ukuya +1.
Umhlathi wokuphindaphinda uqhagamshelwe njani kuthelekiso?
Umgca wokubuyela umva wesiqwengana esincinane ngumgca othe nkqo olungelelanisa kakuhle iincopho, kwaye umqolo wayo ubelana ngophawu lwalo nge r. Uthelekiso luthetha ukuba zinjani iincopho ezixhaphakileyo ezixhaphakela umgca, ngelixa i r² inika unikezelo lotshintsho lomgca ochazayo.
API — sebenzisa le calculator ukusuka kwikhowudi
Nceda le khadi lemali njengendawo esemva ye-JSON ekhululekileyo - akukho qhosha lifunekayo. Thumela amaxabiso endawo ezantsi njengeparameter yombuzo okanye i-JSON. Nantoni na oyenzayo isebenzisa okungagqibekanga okufanayo eli phepha ligqityiwe ngaphambili; iparameter engaziwayo yi 400, ayikho i zero ekhululekileyo. Funda i-API epheleleyo →
Incopho yesiphelo
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);
Results are estimates for general guidance only, not financial, medical or tax advice.