NORMALD_ICDF (LEFT/CENTER/RIGHT)
|
02-20-2020, 09:03 PM
(This post was last modified: 02-20-2020 09:04 PM by StephanP.)
Post: #1
|
|||
|
|||
NORMALD_ICDF (LEFT/CENTER/RIGHT)
Of course there are ways to work around this, but my colleagues and I kind'a like this from the otherwise quite backward TI-84 Plus CE-T.
Could the function NORMALD_ICDF() be enhanced with an additional optional argument LEFT/CENTER/RIGHT indicating the position of area p? If not supplied, then option LEFT is assumed standard. NORMALD_ICDF(185,10,.85,RIGHT)=NORMALD_ICDF(185,10,1-0.85)=174.635... NORMALD_ICDF(185,10,.85,CENTER)={170.604...; 199.395...} |
|||
02-21-2020, 04:10 AM
Post: #2
|
|||
|
|||
RE: NORMALD_ICDF (LEFT/CENTER/RIGHT)
(02-20-2020 09:03 PM)StephanP Wrote: Of course there are ways to work around this, but my colleagues and I kind'a like this from the otherwise quite backward TI-84 Plus CE-T. I agree. My stats students with the TI-84 Plus CE really like this feature. It would be a very welcomed addition to the Prime. In fact, besides adding RIGHT to complement LEFT, I would also add OUTSIDE (or maybe TAILS) to complement CENTER. Unfortunately, the TI-84 Plus CE only has this feature for the inverse Normal function. Why not include it in the inverse T, Chi Square, and F distributions as well? |
|||
02-29-2020, 06:18 AM
Post: #3
|
|||
|
|||
RE: NORMALD_ICDF (LEFT/CENTER/RIGHT)
(02-20-2020 09:03 PM)StephanP Wrote: NORMALD_ICDF(185,10,.85,RIGHT)=NORMALD_ICDF(185,10,1-0.85)=174.635... I've been thinking about this suggestion. Using RIGHT or CENTER works well on the TI-84+ CE because there is a dialog box ("Wizard") that makes selecting RIGHT or CENTER very easy. If I had to actually type out "RIGHT" then I think I would resort to using 1-0.85. Since Prime stats functions already allow for an optional number of arguments, what if calling NORMALD_ICDF with no arguments popped up dialog box, say something like: Code: ////////////////////////// When the 84+ introduced the Wizard option for stats functions back in 2011, it make a huge difference in my stats classes. Previously, my students always had difficulty remembering the order of the arguments in the commands. With Stats Wizards, that problem instantly went away. |
|||
02-29-2020, 06:49 AM
(This post was last modified: 02-29-2020 06:50 AM by StephanP.)
Post: #4
|
|||
|
|||
RE: NORMALD_ICDF (LEFT/CENTER/RIGHT)
Yes!
A Wizard like this would be fantastic! As an alternative to the full words LEFT, RIGHT, CENTER, OUTER/TAILS, abbreviations L, R, C, O/T would keep the command line version compact as well. Would the development team be tempted to take up this suggestion, pretty please? |
|||
02-29-2020, 08:29 AM
(This post was last modified: 02-29-2020 08:30 AM by StephanP.)
Post: #5
|
|||
|
|||
RE: NORMALD_ICDF (LEFT/CENTER/RIGHT)
@Wes
On my desktop PC, the emulator (version 20200116) executes the code perfectly. Really nice. Thank you. On my laptop, as well as the device connected to it, the same code does not run. Upon checking, I get a syntax error at line 6, position 12 (at "sigma=1") As if the word sigma following the comma isn't right. I've tried switching the language of the device/emulatorconnectivity kit between English and Dutch, suspecting a confusion between decimal point vs. decimal comma. But this did not help. It's quite odd as both emulators are at the same version 20200116. My G2 device is at version 20200120. |
|||
02-29-2020, 08:46 AM
(This post was last modified: 02-29-2020 09:03 AM by StephanP.)
Post: #6
|
|||
|
|||
RE: NORMALD_ICDF (LEFT/CENTER/RIGHT)
Further to this syntax error.
I decided to edit the code on my HP Prime device. There I noticed that if I press a "," a ";" is written. Also if i press a "." a "," is written. So it IS a confusion of delimiters. Once I replaced all comma's for semicolons in line 6, the check proceeded to the line with {mu, [0]... Hmm, it would seem that all comma's need replacing with semicolons. Yes, after replacing all code related comma's with semicolons, the program runs just fine. I wonder where this confusion between delimiter comma/semicolon and decimal point/comma is coming from. |
|||
02-29-2020, 10:11 AM
(This post was last modified: 02-29-2020 10:16 AM by Wes Loewer.)
Post: #7
|
|||
|
|||
RE: NORMALD_ICDF (LEFT/CENTER/RIGHT)
(02-29-2020 08:46 AM)StephanP Wrote: Hmm, it would seem that all comma's need replacing with semicolons. Sorry, that's my fault. I forgot to put in the #pragma line which was created for this very purpose of exchanging programs on an international forum. Please insert the following line as the first line of the code and then it should run fine everywhere. (The program was written with US mode settings.) Code: #pragma mode( separator(.,;) integer(h64) ) |
|||
03-01-2020, 08:08 AM
Post: #8
|
|||
|
|||
RE: NORMALD_ICDF (LEFT/CENTER/RIGHT)
Would that fit:
Code:
Code:
|
|||
03-01-2020, 08:35 AM
Post: #9
|
|||
|
|||
RE: NORMALD_ICDF (LEFT/CENTER/RIGHT)
I think that would do very well, indeed.
Are you a member of the development team? One minor discussion topic: in his code Wes opted for the terms inner/outer as opposed to the center/tail I suggested. 1. if we choose "center" then I think its counterpart should be the plural form "tails" 2. inner/outer are fine with me as well I leave the decision to those more knowledgeable. Would the other inverse distribution functions (T, Chi Square, F) be enhanced in a similar way? What do you think of Wes' suggestion to open a Wizard if this function is called without parameters? |
|||
03-01-2020, 02:00 PM
Post: #10
|
|||
|
|||
RE: NORMALD_ICDF (LEFT/CENTER/RIGHT)
There is no tails command, while tail already exists, that's why I'm using tail as optional argument.
|
|||
03-02-2020, 03:21 AM
Post: #11
|
|||
|
|||
RE: NORMALD_ICDF (LEFT/CENTER/RIGHT)
(03-01-2020 08:35 AM)StephanP Wrote: Are you a member of the development team? <Groan> Bernard IS the developer. https://en.wikipedia.org/wiki/Xcas#History Ceci n'est pas une signature. |
|||
03-02-2020, 04:39 AM
Post: #12
|
|||
|
|||
RE: NORMALD_ICDF (LEFT/CENTER/RIGHT)
(03-01-2020 08:35 AM)StephanP Wrote: One minor discussion topic: in his code Wes opted for the terms inner/outer as opposed to the center/tail I suggested. The only reason I used the word "inner" instead of "center" is that I wanted to do the same thing with the other distributions (t, chi square, F) and since chi square and F are not symmetric, calling the interval "center" didn't seem quite right. And if I went with "inner" it seemed only natural to call the opposite "outer". I just made those up. If there is something more standard in textbooks, then I would go with that. Using "tail" rather than "tails" does seem a bit ambiguous. It could mean "right tail", "left tail", or "two tail". |
|||
03-02-2020, 08:31 AM
Post: #13
|
|||
|
|||
RE: NORMALD_ICDF (LEFT/CENTER/RIGHT)
I (and probably HP too) do not want to add new keywords for something that seems very specialized. If you can find existing keywords that fit better than center or tail, I can change to these keywords. I don't think it's really important, because either HP adds an UI, then the user will not have to worry about, or they don't support this enhancement and only a few experts will know about that...
|
|||
03-02-2020, 09:38 AM
Post: #14
|
|||
|
|||
RE: NORMALD_ICDF (LEFT/CENTER/RIGHT)
I agree that left/right/center/tail are obvious parameters for normald_icdf()
I checked the TI-84 Plus CE-T (OS version 5.4.0.0034) - only invNorm() offers the additional tail positioning parameter: left/right/center (no tail/outer) - The other inverse function invT() does not provide this additional positioning parameter. Maybe we should leave it at normald_icdf() as well. If you further proceed on this little enhancement, might I ask that abbreviations of these parameters (L/R/C/T) be also allowed, so as to ease entering these values via the command line. Also, Wes' idea of a Wizard similar to that of the TI-84 does offer students a more fail safe way of entering all parameters in a correct manner. |
|||
03-02-2020, 01:16 PM
Post: #15
|
|||
|
|||
RE: NORMALD_ICDF (LEFT/CENTER/RIGHT)
I don't like the idea to use R/L/C/T, because these are Prime variables and they would be eval-ed unless I make normal_icdf a quoted function and eval by hand all other arguments, but that's too much work...
|
|||
03-02-2020, 02:48 PM
Post: #16
|
|||
|
|||
RE: NORMALD_ICDF (LEFT/CENTER/RIGHT) | |||
03-02-2020, 03:25 PM
Post: #17
|
|||
|
|||
RE: NORMALD_ICDF (LEFT/CENTER/RIGHT)
(03-02-2020 09:38 AM)StephanP Wrote: I checked the TI-84 Plus CE-T (OS version 5.4.0.0034) Yeah, I think TI dropped the ball on this one. Why limit such a useful feature to only one of the distributions? (And why did they leave out inverse chi square and inverse F altogether, even on their CE models?) |
|||
03-03-2020, 06:04 AM
Post: #18
|
|||
|
|||
RE: NORMALD_ICDF (LEFT/CENTER/RIGHT)
(03-02-2020 02:48 PM)StephanP Wrote: Would you be warming to the idea of popping up a Wizard if the function is called without any parameters? Well, this is against the philosophy of separating the GUI and the computing kernel, and it would require coding a GUI for each port of Giac. I think that's the job of HP to add a GUI in one of its app. |
|||
03-03-2020, 06:17 PM
Post: #19
|
|||
|
|||
RE: NORMALD_ICDF (LEFT/CENTER/RIGHT)
(03-03-2020 06:04 AM)parisse Wrote: Well, this is against the philosophy of separating the GUI and the computing kernel, and it would require coding a GUI for each port of Giac. I think that's the job of HP to add a GUI in one of its app. StephanP, In case you're wondering, Parisse is the brains behind the CAS that HP uses for Prime. I think the rest of the Prime mostly comes HP. I hope HP does put in an easy to use GUI for the probability distributions. If they do, I'm sure it will look much more professional than mine, but in the mean time, feel free to use the following. I've added the rest of the continuous distributions and put in easy to edit strings so that you can put in whatever descriptions you prefer. (I want to eventually do the same for the discrete distributions, but right now in my stats class, I'm covering topics related to continuous distributions, so that's what's on my mind.) (corrections welcomed) Code:
|
|||
03-03-2020, 07:29 PM
(This post was last modified: 03-03-2020 07:30 PM by StephanP.)
Post: #20
|
|||
|
|||
RE: NORMALD_ICDF (LEFT/CENTER/RIGHT)
Yeah parisse, I looked him up after I got the groan.
Nice piece of work you've produced here. I'll give it a test run tomorrow. Thanks very much. Unfortunately this won't be available in test mode, so any enhancement in the standard functions/apps will be much appreciated. We'll wait and see. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)