i am writing a thesis and am sadly stuck...I am trying to sample from a distribution of the form $$a*\exp(-2 \pi^2 x^2)(x^{d-1})$$Now my instinct was to "simply" calculate the CDF and sample that way, but manually integrating this or using integration calculators just dont yield a proper result. I get $$-\frac{\operatorname{\Gamma}\left(\frac{d}{2},2\pi^{2} x^{2}\right) \cdot 2^{-\frac{d}{2} - 1} x^{d}}{\pi^{d} \left|x\right|^{d}}$$in the calculator but the scaling is completely off and the behavior around 0 seems to be inverted.Now my question is if I can somehow skip using the CDF or calculate it directly in python?My problem is finding the formula for general d, for the even explicit ones the calculators work fine.I know this question is very vague, but I am just frustrated at this point. Thank you for reading
↧