find probability of chi2 test

1 view (last 30 days)
Mustafa Al-Nasser
Mustafa Al-Nasser on 16 Mar 2021
Answered: Aditya Patil on 29 Mar 2021
Dear all;
if i want to perfrom a hypothesis test for chi2 distrubtion , how can i do it in matlab :
P(X>a)= alpha
Asvin Kumar
Asvin Kumar on 21 Mar 2021
Thanks for explaining. I'm, unfortunately, not the right person for this question. I was merely suggesting a function I had come across in the docs. I'll let someone else from the community help you with this.

Sign in to comment.

Accepted Answer

Ive J
Ive J on 21 Mar 2021
Based on what you explained it seems you already have the X2 stat.
p = 1 - chi2cdf(x, nu) % where x is chi2 stat and nu is df

More Answers (1)

Aditya Patil
Aditya Patil on 29 Mar 2021
To elaborate on @Ive J's answer,
You have X. using chi2cdf, you can get . So in your case, , which you can get using chi2cdf as follows
p = 1 - chi2cdf(X, a)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!