Bayesianische Formel

p((Subscript[E, 1])∧(Subscript[E, 2]))=p((Subscript[E, 1])|(Subscript[E, 2]))*p((Subscript[E, 2]))=p((Subscript[E, 2])|(Subscript[E, 1]))*p((Subscript[E, 1]))

Gebogene Münze

Wahrscheinlichkeit p
			0 ≤ p ≤ 1

A priori : Gleichförmige Verteilung

p((Subscript[E, 1]))=0.5
p((Subscript[E, 2])|(Subscript[E, 1]))=((p((Subscript[E, 2])∧(Subscript[E, 1])))/(p((Subscript[E, 1]))))
p((Subscript[E, 1])∧(Subscript[E, 2]))=((∫_0)^1)p((Subscript[E, 1])∧(Subscript[E, 2])|w=(Subscript[q, 0]))*p(w=(Subscript[q, 0])) 𝕕 (Subscript[q, 0])
((∫_0)^1)((Subscript[q, 0])^2)*1 𝕕 (Subscript[q, 0])=(1/3)
p((Subscript[E, 1])|(Subscript[E, 2]))=((1/3)/(1/2))=(2/3)

p(n,k)=((((∫_0)^1)((Subscript[q, 0])^(k+1))*(((1-(Subscript[q, 0])))^(n-k))(Subscript[𝕕q, 0]))/(((∫_0)^1)((Subscript[q, 0])^k)*(((1-(Subscript[q, 0])))^(n-k))(Subscript[𝕕q, 0])))
(((Γ(2+k) Γ(1-k+n))/(Γ(3+n)))/((Γ(1+k) Γ(1-k+n))/(Γ(2+n))))=((n+1)/(n+k+2))

Komprimierung

Palme[inp_]:=
Module[{rel,startint,endint,inplength,irishgreen,ladygrey},
inplength=Length[inp];
ladygrey=0;
rel=(Count[inp,0]/inplength);
While[ladygrey<32,
If[rel≥ladygrey/32&&rel<(ladygrey+1)/32,
startint=Zypresse[inp,ladygrey,inplength];
endint=Zypresse[Bärlauch[inp,inplength],ladygrey,inplength];
irishgreen=Rhizopus[startint,endint,ladygrey]];
ladygrey++];
Return[irishgreen]]

Zypresse[inp_,x_,inplength_]:=
Module[{roam,i,intervall,step},
roam=0;
i=0;
intervall=(1+2x)/64;
step=1;
While[i<inplength,
If[Part[inp,i+1]==1,
roam=roam+step*intervall;step=step*(1-intervall),
step=step*intervall];
i++];
Return[roam]]

Bärlauch[inp_,inplength_]:=
Module[{i,j,z,hagebutte},
i=0;
z=1;
j=0;
hagebutte={};
While[i<inplength,
z=z+Part[inp,i+1]*2^(inplength-i-1);
i++];
While[j<inplength,
(*ausnahme für nur 1 in der Folge später behandeln*)
If[Mod[z,2]==1,
PrependTo[hagebutte,1];z=(z-1)/2,
PrependTo[hagebutte,0];z=z/2];
j++];
If[z==1,Print["Error 314: could not compile data"],Return[hagebutte]]]

Rhizopus[startint_,endint_,x_]:=
Module[{earlgrey,salbei,jasmin},
earlgrey=1;
salbei={};
jasmin=0;
While[jasmin<5,
PrependTo[salbei,Mod[Floor[x*((1/2))^jasmin],2]];
jasmin++];
While[Floor[startint*2^earlgrey]==Floor[endint*2^earlgrey],AppendTo[salbei,Mod[Floor[startint*2^earlgrey],2]];earlgrey++];
AppendTo[salbei,1];
Return[salbei]]

FSM[inp_,orgel_]:=
Module[{hermes,athene,aphrodite,hades,demeter},
athene=0;
hermes=1;
hades=0;
demeter=0;
aphrodite=Length[inp]-4;
While[hades<5,
demeter=demeter+2^hades*Part[inp,5-hades];
hades++]
While[hermes<aphrodite,athene=athene+((1/2))^hermes*Part[inp,hermes+5];hermes++];
Return[Diana[athene,demeter,orgel]]
]

Diana[athene_,x_,orgel_]:=(*x sind initbits*)
Module[{hepheistos,apollo,merkur,zeus,poseidon},
apollo=0;
hepheistos=(1+2x)/64;
merkur=0;
zeus=hepheistos;
poseidon={};
While[merkur<orgel,
If[apollo+hepheistos<athene,apollo=apollo+hepheistos;hepheistos=hepheistos*(1-zeus);AppendTo[poseidon,1],
hepheistos=hepheistos*zeus;AppendTo[poseidon,0]
];
merkur++];
Return[poseidon]
]

Tabelle[length_,p_]:=
Module[{n,i,table1,x},
i=0;
table1={};
While[i<length,
x=Random[];
If[x<p,AppendTo[table1,1],AppendTo[table1,0]];
i++];
Return[table1]]

x=Tabelle[500,0.9]

Komprimiert=Palme[x]

Length[Komprimiert]

FSM[Komprimiert,500]==x