Changeset 20602 in project
 Timestamp:
 10/03/10 12:35:15 (10 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

wiki/eggref/4/statistics
r20601 r20602 161 161 returns the probability {{k}} or fewer positive outcomes for a binomial distribution B(n, p). 162 162 163 * poissonprobability 164 * poissoncumulativeprobability 165 * poissongeprobability 166 * normalpdf 167 * converttostandardnormal 168 * phi 163 <probability>(poissonprobability mu k)</probability> 164 returns the probability of {{k}} events occurring when the average is {{mu}}. 165 > (doec (: i 0 20) 166 (format #t "P(X=~2d) = ~,4f~&" i (poissonprobability 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>(poissoncumulativeprobability mu k)</procedure> 189 returns the probability of less than {{k}} events occurring when the average is {{mu}}. 190 > (doec (: i 0 20) 191 (format #t "P(X=~2d) = ~,4f~&" i (poissoncumulativeprobability 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>(poissongeprobability mu k)</procedure> 214 returns the probability of {{k}} or more events occurring when the average is {{mu}}. 215 216 <procedure>(normalpdf x mean variance)</procedure> 217 returns the likelihood of {{x}} given a normal distribution with stated mean and variance. 218 > (doec (: i 0 11) 219 (format #t "~3d ~,4f~&" i (normalpdf 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>(converttostandardnormal x mean variance)</procedure> 233 returns a value for {{x}} rescaling the given normal distribution to a standard N(0, 1). 234 > (converttostandardnormal 5 6 2) 235 1/2 236 237 <procedure>(phi x)</procedure> 238 returns the cumulative distribution function (CDF) of the standard normal distribution. 239 > (doec (: 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 169 252 * z 170 253 * tdistribution … … 173 256 174 257 === Confidence intervals 258 259 These 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. 175 260 176 261 <procedure>(binomialprobabilityci n p alpha)</procedure> … … 181 266 ; 2 values 182 267 183 * poissonmuci 184 * normalmeanci 185 * normalmeancionsequence 186 * normalvarianceci 187 * normalvariancecionsequence 188 * normalsdci 189 * normalsdcionsequence 268 <procedure>(poissonmuci k alpha)</procedure> 269 returns two values, the upper and lower bounds on the poisson parameter if {{k}} events are observed; the bound is for confidence {{(1alpha)}}. 270 > (poissonmuci 10 0.9) 271 8.305419921875 272 10.0635986328125 273 ; 2 values 274 275 <procedure>(normalmeanci mean standarddeviation k alpha)</procedure> 276 returns two values, the upper and lower bounds on the mean of the normal distibution of {{k}} events are observed; the bound is for confidence {{(1alpha)}}. 277 > (normalmeanci 0.5 0.1 10 0.8) 278 0.472063716520217 279 0.527936283479783 280 ; 2 values 281 282 <procedure>(normalmeancionsequence items alpha)</procedure> 283 returns two values, the upper and lower bounds on the mean of the given {{items}}, assuming they are normally distributed; the bound is for confidence {{(1alpha)}}. 284 > (normalmeancionsequence '(1 2 3 4 5) 0.9) 285 2.40860081649174 286 3.59139918350826 287 ; 2 values 288 289 <procedure>(normalvarianceci standarddeviation k alpha)</procedure> 290 returns two values, the upper and lower bounds on the variance of the normal distibution of {{k}} events are observed; the bound is for confidence {{(1alpha)}}. 291 292 <procedure>(normalvariancecionsequence items alpha)</procedure> 293 returns two values, the upper and lower bounds on the variance of the given {{items}}, assuming they are normally distributed; the bound is for confidence {{(1alpha)}}. 294 295 <procedure>normalsdci standarddeviation k alpha)</procedure> 296 returns 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 {{(1alpha)}}. 297 298 <procedure>(normalsdcionsequence sequence items)</procedure> 299 returns 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 {{(1alpha)}}. 190 300 191 301 === Hypothesis testing
Note: See TracChangeset
for help on using the changeset viewer.