Good morning,
a few days ago i gave a program here which calculates the mortality of humans. I needed this for a slightly more complicated program, which calculates how long a conspiration can be hold hidden. The first one who maked calculations about this was Robert Grimes:
May aim is the so called moon hoax:
I took most of the numbers form his article. But I implemented a slightly different method. The main idea is that everybody who is inaugurated has a probability "p" to disclose such a conspiration, whether per mistake or per aim. The value given from Grimes was around 4e-6 per year and person. This is quite low.
I don't think that we can say something is detected more accurate than one week. For this reason, my programm calculates week by week. From the probability p I calculate the probability "f" that nobody of the whole community decovers something. From that, I calculate the value "g" which is the probability that the secret is secure for the time "t", and the inverse of it "l": the detection probability.
I store the values h and H. These are times, for which l gets lower than 95 and 50%, respectively.
The program makes a graph of the detection probability ofer the time. You may change the number of persons involved from input.
~
Grimes looked for ways to get an idea of the value "p". Here he used real conspiration which were detected. There are three of them in the article, The PRISM project, the Syphilis experiment and the FBI scandal. He investigated in the perosns involved, and calculated the most probable value of p for these events.
I wrote my own analysis programm too. It does not have and graphics in it, because it runs for a while even without it. My resuts are as close to Grimes' as meaningful [I don't believe in the two decimals of Grimes' values of p].
You may try it for yourself
event N% time to detection p/Grimes p/piu
PRISM 30'000 6 years 4.09e-6 4.11e-6
Syphilis 6'700 25 years 4.20e-6 4.58e-6
FBI 500 6 years 2.45e-4 2.48e-4
calculation program
'#Mat 0
7Exp77->a~z
7Exp77->A~Z
"N "?->N%'population
1Exp(-)4->a'a,b-para mortality
0.085->b
40->a%'age at start
4Exp(-)6->p'prob. of a leak
52->w'week per year
N%->n
1->g
0->h'hidden 95%?
0->H'hidden 50%?
Gosub G
For 0->i% To 80'years
For 0->j% To w-1 'weeks
i%+j%/w->t
ae^(b(t+a%))->m'prob of mortality
n(1-m/w)->n'n step by step.
1-(1-p)^n->f
g(1-f/w)->g
1-g->l
Black Plot t,l
If l>0.95
h<0.001=>t->h
IfEnd
If l>0.50
H<0.001=>t->H
IfEnd
Next
Next
Gosub S
Disp "95%",h,"50%",H
Stop
Lbl G
ClrGraph:CoordOff:AxesOff:GridOff:LabelOff:S-L-Normal:Rad:'#_SketchThin _
AxesOn
' x0 x\1 dx y0 y\1 dy
ViewWindow 0,60,10,0,1,0.2
Return
'Print._X_Y
Lbl P
Text 1,9," "
Text 1,9,X
Text 1,179,Y
Return
'Stop
Lbl S
Plot :Text 1,1,">"Disps
While Getkey<>31:WhileEnd'exit=47
Return
Analysis programm. I used the bisection method for calculation. This bisection program is useful for may tasks. So I used varaibales in the main program which tend to be used rarely:
Usually, I don't use Lists, but Matrices. Here I used a list for the upper and lower values of X and Y (which is p and the difference between observed and calculated time to detection here).
I used X and Y which are less useful because they are changed when a plot command is used.
'#Mat 0
7Exp77->a~z
7Exp77->A~Z
500->N%'Population
6->T'time to detection
'
4->Dim List 1
0.1->X
Gosub f
X->List 1[0]
Y->List 1[1]
If Y>0
"change x\1 x\2"
Stop
IfEnd
1Exp(-)7->X
Gosub f
X->List 1[2]
Y->List 1[3]
If Y<0
"no root"
Stop
IfEnd
For 1->z% To 10
Sqrt(List 1[0]*List 1[2])->X
Gosub f
If Y<0
X->List 1[0]
Y->List 1[1]
Else
X->List 1[2]
Y->List 1[3]
IfEnd
Disp "p deltaT",X,Y
Next
Disp "result",Sqrt(List 1[0]*List 1[2])
Stop
'
Lbl f
X->p'prob. of a leak
1Exp(-)4->a'a,b-para mortality
0.085->b
40->a%'age at start
52->w
N%->n
1->g
0->h'hidden 95%?
0->H'hidden 50%?
For 0->i% To 80'years
For 0->j% To w-1 'weeks
i%+j%/w->t
ae^(b(t+a%))->m'prob of mortality
n(1-m/w)->n'n step by step.
1-(1-p)^n->f
g(1-f/w)->g
1-g->l
If l>0.95
h<0.001=>t->h
IfEnd
If l>0.50
H<0.001=>t->H
IfEnd
Next
Next
If H<0.001Then
999->H'infinity
IfEnd
H-T->Y
Return