## quantile function: binomial

Econometrics questions and discussions

### quantile function: binomial

Hi Tom,

To assess 'if a coin is fair' as in https://stats.stackexchange.com/questions/21581/how-to-assess-whether-a-coin-tossed-900-times-and-comes-up-heads-490-times-is-bi

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

thanks,
Amarjit
ac_1

Posts: 201
Joined: Thu Apr 15, 2010 6:30 am
Location: London, UK

### Re: quantile function: binomial

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.
TomDoan

Posts: 7240
Joined: Wed Nov 01, 2006 5:36 pm

### Re: quantile function: binomial

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?
ac_1

Posts: 201
Joined: Thu Apr 15, 2010 6:30 am
Location: London, UK

### Re: quantile function: binomial

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.
TomDoan

Posts: 7240
Joined: Wed Nov 01, 2006 5:36 pm