numworks / epsilon

Modern graphing calculator operating system.
https://www.numworks.com/resources/engineering/software/
1.72k stars 460 forks source link

Inconsistent behaviour with inverse binomial distribution. #2160

Open jrkimber opened 6 months ago

jrkimber commented 6 months ago

When finding inverse binomial values (inputting the probability to get the value of x), the behaivour is inconsistent between the upper and lower tails.

When computing a value of x for the lower tail, the calculator consistently returns the next largest probability, like in the examples below.

Entering 0.05 for the probability, as below, screenshot (42) returns the following: screenshot (43)

Consistent with this, entering 0.7 as below, screenshot (44) returns the following: screenshot (45)

However, when using the upper tail, the calculator returns the closest probability whether that's larger or smaller.

Entering a probability of 0.05, as below, screenshot (46) returns the nearest value (which in this case is also the next one above) screenshot (47)

Entering 0.07, as below, screenshot (48) returns the closest probability which, in this case, is smaller than 0.7. screenshot (49)

This is confusing for students as the behaviour is different for the upper and lower tail with no real reason for it being so. It would be preferable, the teachers in my department think, if it were to always return the closest probability for each tail.

Thanks, James

fbeleznay commented 6 months ago

Consistency would indeed be good, but I would like to add a comment from the point of view of an IB teacher. In computing the type I error for a hypothesis test involving binomial distribution, we need the probability that is smaller (or maybe equal to) the given significance level. If a change is made here, I would like to suggest to return the probability smaller than the entered probability (so not the closest one suggested by James). This would directly give the type I error to students. Finding type I error related to binomial distribution is part of the IB AIHL syllabus, and also the A-level syllabus (but as far as I now, AP statistics only deals with type I errors related to continuous distributions). This is not really important, students can figure out what they need from any close enough value they get. Probably there are also arguments for giving the closest value (as James suggested) or the larger one (as the Casio CG50 does it, see: https://www.youtube.com/watch?v=ggS5ZrD3rHo ).

jrkimber commented 6 months ago

Giving the next smallest probability would also be a good option. I teach A-Level maths and this is often what is required for binomial hypothesis testing. Not always, though, some questions say "the probability of rejection in each tail should be as close as possible to 0.025." requiring the closest value.

We had a discussion in my department about what the best behaviour would be and agreed that it would be desirable to give the closest value rather than the next one down. Our reasoning was that it is easy to see that a value is too large and take the next one down but spotting which value is closest is less obvious.

Either way, the lack of consistency is the main problem. Whatever it does, it should do the same in both tails.

Thanks, James