Correlation: Complete Guide — English / हिंदी
This post explains Pearson, Spearman, Point–Biserial, Phi, and Partial correlations in both English and Hindi. Use the tabs below to switch language.
1. Pearson Correlation (Linear correlation)
Use when: both variables are continuous and relationship is roughly linear. For inference, assume bivariate normality or large sample.
Interpretation
- \(r\) ranges from -1 to +1. Sign indicates direction, magnitude indicates strength.
- Rough benchmarks (contextual): small ≈ 0.10, medium ≈ 0.30, large ≈ 0.50.
- Correlation ≠ causation.
Hypothesis test
Null: \(\rho=0\). Test statistic:
95% Confidence Interval (Fisher z)
- Transform: \( z' = \tfrac{1}{2}\ln\frac{1+r}{1-r} \)
- SE = \(1/\sqrt{n-3}\)
- CI on z': \( z' \pm z_{1-\alpha/2}\cdot SE \)
- Back transform to r: \( r = \dfrac{e^{2z'}-1}{e^{2z'}+1} \)
Worked example
Means: \( \bar X = 3, \; \bar Y = 3\).
Numerator \( \sum (x_i-\bar x)(y_i-\bar y) = 8\).
Denominator \( \sqrt{\sum (x_i-\bar x)^2 \sum (y_i-\bar y)^2} = 10 \).
So \( r = 8/10 = 0.80.\)
2. Spearman Rank Correlation (\(r_s\))
Use when: ordinal data, monotonic relationships, or to reduce influence of outliers.
If ties exist, compute average ranks and then compute Pearson correlation on the ranks: \( r_s = \text{PearsonCorr}(\text{rank}(X),\text{rank}(Y)) \).
3. Point–Biserial Correlation (one continuous, one dichotomous)
Equivalent to Pearson correlation when dichotomy is coded 0/1.
4. Phi Coefficient (both dichotomous)
For a 2×2 table:
| Y=1 | Y=0 | Row total | |
|---|---|---|---|
| X=1 | a | b | a+b |
| X=0 | c | d | c+d |
| Col total | a+c | b+d | n |
5. Partial Correlation (control variable Z)
General approach: regress X on controls, regress Y on controls, correlate residuals.
Practical tips & pitfalls
- Always plot data (scatterplot) — visual check for nonlinearity/outliers.
- Correlation ≠ causation — consider confounders and directionality.
- Outliers strongly affect Pearson r; use Spearman if needed.
- Report r, n, p-value and 95% CI where possible.
Google Sheets / Excel quick formulas
=CORREL(rangeX, rangeY) // Pearson correlation
=COVARIANCE.S(rangeX,rangeY)/(STDEV.S(rangeX)*STDEV.S(rangeY)) // alternate
// For Spearman: create ranks and then use =CORREL(ranksX, ranksY)
Note: For small n, CIs will be wide. Use Fisher z for confidence intervals.
1. पीयर्सन सहसम्बंध (रेखीय सहसम्बंध)
कब उपयोग करें: जब दोनों चर निरंतर (continuous) हों और सम्बन्ध लगभग रेखीय हो। परिकल्पना परीक्षण के लिए द्विव्यावहारिक सामान्यता (bivariate normality) या बड़ा नमूना आवश्यक है।
व्याख्या
- \(r\) का मान -1 से +1 तक होता है। संकेत दिशा दर्शाता है; परिमाण शक्ति बताता है।
- सँकेत: small ≈ 0.10, medium ≈ 0.30, large ≈ 0.50 (संदर्भ अनुसार बदलते हैं)।
- सहसम्बंध का मतलब कारण-प्रभाव नहीं होता।
परिकल्पना परीक्षण
नल: \(\rho=0\). परिक्षेत्र सांख्यिकीय:
95% आत्मविश्वास अंतराल (Fisher z)
- रूपांतरण: \( z' = \tfrac{1}{2}\ln\frac{1+r}{1-r} \)
- SE = \(1/\sqrt{n-3}\)
- z' का CI: \( z' \pm z_{1-\alpha/2}\cdot SE \)
- वापस r पर: \( r = \dfrac{e^{2z'}-1}{e^{2z'}+1} \)
उदाहरण (Worked example)
माध्य: \( \bar X = 3, \; \bar Y = 3\).
योग: \( \sum (x_i-\bar x)(y_i-\bar y) = 8\).
हर भाग का वर्गजड़: \( 10\).
अतः \( r = 8/10 = 0.80.\)
2. स्पीयर्समैन रैंक सहसम्बंध (\(r_s\))
कब उपयोग करें: जब डेटा क्रमिक (ordinal) हो, गैर-रेखीय परन्तु मोनोटोनिक सम्बन्ध हो, या बाह्य मानों (outliers) से बचना हो।
यदि टाई हों, तो औसत रैंक लेकर उन रैंकों पर Pearson correlation निकालें।
3. प्वाइंट-बाइसेरियल सहसम्बंध
यह 0/1 कोडेड द्विआधारी चर के साथ Pearson के बराबर होता है।
4. फ़ाई गुणांक (Phi coefficient)
दोनों चर द्विआधारी हो (2×2 तालिका) तो उपयोग करें:
5. आंशिक सहसम्बंध (Partial correlation)
विस्तृत विधि: नियंत्रक चर निकालकर X और Y के अवशेष निकालें और उन अवशेषों का सहसम्बंध निकालें।
व्यावहारिक सुझाव
- डेटा की स्कैटरप्लॉट बनाइए—आउटलायर्स और nonlinearity का पता चलता है।
- छोटे नमूने में शक्ति कम होती है और CI चौड़े होते हैं।
- रिपोर्ट करते समय हमेशा r, n, p और 95% CI दें।
Google Sheets / Excel सूत्र
=CORREL(rangeX, rangeY) // Pearson सहसम्बंध
// Spearman के लिए पहले रैंक निकालें और फिर =CORREL(ranksX, ranksY)
नोट: छोटी नमूना आकार के लिए Fisher z व् अन्य अनुकूल विधियों पर विचार करें।
© Tutorial • Copy & paste this HTML into Blogger's HTML editor. Math formulas are rendered by MathJax. If MathJax doesn't render immediately, switch editor modes or publish—Blogger sometimes requires a refresh.