Bayesian Correlation

Bayesian Correlation

⚡ Advanced · Bayesian Statistics · Correlation

v1.0.2

Agriculture, Forestry & Aquatic context — reports the relationship between two continuous variables with BF₁₀. Is the yaprak_alan_indeksi_LAI ↔ biokutle_kg_ha relationship real or just chance? Supported by Pearson/Spearman/Kendall.

Pearson/Spearman/KendallBF₁₀%95 CrI(r)Posterior dağılım grafik

🎯 What is it for?

Instead of the classic correlation p-value, it reports BF₁₀; particularly valuable in small samples and replication studies. In the context of Agriculture, Forestry & Aquatic, the predicted direction of the relationship (ρ ≈ 0.82) between yaprak_alan_indeksi_LAI and biokutle_kg_ha is tested with the Bayes Factor.

📌 When is it used?

  • Two continuous variables — to seek direct evidence about direction and strength
  • When you want to directly test the “no correlation” hypothesis
  • As a replacement for a test that failed with p < .05 at small N

⚙ Assumptions

  1. Two continuous variables (yaprak_alan_indeksi_LAI, biokutle_kg_ha).
  2. Linear relationship (Pearson) or monotonic (Spearman/Kendall).
  3. Outlier checks should be done beforehand with Bland-Altman/scatter.

📊 How to Run in MerQur

1
Data tab → load.
2
Analysis → ⚡ Advanced → Bayesian Correlation.
3

Panel assignments (form fields in the program):

  • Columns: {'x_col': 'birim_id', 'y_col': 'X_degisken'}
  • Parameters: {'method': 'pearson'}
4
Prior scale (default stretched-beta, κ=1).
5
▶ Run → r̂, BF₁₀, posterior distribution, 95% CrI.

📊 Sample Dataset — Agriculture, Forestry & Aquatic

ℹ Note: The scenario, MerQur output and interpretation below were produced by actually running the real example dataset in MerQur. Numeric results on your own data will differ; the goal is to show how the analysis is set up and interpreted end-to-end.

🎬 Example File

This analysis is demonstrated on the following example dataset for Agriculture, Forestry & Aquatic:

Ziraat_Orman_Su/102_bayesian_correlation_BF10.xlsx

🎬 Scenario

We examine the relationship between two continuous variables (X_variable, Y_variable) in a Bayesian way. Classical correlation
gives an r and a p; Bayesian correlation provides the posterior distribution of r and the Bayes factor (BF10): how strong is the
evidence for “a relationship exists” against “no relationship”, and what is the credible interval for r?

⚙️ Variable Selection

  • Variable 1: X_variable
  • Variable 2: Y_variable

Data Preview (First 5 Rows)

unit_id X_variable Y_variable
1.0 25.4 38.58
2.0 49.42 56.82
3.0 39.88 55.51
4.0 35.37 51.54
5.0 39.46 51.92

n = 80 · Columns: unit_id, X_variable, Y_variable

📈 MerQur Output

BAYESIAN CORRELATION RESULT
─────────────────────────────────────────────

r = 0.780 (very strong) BF10 = 4.5 x 10^14 (decisive: relationship exists) (X_variable, Y_variable)

💬 Interpretation

We examined the relationship between two continuous variables in a Bayesian way. Classical correlation gives an r
and a p; Bayesian correlation provides the posterior distribution of r and the Bayes factor. The result is very
strong: r = 0.78 and BF10 = 4.5 x 10 to the 14. So “a relationship exists” is supported over “no relationship” by
a fourteen-zero ratio — decisive evidence. The advantage of the Bayesian approach is answering not just “is it
significant” but “how strong is the evidence” and “what is a reasonable range for r” directly. In a very strong
relationship like this, the Bayes factor makes the result indisputable: there is a real, strong connection between
the two variables.

⚠ Common Mistakes

  • Pearson is misleading for non-linear relationships — check the scatter plot, and use Spearman if needed.
  • Outliers inflate or mask the correlation.
  • Correlation ≠ causation (especially in observational studies).

📚 MerQur’a Atıf

Örücü, Ö. K. (2026). MerQur: Integrated Academic Data Analysis & Reporting Platform [Computer software] (Version 1.0.0). https://doi.org/10.53463/merqur.2026001

Tüm atıf formatları →

📝 Üretim Notu — Bu sayfadaki örnek veri sentetik olarak üretilmiştir (sabit SEED=42, generator: samples/Ileri_Duzey_v102/_generate_v102_datasets.py). Sayfa içeriği Anthropic Claude desteği ile hazırlanmış, akademik doğruluk yazar tarafından kontrol edilmiştir.