Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #14780
| From | Ray Koopman <koopman@sfu.ca> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Re: Rookie questions about solving for small numbers |
| Date | 2013-06-09 08:25 +0000 |
| Message-ID | <kp1e65$809$1@smc.vnet.net> (permalink) |
| Organization | Time-Warner Telecom |
Writing s instead of sigma, and letting e denote the probability that is variously specified as 10^-5 or 10^-20, we have Pr[x + f*(x^2 - s^2) > 1] = e, where x is Normal with mean 0 and standard deviation s. Rewrite that as Pr[z + f*s*(z^2 - 1) > 1/s] = e, where z is standard normal. If f = 0 then we have Pr[z > 1/s] = e. Plot log e as a function of log s to identify approximate solutions, then use FindRoot. f = 0, e = 10^-5 gives s -> .234473 f = 0, e = 10^-20 gives s -> .107964 If f > 0 then z + f*s*(z^2 - 1) = 1/s has two real roots, say z1 < z2. The coefficient of z is > 0, so we want Pr[z < z1] + Pr[z > z2]. Again do a log-log plot, then use FindRoot. f = .5, e = 10^-5 gives s -> .173683 f = .5, e = 10^-20 gives s -> .0792307 If -1/4 < f < 0 then the roots are real for all s > 0. The coefficient of z^2 is < 0, so we want Pr[z1 < z < z2]. f = -.125, e = 10^-5 gives s -> .271650 f = -.125, e = 10^-20 gives s -> .126184 If f < -1/4 then the roots are real only for s > sqrt[-1-4f]/(-2f). f = -1/2 requires s > 1. f = -1/2, e = 10^-5, WorkingPrecision->30 gives s -> 1.000000000213493355543893763569933088415336334927`30. f = -1/2, e = 10^-20, WorkingPrecision->60 gives s -> 1.0000000000000000000000000000000000000002134933555514410720359161572336783883`60. In general, s -> smin as e -> 0 with f < -1/4. How much precision do you need? Would an approximation suffice? ----- Samuel Mark Young <sy81@sussex.ac.uk> wrote: > Yes that's correct. The code I've included does this fine for positive values of f, but can't handle negative values very well. I also run into problems when I want to solve for Pr[x + f*(x^2 - sigma^2) > 1] = 10^-20 instead. > > Sam > ________________________________________ > From: Ray Koopman [koopman@sfu.ca] > Sent: 07 June 2013 04:19 > To: mathgroup@smc.vnet.net > Subject: Re: Rookie questions about solving for small numbers > > It's still not clear exactly what you want. Is this it? > > X is a random variable whose distribution is normal with mean 0 > and standard deviation sigma. Given a constant f, solve for sigma > such that Pr[x + f*(x^2 - sigma^2) > 1] = 10^-5.
Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread
Re: Rookie questions about solving for small numbers Ray Koopman <koopman@sfu.ca> - 2013-06-09 08:25 +0000
csiph-web