psychopy_ext.stats.p_corr

psychopy_ext.stats.p_corr(df1, df2=None)[source]

Computes Pearson correlation and its significance (using a t distribution) on a pandas.DataFrame.

Ignores null values when computing significance. Based on this Wikipedia entry

Args:
df1: pandas.DataFrame

one dataset

df2: pandas.DataFrame

another dataset

Returns:
corr: float

correlation between the two datasets

t: float

an associated t-value

p: float

one-tailed p-value that the two datasets differ