How can I solve an integral problem included of cumulative distribution function of chi-square distribution?

4 views (last 30 days)
Louis Liu
Louis Liu on 17 Aug 2017
Edited: Louis Liu on 29 Aug 2017
Excuse me, does anyone know how to solve an integral problem included of cumulative distribution function of chi-square distribution? For example, there is a question like the attached picture:
I want to use the int() function to solve it, however, there are two probability distribution in it, and i don't know how to deal with it.
I hope you can tell me how to solve it like using which function or method instead of giving me the correct answer. Thanks! c = 1.00, n = 100, c = 1.15, Cp = 1.12
  2 Comments
Louis Liu
Louis Liu on 18 Aug 2017
Hello Torsten, Actually I also find the function chi2cdf, however, when I want to use it like the attached photo,
it couldn't work. I look back the example of documentation of chi2cdf, it seems like I couldn't use eq1 variable as x in the example and then to solve the integral. Can you give me more instructions? Thanks!
@Torsten

Sign in to comment.

Accepted Answer

Torsten
Torsten on 18 Aug 2017
fun=@(y)chi2cdf((n-1)*(3*Cp*sqrt(n)-y).^2/(9*n*cstar^2),n-1).*(normpdf(y+3*(Cp-C)*sqrt(n))+normpdf(y-3*(Cp-C)*sqrt(n)));
result=integral(fun,0,3*Cp*sqrt(n));
Of course, all the constants have to be given numerical values before calling "integral".
Don't use "syms" anywhere.
Best wishes
Torsten.
  6 Comments

Sign in to comment.

More Answers (0)

Tags

Community Treasure Hunt

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

Start Hunting!