Changeset 20602 in project


Ignore:
Timestamp:
10/03/10 12:35:15 (9 years ago)
Author:
svnwiki
Message:

Anonymous wiki edit for IP [86.141.186.14]:

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wiki/eggref/4/statistics

    r20601 r20602  
    161161returns the probability {{k}} or fewer positive outcomes for a binomial distribution B(n, p).
    162162
    163 *    poisson-probability
    164 *    poisson-cumulative-probability
    165 *    poisson-ge-probability
    166 *    normal-pdf
    167 *    convert-to-standard-normal
    168 *    phi
     163<probability>(poisson-probability mu k)</probability>
     164returns the probability of {{k}} events occurring when the average is {{mu}}.
     165 > (do-ec (: i 0 20)
     166          (format #t "P(X=~2d) = ~,4f~&" i (poisson-probability 10 i)))
     167 P(X= 0) = 0.0000
     168 P(X= 1) = 0.0005
     169 P(X= 2) = 0.0023
     170 P(X= 3) = 0.0076
     171 P(X= 4) = 0.0189
     172 P(X= 5) = 0.0378
     173 P(X= 6) = 0.0631
     174 P(X= 7) = 0.0901
     175 P(X= 8) = 0.1126
     176 P(X= 9) = 0.1251
     177 P(X=10) = 0.1251
     178 P(X=11) = 0.1137
     179 P(X=12) = 0.0948
     180 P(X=13) = 0.0729
     181 P(X=14) = 0.0521
     182 P(X=15) = 0.0347
     183 P(X=16) = 0.0217
     184 P(X=17) = 0.0128
     185 P(X=18) = 0.0071
     186 P(X=19) = 0.0037
     187
     188<procedure>(poisson-cumulative-probability mu k)</procedure>
     189returns the probability of less than {{k}} events occurring when the average is {{mu}}.
     190 > (do-ec (: i 0 20)
     191          (format #t "P(X=~2d) = ~,4f~&" i (poisson-cumulative-probability 10 i)))
     192 P(X= 0) = 0.0000
     193 P(X= 1) = 0.0000
     194 P(X= 2) = 0.0005
     195 P(X= 3) = 0.0028
     196 P(X= 4) = 0.0103
     197 P(X= 5) = 0.0293
     198 P(X= 6) = 0.0671
     199 P(X= 7) = 0.1301
     200 P(X= 8) = 0.2202
     201 P(X= 9) = 0.3328
     202 P(X=10) = 0.4579
     203 P(X=11) = 0.5830
     204 P(X=12) = 0.6968
     205 P(X=13) = 0.7916
     206 P(X=14) = 0.8645
     207 P(X=15) = 0.9165
     208 P(X=16) = 0.9513
     209 P(X=17) = 0.9730
     210 P(X=18) = 0.9857
     211 P(X=19) = 0.9928
     212
     213<procedure>(poisson-ge-probability mu k)</procedure>
     214returns the probability of {{k}} or more events occurring when the average is {{mu}}.
     215
     216<procedure>(normal-pdf x mean variance)</procedure>
     217returns the likelihood of {{x}} given a normal distribution with stated mean and variance.
     218 > (do-ec (: i 0 11)
     219          (format #t "~3d ~,4f~&" i (normal-pdf i 5 4)))
     220  0 0.0088
     221  1 0.0270
     222  2 0.0648
     223  3 0.1210
     224  4 0.1760
     225  5 0.1995
     226  6 0.1760
     227  7 0.1210
     228  8 0.0648
     229  9 0.0270
     230 10 0.0088
     231
     232<procedure>(convert-to-standard-normal x mean variance)</procedure>
     233returns a value for {{x}} rescaling the given normal distribution to a standard N(0, 1).
     234 > (convert-to-standard-normal 5 6 2)
     235 -1/2
     236
     237<procedure>(phi x)</procedure>
     238returns the cumulative distribution function (CDF) of the standard normal distribution.
     239 > (do-ec (: x -2 2 0.4)
     240         (format #t "~4,1f ~,4f~&" x (phi x)))
     241 -2.0 0.0228
     242 -1.6 0.0548
     243 -1.2 0.1151
     244 -0.8 0.2119
     245 -0.4 0.3446
     246  0.0 0.5000
     247  0.4 0.6554
     248  0.8 0.7881
     249  1.2 0.8849
     250  1.6 0.9452
     251
    169252*    z
    170253*    t-distribution
     
    173256
    174257===  Confidence intervals
     258
     259These functions report bounds for an observed property of a distribution: the bounds are tighter as the confidence level, alpha, varies from 0.0 to 1.0.
    175260
    176261<procedure>(binomial-probability-ci n p alpha)</procedure>
     
    181266 ; 2 values
    182267
    183 *    poisson-mu-ci
    184 *    normal-mean-ci
    185 *    normal-mean-ci-on-sequence
    186 *    normal-variance-ci
    187 *    normal-variance-ci-on-sequence
    188 *    normal-sd-ci
    189 *    normal-sd-ci-on-sequence
     268<procedure>(poisson-mu-ci k alpha)</procedure>
     269returns two values, the upper and lower bounds on the poisson parameter if {{k}} events are observed; the bound is for confidence {{(1-alpha)}}.
     270 > (poisson-mu-ci 10 0.9)
     271 8.305419921875
     272 10.0635986328125
     273 ; 2 values
     274
     275<procedure>(normal-mean-ci mean standard-deviation k alpha)</procedure>
     276returns two values, the upper and lower bounds on the mean of the normal distibution of {{k}} events are observed; the bound is for confidence {{(1-alpha)}}.
     277 > (normal-mean-ci 0.5 0.1 10 0.8)
     278 0.472063716520217
     279 0.527936283479783
     280 ; 2 values
     281
     282<procedure>(normal-mean-ci-on-sequence items alpha)</procedure>
     283returns two values, the upper and lower bounds on the mean of the given {{items}}, assuming they are normally distributed; the bound is for confidence {{(1-alpha)}}.
     284 > (normal-mean-ci-on-sequence '(1 2 3 4 5) 0.9)
     285 2.40860081649174
     286 3.59139918350826
     287 ; 2 values
     288
     289<procedure>(normal-variance-ci standard-deviation k alpha)</procedure>
     290returns two values, the upper and lower bounds on the variance of the normal distibution of {{k}} events are observed; the bound is for confidence {{(1-alpha)}}.
     291
     292<procedure>(normal-variance-ci-on-sequence items alpha)</procedure>
     293returns two values, the upper and lower bounds on the variance of the given {{items}}, assuming they are normally distributed; the bound is for confidence {{(1-alpha)}}.
     294
     295<procedure>normal-sd-ci standard-deviation k alpha)</procedure>
     296returns two values, the upper and lower bounds on the standard deviation of the normal distibution of {{k}} events are observed; the bound is for confidence {{(1-alpha)}}.
     297
     298<procedure>(normal-sd-ci-on-sequence sequence items)</procedure>
     299returns two values, the upper and lower bounds on the standard deviation of the given {{items}}, assuming they are normally distributed; the bound is for confidence {{(1-alpha)}}.
    190300
    191301=== Hypothesis testing
Note: See TracChangeset for help on using the changeset viewer.