ຕົວຄິດໄລ່ຕົວສົມທົບຄວາມກ່ຽວຂ້ອງ
ຄິດໄລ່ Pearson ຂອງ r ລະຫວ່າງສອງລາຍຊື່ຂອງຕົວເລກ.
ຜົນການຄົ້ນຫາຈະຖືກອັບເດດເມື່ອທ່ານພິມມັນຂຶ້ນມາ ។
ກ່ຽວກັບເຄື່ອງຄິດໄລ່ນີ້
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.
ຄໍາຖາມທີ່ຖາມເລື້ອຍໆ
ຕົວຊີ້ວັດຄວາມກ່ຽວຂ້ອງບອກຂ້ອຍວ່າເປັນຫຍັງ?
ມັນຈະວັດແທກວ່າຕົວປ່ຽນແປງສອງຕົວຈະເຄື່ອນໄຫວໄປພ້ອມກັນໃນເສັ້ນກົງໄດ້ຫຼາຍປານໃດ. ຄ່າໃກ້ +1 ຫຼື - 1 ສະແດງໃຫ້ເຫັນຄວາມພົວພັນລວດໄວ, ໃນຂະນະທີ່ຄ່າໃກ້0ໝາຍຄວາມວ່າມີການເຊື່ອມຕໍ່ລວດໄວໜ້ອຍ ຫຼື ບໍ່ມີເລີຍ. ສັນຍານສະແດງທິດທາງຂອງຄວາມພົວພັນນີ້.
ສາຍພົວພັນໝາຍເຖິງເຫດຜົນບໍ?
ບໍ່. ຄວາມພົວພັນສູງສະແດງໃຫ້ເຫັນສອງຕົວປ່ຽນແປງເຄື່ອນໄຫວຮ່ວມກັນແຕ່ບໍ່ແມ່ນວ່າຫນຶ່ງກໍ່ໃຫ້ເກີດອີກຢ່າງໜຶ່ງ. ປັດໃຈທີສາມທີ່ຖືກເຊື່ອງໄວ້, ຫຼືການບັງເອີນທີ່ສະອາດ, ສາມາດສ້າງຄວາມພົວພັນທີ່ແຂງແຮງທີ່ບໍ່ມີການເຊື່ອມຕໍ່ສາເຫດໃດໆ.
R² ແມ່ນຫຍັງ?
R² ແມ່ນ ຕົວເລກສີ່ຫລ່ຽມຂອງ ຕົວຊີ້ວັດຄວາມກ່ຽວຂ້ອງ. ມັນແມ່ນສ່ວນຂອງຄວາມແຕກຕ່າງໃນ y ອະທິບາຍໂດຍສາຍພົວພັນເສັ້ນກັບ x - r ຂອງ 0.8 ເຮັດໃຫ້ R² ຂອງ 0.64, ຫມາຍຄວາມວ່າ 64% ຂອງຄວາມແຕກຕ່າງແມ່ນໄດ້ລາຍງານສໍາລັບ.
ອັນໃດແມ່ນການຄິດໄລ່ທີ່ມີຄວາມກ່ຽວຂ້ອງຢ່າງແຂງແຮງ?
ສໍາລັບຄໍາແນະນໍາ rough, absolute r ຕ່ໍາກວ່າ 0.3 ແມ່ນອ່ອນແອ, ປະມານ 0.3 ເຖິງ 0.5 ກາງ, 0.5 ເຖິງ 0.7 ກາງ-ເພື່ອ-ແຂງແຮງແລະສູງກວ່າ 0.7 ແຂງແຮງ. ເຄື່ອງຄິດໄລ່ນີ້ລະບຸຄວາມເຂັ້ມແຂງສໍາລັບທ່ານ, ແຕ່ cutoffs ມີຄວາມຮູ້ສຶກແຕກຕ່າງກັນໂດຍສວນ.
ຂໍ້ມູນທີ່ບໍ່ເປັນຈິງແມ່ນໝາຍຄວາມວ່າແນວໃດ?
r ດ້ານລົບ ໝາຍຄວາມວ່າຕົວປ່ຽນແປງເຄື່ອນຍ້າຍໄປໃນທິດທາງກົງກັນຂ້າມ: ເມື່ອຫນຶ່ງຂຶ້ນ ອີກອັນຫນຶ່ງມັກຈະຕົກ. r ຂອງ -0.9 ແມ່ນຄວາມສຳພັນທາງລຸ່ມທີ່ເຂັ້ມແຂງຄືກັບ +0.9, ພຽງແຕ່ປ່ຽນທິດທາງ.
ມີຄວາມແຕກຕ່າງກັນລະຫວ່າງການເຊື່ອມໂຍງແລະ covariance ແມ່ນຫຍັງ?
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.
ເສັ້ນການກັບຄືນມາແມ່ນກ່ຽວຂ້ອງກັບການພົວພັນແບບໃດ?
ເສັ້ນທີ່ກັບຄືນມາດ້ວຍຕົວເລກສີ່ຫຼ່ຽມນ້ອຍສຸດ ແມ່ນເສັ້ນກົງທີ່ເໝາະສົມກັບຈຸດທີ່ດີທີ່ສຸດ ແລະ ເສັ້ນໂຄ້ງຂອງມັນແບ່ງປັນສັນຍາລັກຂອງມັນກັບ r. ສາຍພົວພັນບອກທ່ານວ່າ ຈຸດທີ່ອ້ອມຮອບເສັ້ນນັ້ນຫນັກປານໃດ, ໃນຂະນະທີ່ r² ສະແດງສ່ວນແບ່ງຂອງການປ່ຽນແປງທີ່ເສັ້ນອະທິບາຍໃຫ້ທ່ານເຫັນ.
API — ໃຊ້ເຄື່ອງຄິດໄລ່ນີ້ຈາກໂປຣແກຣມ
ໂທເຄື່ອງຄິດໄລ່ນີ້ເປັນຈຸດຈົບ JSON ຟຣີ - ບໍ່ຕ້ອງການກູໂກ. ສົ່ງຄ່າພື້ນທີ່ຂ້າງລຸ່ມນີ້ເປັນປາຣມາຕິກຄໍາຖາມ ຫຼື JSON. ທຸກສິ່ງທີ່ທ່ານລົບອອກ ຈະໃຊ້ຕົວອັກສອນທີ່ໜ້ານີ້ໄດ້ຕື່ມໄວ້ກ່ອນ; ພາຣາມິເຕີທີ່ບໍ່ຮູ້ແມ່ນ 400, ບໍ່ແມ່ນສະກຸນທີ່ບໍ່ມີສຽງເລີຍ. ອ່ານເອກະສານ API ເຕັມ →
ຈຸດສຸດທ້າຍ
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);
ຜົນໄດ້ຮັບແມ່ນຄາດຄະເນສໍາລັບຄໍາແນະນໍາທົ່ວໄປເທົ່ານັ້ນ, ບໍ່ການເງິນ, ຄໍາແນະນໍາທາງການແພດຫຼືພາສີ.