home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 15 / BBS in a box XV-1.iso / Files / Educ / Calc / MathPad 2.35.sit / Examples / Poisson < prev    next >
MacBinary  |  1995-04-29  |  1.5 KB  |  [TEXT/MPad]

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text

This file was processed as: MacBinary (archive/macBinary).

You can browse this item here: Poisson

ConfidenceProgramDetectionMatch TypeSupport
10% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, inited, Sat Apr 29 13:17:05 1995, modified Sat Apr 29 13:17:05 1995, creator 'MPad', type ASCII, 782 bytes "Poisson" , at 0x38e 484 bytes resource default (weak)
99% file data default
74% TrID Macintosh plain text (MacBinary) default
25% TrID MacBinary 2 default (weak)
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[MPad]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 07 50 6f 69 73 73 6f | 6e 00 00 00 00 00 00 00 |..Poisso|n.......|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4d 50 61 | 64 01 00 00 00 00 00 00 |.TEXTMPa|d.......|
|00000050| 00 00 00 00 00 03 0e 00 | 00 01 e4 ab c8 25 11 ab |........|.....%..|
|00000060| c8 25 11 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |.%......|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 45 78 00 00 |........|....Ex..|
|00000080| 2d 2d 20 47 65 6e 65 72 | 61 74 65 20 50 6f 69 73 |-- Gener|ate Pois|
|00000090| 73 6f 6e 20 72 61 6e 64 | 6f 6d 20 69 6e 74 65 72 |son rand|om inter|
|000000a0| 2d 65 76 65 6e 74 20 74 | 69 6d 65 73 2e 0d 2d 2d |-event t|imes..--|
|000000b0| 20 53 69 6e 63 65 20 74 | 68 65 20 50 6f 69 73 73 | Since t|he Poiss|
|000000c0| 6f 6e 20 64 69 73 74 72 | 69 62 75 74 69 6f 6e 20 |on distr|ibution |
|000000d0| 69 73 20 61 20 73 69 6d | 70 6c 65 20 65 78 70 6f |is a sim|ple expo|
|000000e0| 6e 65 6e 74 69 61 6c 2c | 20 74 68 65 20 69 6e 76 |nential,| the inv|
|000000f0| 65 72 73 65 20 6f 66 20 | 69 74 73 20 69 6e 74 65 |erse of |its inte|
|00000100| 67 72 61 6c 20 63 61 6e | 20 62 65 20 75 73 65 64 |gral can| be used|
|00000110| 20 74 6f 20 74 72 61 6e | 73 66 6f 72 6d 20 74 68 | to tran|sform th|
|00000120| 65 20 75 6e 69 66 6f 72 | 6d 20 72 61 6e 64 6f 6d |e unifor|m random|
|00000130| 20 64 69 73 74 72 69 62 | 75 74 69 6f 6e 2e 0d 0d | distrib|ution...|
|00000140| 70 6f 69 73 73 6f 6e 72 | 61 6e 64 28 61 76 65 70 |poissonr|and(avep|
|00000150| 65 72 29 20 3d 20 2d 6c | 6e 28 72 61 6e 64 28 31 |er) = -l|n(rand(1|
|00000160| 29 29 2a 61 76 65 70 65 | 72 0d 0d 2d 2d 20 43 68 |))*avepe|r..-- Ch|
|00000170| 65 63 6b 20 74 68 65 20 | 64 69 73 74 72 69 62 75 |eck the |distribu|
|00000180| 74 69 6f 6e 20 62 79 20 | 61 63 63 75 6d 75 6c 61 |tion by |accumula|
|00000190| 74 69 6e 67 20 61 20 68 | 69 73 74 6f 67 72 61 6d |ting a h|istogram|
|000001a0| 2e 0d 69 6e 63 6c 75 64 | 65 20 22 3a 69 6e 63 6c |..includ|e ":incl|
|000001b0| 3a 68 69 73 74 6f 67 72 | 61 6d 22 0d 0d 2d 2d 20 |:histogr|am"..-- |
|000001c0| 6d 61 6b 65 20 61 6e 20 | 61 72 72 61 79 20 6f 66 |make an |array of|
|000001d0| 20 72 61 6e 64 6f 6d 20 | 69 6e 74 65 72 2d 65 76 | random |inter-ev|
|000001e0| 65 6e 74 20 74 69 6d 65 | 73 0d 6e 65 76 65 6e 74 |ent time|s.nevent|
|000001f0| 73 20 3d 20 36 30 30 0d | 61 76 65 70 65 72 20 3d |s = 600.|aveper =|
|00000200| 20 32 2e 35 0d 64 74 5b | 69 5d 20 3d 20 70 6f 69 | 2.5.dt[|i] = poi|
|00000210| 73 73 6f 6e 72 61 6e 64 | 28 61 76 65 70 65 72 29 |ssonrand|(aveper)|
|00000220| 20 64 69 6d 5b 6e 65 76 | 65 6e 74 73 5d 0d 0d 2d | dim[nev|ents]..-|
|00000230| 2d 20 61 63 63 75 6d 75 | 6c 61 74 65 20 61 20 68 |- accumu|late a h|
|00000240| 69 73 74 6f 67 72 61 6d | 20 6f 66 20 6e 75 6d 62 |istogram| of numb|
|00000250| 65 72 20 6f 66 20 65 76 | 65 6e 74 73 20 76 73 2e |er of ev|ents vs.|
|00000260| 20 69 6e 74 65 72 2d 65 | 76 65 6e 74 20 74 69 6d | inter-e|vent tim|
|00000270| 65 2e 0d 6e 62 69 6e 73 | 20 3d 20 34 30 0d 68 69 |e..nbins| = 40.hi|
|00000280| 73 74 6f 28 64 74 2c 58 | 6d 69 6e 2c 58 6d 61 78 |sto(dt,X|min,Xmax|
|00000290| 2c 6e 62 69 6e 73 29 3a | 0d 74 6f 74 61 6c 3a 35 |,nbins):|.total:5|
|000002a0| 39 33 2e 30 30 30 0d 0d | 70 6c 6f 74 20 62 69 6e |93.000..|plot bin|
|000002b0| 73 0d 6c 61 62 65 6c 20 | 6d 65 61 6e 3a 32 2e 33 |s.label |mean:2.3|
|000002c0| 38 39 0d 6c 61 62 65 6c | 20 61 76 65 70 65 72 3a |89.label| aveper:|
|000002d0| 32 2e 35 30 30 0d 58 6d | 69 6e 3d 30 3b 20 58 6d |2.500.Xm|in=0; Xm|
|000002e0| 61 78 3d 35 2a 61 76 65 | 70 65 72 0d 59 6d 69 6e |ax=5*ave|per.Ymin|
|000002f0| 3d 30 3b 0d 0d 2d 2d 20 | 70 6c 6f 74 20 74 68 65 |=0;..-- |plot the|
|00000300| 20 63 6f 6e 74 69 6e 75 | 6f 75 73 20 50 6f 69 73 | continu|ous Pois|
|00000310| 73 6f 6e 20 64 69 73 74 | 72 69 62 75 74 69 6f 6e |son dist|ribution|
|00000320| 0d 70 6f 69 73 73 6f 6e | 28 74 29 20 3d 20 65 78 |.poisson|(t) = ex|
|00000330| 70 28 2d 74 2f 61 76 65 | 70 65 72 29 0d 0d 70 6c |p(-t/ave|per)..pl|
|00000340| 6f 74 20 62 69 6e 31 2a | 70 6f 69 73 73 6f 6e 28 |ot bin1*|poisson(|
|00000350| 58 29 0d 0d 62 69 6e 74 | 20 3d 20 28 58 6d 61 78 |X)..bint| = (Xmax|
|00000360| 2d 58 6d 69 6e 29 2f 6e | 62 69 6e 73 0d 62 69 6e |-Xmin)/n|bins.bin|
|00000370| 31 20 3d 20 6e 65 76 65 | 6e 74 73 2a 28 31 2d 70 |1 = neve|nts*(1-p|
|00000380| 6f 69 73 73 6f 6e 28 62 | 69 6e 74 29 29 0d 00 00 |oisson(b|int))...|
|00000390| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000400| 00 00 01 00 00 00 01 72 | 00 00 00 72 00 00 00 72 |.......r|...r...r|
|00000410| d9 01 ff f3 68 54 01 67 | 20 7d 56 8b c1 25 01 01 |....hT.g| }V..%..|
|00000420| 08 26 57 72 50 12 04 ea | 4f ef 54 57 72 50 01 04 |.&WrP...|O.TWrP..|
|00000430| 07 50 6f 69 73 73 6f 6e | 02 00 00 00 54 45 58 54 |.Poisson|....TEXT|
|00000440| 4d 50 61 64 01 00 00 34 | 00 c0 00 00 00 00 4f 5e |MPad...4|......O^|
|00000450| 00 00 54 45 58 54 4d 50 | 61 64 01 00 00 34 00 c0 |..TEXTMP|ad...4..|
|00000460| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000470| 00 00 a9 d7 5b b2 00 00 | 03 0e 00 00 01 e4 5a 5b |....[...|......Z[|
|00000480| 50 01 24 e2 57 79 50 2c | 4f 57 79 50 01 04 e2 cc |P.$.WyP,|OWyP....|
|00000490| 96 67 01 66 cc 59 5b 58 | 2d f0 5a 5b 50 12 01 c2 |.g.f.Y[X|-.Z[P...|
|000004a0| 58 8f 01 60 20 5a 5b 29 | 2a 02 73 6f 70 65 50 01 |X..` Z[)|*.sopeP.|
|000004b0| 00 fa 68 54 59 71 58 2d | f0 28 50 2e 01 60 1e 23 |..hTYqX-|.(P..`.#|
|000004c0| 24 5a 4f 60 4c 01 fe 6a | 68 6a 73 84 9f 27 11 ff |$ZO`L..j|hjs..'..|
|000004d0| c8 5c 6a 8c 4d 57 2f 50 | 02 02 02 4a 80 67 01 67 |.\j.MW/P|...J.g.g|
|000004e0| 2c 60 50 01 06 82 9d 67 | df 86 01 13 b0 50 12 01 |,`P....g|.....P..|
|000004f0| da 58 8f 55 56 01 72 01 | c1 60 50 01 37 5a cc 68 |.X.UV.r.|.`P.7Z.h|
|00000500| 00 00 00 20 02 00 00 03 | 00 02 3f f9 8e fa 35 12 |... ....|..?...5.|
|00000510| 94 e9 c8 ae 01 5b 00 bf | 00 03 00 91 00 a6 01 2c |.....[..|.......,|
|00000520| 01 57 00 26 00 00 00 32 | 3e 5e 12 82 3f 68 a5 47 |.W.&...2|>^..?h.G|
|00000530| 0b 81 00 0c 20 6d 65 61 | 6e 3a 32 2e 33 38 39 00 |.... mea|n:2.389.|
|00000540| 3e 57 e7 53 3f 5d dd de | 0d 81 00 0e 20 61 76 65 |>W.S?]..|.... ave|
|00000550| 70 65 72 3a 32 2e 35 30 | 30 00 00 00 00 14 00 04 |per:2.50|0.......|
|00000560| 06 4d 6f 6e 61 63 6f 01 | 39 06 4d 6f 6e 61 63 6f |.Monaco.|9.Monaco|
|00000570| 01 39 00 00 01 00 00 00 | 01 72 00 00 00 72 00 00 |.9......|.r...r..|
|00000580| 00 72 00 3f a4 84 05 26 | 00 00 00 1c 00 5a 00 02 |.r.?...&|.....Z..|
|00000590| 50 52 65 66 00 00 00 1a | 4c 42 4c 53 00 00 00 26 |PRef....|LBLS...&|
|000005a0| 53 54 52 23 00 00 00 32 | 00 80 ff ff 00 00 00 00 |STR#...2|........|
|000005b0| 00 41 2e 4c 00 80 00 00 | 00 00 00 24 00 00 00 00 |.A.L....|...$....|
|000005c0| 00 81 00 0c 00 00 00 5a | 00 41 2e 34 0b 70 6c 6f |.......Z|.A.4.plo|
|000005d0| 74 20 6c 61 62 65 6c 73 | 0b 66 6f 6e 74 20 26 20 |t labels|.font & |
|000005e0| 73 69 7a 65 00 00 00 00 | 00 00 00 00 00 00 00 00 |size....|........|
|000005f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+