Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
sblack5695
Frequent Visitor

Hypothesis Testing for Correlation Coefficient

I am looking at the correlation between daily population and daily incidents in a detention center. I created a measure that dynamically shows the correlation coefficient and what kind of relatinship it shows. I want to also do a hypothesis test to calculate the significance using the p value. How can I create a measure to have this dynamically show on my dashboard? This is how to caluclate it by hand:

I don't feel comfortable sharing my screen because I deal with confidential information.

 

Sample Correlation (r)(r) =.09.
Sample Size (n)(n) =7000
Significance Level (\alpha)(α) =.05

Null and Alternative Hypotheses

The following null and alternative hypotheses need to be tested:

 null hypothesis- correlation equals zero

alternative hypothesis- correlation does not equal zero​

where \rhoρ corresponds to the population correlation.

The sample size is n = 7000, so then the number of degrees of freedom is df = n-2 = 7000 - 2 = 6998

The corresponding critical correlation value r_crc for a significance level of α=0.05, for a two-tailed test is:

t===r1r2n20.0910.092700027.56​​

The p-value is computed as follows:

p==Pr(t6998>7.56)<.0001

Since we have that p < .0001, it is concluded that the null hypothesis is rejected.

Therefore, based on the sample correlation provided, it is concluded that there is enough evidence to claim that the population correlation is different than 0, at the α=.05 significance level.

 

2 REPLIES 2
sblack5695
Frequent Visitor

Not yet! I am just learning Power BI as I go, I will look into it.

lbendlin
Super User
Super User

Are you familiar with the concept of "What-If Parameters" ?

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.