Filter löschen
Filter löschen

How to solve for upper limit of integral?

1 Ansicht (letzte 30 Tage)
AJ
AJ am 23 Feb. 2015
Kommentiert: Steven Lord am 21 Mär. 2023
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)

Akzeptierte Antwort

John D'Errico
John D'Errico am 23 Feb. 2015
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.

Weitere Antworten (2)

AJ
AJ am 23 Feb. 2015
Thanks John!
x = norminv([0.00 0.75],0,1)
returns just the answer I was looking for!

muhammad Fahad
muhammad Fahad am 21 Mär. 2023
write matlab code for this
  1 Kommentar
Steven Lord
Steven Lord am 21 Mär. 2023
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.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Mathematics finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by