Consider $50$ random variables with probability distribution:
$X∼Bin(20,.1)$, where $n=20$ and $p=.1$.
Now take a random sample of size $i; \ i=1,5,12,30,40$ from the 50 random variables and plot the histogram of such sample. Compare each of the 5 histograms.
What I've done so far :
data = RandomVariate[BinomialDistribution[20, 0.1], 20^4];
Show[Histogram[data, {1}, "PDF"],
DiscretePlot[PDF[BinomialDistribution[20, 0.1], x], {x, 0, 20},
PlotStyle -> PointSize[Medium]]]
which gives a single histogram for different values of r.v. X
My question is how to generate 50 of them and then how to take a random sample of size $i$ from them ?