Problem solving for a variable in Prime - Printable Version +- HP Forums (https://www.hpmuseum.org/forum) +-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html) +--- Forum: HP Prime (/forum-5.html) +--- Thread: Problem solving for a variable in Prime (/thread-2716.html) |
Problem solving for a variable in Prime - factor - 12-28-2014 06:09 AM Is is possible for Prime to solve for s in the equation attached, which is a cumulative distribution function? There is a strange message like "Unable to check if antiderivative -1...(some strange characters embedded in a equation with erf() and taylor()..) has singlular points for definite integration in [40..]. The answer returned is [[]]. Thanks in advance. [attachment=1359] RE: Problem solving for a variable in Prime - akmon - 12-28-2014 10:42 AM Try fsolve instead. Solution is 1,5606. RE: Problem solving for a variable in Prime - factor - 12-28-2014 10:47 AM (12-28-2014 10:42 AM)akmon Wrote: Try fsolve instead. Solution is 1,5606. Thank you, i tried but couldn't get the correct answer (still [[]]). I am on emulator by the way. RE: Problem solving for a variable in Prime - akmon - 12-28-2014 10:53 AM I've complex, use i and increasing disabled in cas settings. The rest is enabled. All in rad mode. RE: Problem solving for a variable in Prime - factor - 12-28-2014 11:04 AM (12-28-2014 10:53 AM)akmon Wrote: I've complex, use i and increasing disabled in cas settings. The rest is enabled. All in rad mode. Thank you! It worked! RE: Problem solving for a variable in Prime - Helge Gabert - 12-28-2014 07:12 PM t (the integration variable) is defined as equal to 40? That seems non-sensical to me. RE: Problem solving for a variable in Prime - akmon - 12-28-2014 08:33 PM (12-28-2014 06:18 PM)compsystems Wrote: failed to reproduce the input, please complete Press space key between dt and = RE: Problem solving for a variable in Prime - Snorre - 12-28-2014 10:48 PM Hello compsystems, Your expression Quote:solve( ∫( (1/(√(2*π)*s))*e^(-(t-u)^2/(2*s^2)),t, t,∞), t=0.1 )looks odd because you're using the same name "t" for two different variables. You should rename one of them (either the red or blue), e.g. to τ (tau). (1) t within the integrand refers to the integration variable t. (2) t to be solved refers to the integration lower limit t. (3) t and t are two distinct variables (each having their own context/scope/lifetime). So you are trying to find a lower integration limit t (somewhere near 0.1) so that the integral becomes zero (the to-solve-equation is implicitly set to =0), which would only hold if both limits are equal (since your integrand has everywhere the same sign). But your expression differs from that of factor. Look at his screenshots: Quote:solve( ∫( (1/(√(2*π)*s))*e^(-(t-u)^2/(2*s^2))=0.1, t, t, ∞), s )Here we have two distinct t again. Now we're searching for s so that the integral becomes 0.1. Since the lower limit t is a free variable the result depends on whatever t is set to. Hello factor, I do not know the original problem, but I think the lower limit should not be t but something like either 0 or -∞. (On your calc you seem to have set t to 40, which becomes the lower integration limit). Maybe you're not searching for an s but for t as compsystems suggested (if so, don't name your integration variable also t since it's not forbidden but a bit confusing). Furthermore I doubt the Prime is able to solve that integral. You should paraphrase it in terms of "erf"/"erfc"/"NORMALD_CDF"/"NORMALD_ICDF" functions and set your lower integration limit and u to concrete values before solving numerically. RE: Problem solving for a variable in Prime - factor - 12-29-2014 01:54 PM (12-28-2014 10:48 PM)Snorre Wrote: Hello factor, Thanks for the explanation. I should have explained more on the original question which is from an article I can't seem to find the link now, and the settings go like this: a math teacher was asking a question to his students in which the students are expected to find the std deviation, s, using the equation z=(t-u)/s, where t is a sample value (of something like height or what, i forgot), and u is the mean. It is also given that z = 0.1 which put the sample in the 10% top. So it is like given that A's height is 40, the mean is 38, and A is within 10% top of the height... the students are expected to do the math to find s. However, some students unexpectedly devised other creative methods to the problem, and one being using the (other brand calculator's) CAS capability to directly solve the equation (thus from 40 to infinity). As far as I remember, that equation as typed by that student, although seems very legitimate, didn't give any result other than an error from the (other brand calculator). It turns out some "hints" are required for that equation to work. I have that equation in my calc and wondered if the Prime will solve it faster. And it is faster, compared to the equivalent PC software of that (other brand calculator). RE: Problem solving for a variable in Prime - Snorre - 12-29-2014 03:34 PM Hello factor, OK, then your solve-expression and setting t=40 is totally valid. Since there doesn't exist a closed form solution to that integral (I think that's the reason we have the approximate erf and CDF functions for), you should take a closer look at NORMALD_CDF (which gives the integration over the left side). But to be sure consult the on-device-help. Your desired solution may look like: solve(1-normald_cdf(u,s,t)=0.1,s). |