Thanks, John.  I'll give this a try.

On 1/16/07, John Randall <[EMAIL PROTECTED]> wrote:

Devon McCormick wrote:
> What I'd like to do is to construct an equivalent 5-element
> distribution
> with the same mean and standard deviation but (more or less) normally
> distributed.

How about fitting a binomial distribution to the data?  If a frequency
table on i.(n+1) has mean m, the binomial distribution with
generating function (q+px)^n has the same mean if np=m.

mf =:(+/ .* [EMAIL PROTECTED]) % +/       NB. mean of frequency table
n  =:<:@#                    NB. binomial n from frequency table
p  =:mf % <:@#               NB. binomial p from frequency table
b  =:[: p. (p^n);(n # [EMAIL PROTECTED]) NB. binomial dist from freqency table

   d  =:0 0.13333333 0.4 0.46666667 0 NB. data
   b d  NB. binomial with same mean
0.0301408 0.168789 0.354456 0.330826 0.115789
   mf d
2.33333
   mf b d
2.33333

Best wishes,

John





----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm




--
Devon McCormick
^me^ at acm.
org is my
preferred e-mail
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to