# Is one variable with theoretical distribution and a second variable with same observed distribution correlated?

If this question is too basic, please forgive as I'm not an expert in stats.

If the observed frequency distribution is the same as the theoretical distribution, variable A has the observed distribution, variable B has the theoretical distribution. Then, can we say A, B are highly correlated?

Could you give me the example or reliable evidence?

• The observed frequency distribution is almost never the same as the theoretical distribution, but when the theoretical distribution approximates the observed distribution we can make certain inferences. Commented Nov 4, 2022 at 15:19

## 1 Answer

If the observed frequency distribution is the same as the theoretical distribution, variable A has the observed distribution, variable B has the theoretical distribution. Then, can we say A, B are highly correlated?

No.

Could you give me the example or reliable evidence?

Counterexample: two standard normal variables can be uncorrelated.

If we have $$X \sim \mathcal{N}(0,1)$$ and $$Y \sim \mathcal{N}(0,1)$$, it could be the case that $$\operatorname{Corr}[X,Y]=0$$.

Here, let us sample from such a choice of $$X$$ and $$Y$$ and then compute their correlation. We'll also plot the scatter and the marginal distributions.

import matplotlib.pyplot as plt
import seaborn as sns
import pandas as pd
import numpy as np
from scipy.stats import pearsonr as corr

x = np.random.normal(size=10**6)
y = np.random.normal(size=10**6)

df = pd.DataFrame({'x':x, 'y':y})

sns.jointplot(x='x', y='y', data=df)
plt.show()

print(corr(x,y))


And the correlation with a p-value are (0.00010195353305111276, 0.9187936579718603) respectively. We should not expect the correlation to be exactly zero since this is a sample estimate, but it is very close. Even though I didn't set a fixed seed for the random number generator, you'll get similar numbers.