Re: A problem with solving some nonlinear system
- To: mathgroup at smc.vnet.net
- Subject: [mg87319] Re: [mg87283] A problem with solving some nonlinear system
- From: Bob Hanlon <hanlonr at cox.net>
- Date: Mon, 7 Apr 2008 05:19:29 -0400 (EDT)
- Reply-to: hanlonr at cox.net
dist = NormalDistribution[0, 1]; f[x_] = PDF[dist, x] 1/(E^(x^2/2)*Sqrt[2*Pi]) eqns1 = { Integrate[f[z], {z, (c - 75)/10/Sqrt[n], Infinity}] == 0.05, Integrate[f[z], {z, (c - 78)/10/Sqrt[n], Infinity}] == 0.9} {(1/2)*Erfc[(c - 75)/(10*Sqrt[2]*Sqrt[n])] == 0.05, (1/2)*Erfc[(c - 78)/(10*Sqrt[2]*Sqrt[n])] == 0.9} FindRoot[eqns1, {{n, 1}, {c, 75}}] {n->0.0105093,c->76.6862} Off[Solve::ifun]; NSolve[eqns1, {n, c}][[1]] {n->0.0105093,c->76.6862} Alternatively, use CDF directly rather than integrating the PDF eqns2 = {1 - CDF[dist, (c - 75)/10/Sqrt[n]] == 0.05, 1 - CDF[dist, (c - 78)/10/Sqrt[n]] == 0.9} {(1/2)*(-Erf[(c - 75)/(10*Sqrt[2]*Sqrt[n])] - 1) + 1 == 0.05, (1/2)*(-Erf[(c - 78)/(10*Sqrt[2]*Sqrt[n])] - 1) + 1 == 0.9} FindRoot[eqns2, {{n, 1}, {c, 75}}] {n->0.0105093,c->76.6862} NSolve[eqns2, {n, c}][[1]] {n->0.0105093,c->76.6862} Bob Hanlon ---- Walkman <uvnarae at hotmail.com> wrote: > Hi. This is the first posting in this board(in Englsigh?). So, if > there is any punctuation error or misunderstood, please let me know. > > The problem itself is in the book 428p. "Introduction to Mathematical > Statistics 6E" > > In solving this problem, I've got stuck with this practical problem. > > To find n and c such that > > Integrate[f,{z,(c-75)/10/sqrt(n),inf}] = .05 > Integrate[f,{z,(c-78)/10/sqrt(n),inf}] = .9 > > where f = N(0,1); N -> Normal Distribution of which mean = 0 and > variance = 1 > > How can I solve this problem in mathematica? or any math-computational > program? (e.g. R) >