Calculadora do coeficiente de correlación
Calcula o r de Pearson entre dúas listas de números.
Os resultados actualízanse mentres escribe.
Acerca desta calculadora
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), 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. 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;Enter paired x and y values in the same order; the two lists must have the same number of values.Worked example:Enter paired x and y values in the same order;Enter paired x and y values in the same order; the two lists must have the same number of values.Worked example:Enter paired x and y values in the same order;Enter paired x and y values in the same order;Enter paired x and y values in the same order;Enter paired x and y values in the same order;Enter paired x and y values in the same order;Enter paired x and y values in the same order;Enter paired x and y values in the same order;Enter paired x and y values in the same order;Enter paired x and y value
Preguntas frecuentes
Que me di o coeficiente de correlación?
Cuantiza o grao de proximidade entre dúas variables que se moven xuntas nunha liña recta. Valores próximos a +1 ou - 1 indican unha forte relación linear, mentres que valores próximos a 0 significan pouca ou ningunha asociación linear. O signo mostra a dirección da relación.
Correlación significa causalidade?
Non. Unha correlación alta mostra que dúas variables se moven xuntas, pero non que unha cause á outra. Un terceiro factor agochado, ou pura coincidencia, pode crear unha correlación forte sen ningunha relación causal.
Que é R²?
R² é o cadrado do coeficiente de correlación. É a proporción da variación en y explicada por unha relación linear con x - un r de 0, 8 dá un R² de 0, 64, o que significa que se contabiliza o 64% da variación.
Que conta como unha correlación forte?
Como guía aproximada, un r absoluto por baixo de 0, 3 é feble, arredor de 0, 3 a 0, 5 moderado, 0, 5 a 0, 7 moderado a forte e por riba de 0, 7 forte. Esta calculadora etiqueta a forza para vostede, pero os límites sensatos varían segundo o campo.
Que significa unha correlación negativa?
Un r negativo significa que as variables se moven en direccións opostas: mentres unha sobe a outra tende a baixar. Un r de - 0, 9 é unha relación linear tan forte como +0, 9, só que invertida na dirección.
Cal é a diferenza entre correlación e covarianza?
A covarianza mide como dúas variables varían xuntas, pero o seu tamaño depende das súas unidades, polo que é difícil de interpretar. O r de Pearson é a covarianza dividida polas dúas desviacións estándar, o que a reescala para un rango libre de unidades de - 1 a + 1.
Como está relacionada a liña de regresión coa correlación?
A liña de regresión de mínimos cadrados é a liña recta que mellor se axusta aos puntos, e a súa inclinación comparte o seu signo con r. A correlación dille canto se achegan os puntos a esa liña, mentres que r² dá a porcentaxe de variación que explica a liña.
API — empregar esta calculadora desde o código
Chama esta calculadora como un punto final JSON libre - non se require ningunha chave. Envie os valores dos campos de baixo como parámetros de consulta ou JSON. Ler a documentación completa da API →
Punto final
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);
Os resultados son estimacións só para orientación xeral, non para consellos financeiros, médicos ou fiscais.