I tried to generate a population according to their probability into a list, but the result always gives me the original null list. Cannot figure out why.
bmax[θw_] := (1.14*10^9)/Sin[θw/2]^(9/7);
db = 10^-5;
Pb[θw_, b_] := (2 b db)/bmax[θw]^2;
a0[θw_, b_] := (3.69*10^12)/((2.5*10^63)/(Sin[θw/2]^7 b^7)-Sin[θw/2]^2);
a0sim = {0};
n = 10^5;
m = 0;
While[m < n, {θw = π Random[];
b = bmax[θw] Random[];
If[Random[] <= Pb[θw, b]*10^13,
{Append[a0sim, a0[θw, b]], m++}]
}
]
a0sim
Output was {0}.
Thanks for helping out!
