Page 1 of 1

quantile function: binomial

Posted: Mon Jan 17, 2022 5:43 am
by ac_1
Hi Tom,

To assess 'if a coin is fair' as in https://stats.stackexchange.com/questio ... imes-is-bi

Is there an equivalent of R's qbinom, quantile function: binomial, in RATS?

thanks,
Amarjit

Re: quantile function: binomial

Posted: Mon Jan 17, 2022 9:36 am
by TomDoan
No. The cumulatives of the binomial are usually quite well approximated (except for small N) by a Poisson for low values of p or a Normal for moderate levels. There is no shortcut for the true binomial probabilities to adding up the individual binomial probabilities.

Re: quantile function: binomial

Posted: Mon Jan 17, 2022 11:36 am
by ac_1
Thanks. My question is:

Is an econometric model forecasting the direction of the market better than if the forecasts would have been generated from a coin toss? 1 being correct direction, 0 incorrect direction.

Via R's qbinom a binomial with n=252 (say), probability p=0.5, and 95% confidence level i.e. alpha = 0,05; below 110 (number of correct directions) the forecasts from the econometric model are worse than if the forecasts would have been generated from a coin toss, and above 142 (number of correct directions) the econometric model forecasts are better than if the forecasts would have been generated from a coin toss.

Assuming the above is an appropriate method/result (if not, is there another technique?), how would I achieve the above in RATS?

Re: quantile function: binomial

Posted: Mon Jan 17, 2022 1:02 pm
by TomDoan
Doesn't the "homework solution" that you posted show that? With N=252, under the null of same accuracy as a coin toss, the mean is 126 and standard deviation is .5 x sqrt(252). That's +/- 15.56 for a 95% confidence band using the Normal approximation. Round that to an integer of 16 and you get 110 and 142.