0
$\begingroup$

Suppose I have an uniform grid $A = [ a_1, a_2, a_3, \dots, a_n ]$ of $n$ points on the interval $[-c, +c]$.

As an example, consider $c=10$ and $n=10^4$ so that $$A = [-10, -9.9979998, -9.9959996, \dots, 9.9959996, 9.9979998, 10]$$

How should I randomly pick $m$ indexes $k_1, \dots k_m$ so that the resulting distribution of the sampled array $\tilde{A} = [a_{k_1}, a_{k_2}, \dots, a_{k_m} ]$ is approximately gaussian ?

I assume I'd need to compute the mean $\mu_A$ and std $\sigma_A$ of my original array $A$, and sample $68\%$ of my points in the interval $\mu_A \pm \sigma_A$, then $95\%$ in the interval $\mu_A \pm 2\sigma_A$... This is however not enough to approximate a gaussian.

Any ideas ?

$\endgroup$
3
  • $\begingroup$ If indeed a uniform grid, $A$ is not a random sample. And generating a Gaussian over an integral is rigorously impossible since the Gaussian distribution is supported by $(-\infty,+\infty)$. $\endgroup$ Commented Mar 7, 2021 at 10:16
  • 2
    $\begingroup$ I'm not sure I understand your question: why can't you choose any Gaussian distribution with parameters $(\mu,\sigma)$ for which (say) $[\mu-3\sigma, \mu+3\sigma]\subset [-c,c]$, sample from it, and round the values to the nearest $a_i$? Because this doesn't require any information about the mean and sd of $A,$ nor anything about 68% and 95%, I wonder whether you have explained enough details of your problem to communicate it accurately. $\endgroup$ Commented Mar 7, 2021 at 16:43
  • $\begingroup$ @whuber this is good enough, if you post this as an answer I'll accept it ! $\endgroup$ Commented Mar 8, 2021 at 8:22

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.