# find probability of chi2 test

1 view (last 30 days)

Show older comments

Dear all;

if i want to perfrom a hypothesis test for chi2 distrubtion , how can i do it in matlab :

P(X>a)= alpha

##### 5 Comments

Asvin Kumar
on 21 Mar 2021

### Accepted Answer

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

##### 0 Comments

### More Answers (1)

Aditya Patil
on 29 Mar 2021

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)

##### 0 Comments

### See Also

### Categories

### Community Treasure Hunt

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

Start Hunting!