Ask Your Question
1

How to solve normal distribution equation in Sage

asked 2015-03-16 14:35:02 +0200

mathhobbyist gravatar image

I'm practicing statistics and I'm wondered how one can solve the following problem from Sage:

Find a numerical value of $x$ such that $\frac{1}{\sqrt{2\pi}}\int_{-\infty}^x e^{-t^2/2}dt=0.987654321$. I was thinking to different solutions:

1) Is there an inverse of normal distribution cumulative function?

2) Can we write it as $f'(x)=e^{-x^2/2},f(0)=1/2,f(x_0)=0.987654321$ and use some numerical method to solve the differential equation?

but I don't know are those functions implemented in Sage.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2015-03-16 14:43:45 +0200

calc314 gravatar image

I use the stats package in scipy for this. For example:

import scipy.stats as st
st.norm.ppf(0.6,0,1)

Gives the value $x_0$ so that $P(x\le x_0) = 0.6$ for a normal distribution with mean 0 and variance 1.

See the documentation.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2015-03-16 14:35:02 +0200

Seen: 993 times

Last updated: Mar 16 '15