How to solve for upper limit of integral?
2 ビュー (過去 30 日間)
古いコメントを表示
I am supposed to find the 75th percentile under a distribution. I have the function F defined below. I tried typing in values between 0 and 1 (n) to find the 75th percentile (when g=.75) and I came upon .6745 for n. This is a very unscientific way to solve it. Maybe my calculus skills are poor but can someone tell me how to solve for n mathematically?
Basically I have to solve the integral of (1/sqrt(2*pi))*exp((-x^2)/2) = .75, from -infinity to "n" Lower limit is infinity - how do I solve upper limit "n"? Again it may be really easy and I may be spacing out on my basic calculus and Matlab skills.
syms x
f=(1/sqrt(2*pi))*exp((-x^2)/2)
y=int(f,x,-inf,.6745)
g=double(y)
0 件のコメント
採用された回答
John D'Errico
2015 年 2 月 23 日
The really quick quick answer is norminv, if you have the stats toolbox. The slightly longer answer is erfcinv, which just requires you to transform the problem slightly.
0 件のコメント
その他の回答 (2 件)
muhammad Fahad
2023 年 3 月 21 日
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1331705/image.png)
1 件のコメント
Steven Lord
2023 年 3 月 21 日
This sounds like a homework assignment. If it is, show us the code you've written to try to solve the problem and ask a specific question about where you're having difficulty and we may be able to provide some guidance.
If you aren't sure where to start because you're not familiar with how to write MATLAB code, I suggest you start with the free MATLAB Onramp tutorial to quickly learn the essentials of MATLAB.
If you aren't sure where to start because you're not familiar with the mathematics you'll need to solve the problem, I recommend asking your professor and/or teaching assistant for help.
参考
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!