필터 지우기
필터 지우기

How to solve for upper limit of integral?

조회 수: 1 (최근 30일)
AJ
AJ 2015년 2월 23일
댓글: Steven Lord 2023년 3월 21일
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)

채택된 답변

John D'Errico
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.

추가 답변 (2개)

AJ
AJ 2015년 2월 23일
Thanks John!
x = norminv([0.00 0.75],0,1)
returns just the answer I was looking for!

muhammad Fahad
muhammad Fahad 2023년 3월 21일
write matlab code for this
  댓글 수: 1
Steven Lord
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.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Mathematics에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by