How to solve for upper limit of integral?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
AJ
el 23 de Feb. de 2015
Comentada: Steven Lord
el 21 de Mzo. de 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)
0 comentarios
Respuesta aceptada
John D'Errico
el 23 de Feb. de 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.
0 comentarios
Más respuestas (2)
muhammad Fahad
el 21 de Mzo. de 2023
write matlab code for this
1 comentario
Steven Lord
el 21 de Mzo. de 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.
Ver también
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!