n = 5 10^3; data = RandomVariate[NormalDistribution[0, 10], n]; data2 = RandomVariate[CauchyDistribution[0, 10], n]; p0 = Table[ GraphicsGrid[{ {Show[ Histogram[data[[1 ;; j]], {1}, "Probability", ChartStyle -> Orange], Plot[PDF[NormalDistribution[0, 10], x], {x, -40, 40}, PlotRange -> All, PlotStyle -> {Purple, Thick}] , PlotRange -> {{-30, 30}, {0, 0.045}}, Axes -> False, Frame -> True, FrameLabel -> {"x", "P(x)"}, LabelStyle -> {Black, Bold}, PlotLabel -> "Normal distribution" ] , ListPlot[Table[Mean[data[[1 ;; i]] ], {i, 9, j}], Joined -> True, PlotRange -> {{0, n}, All}, DataRange -> j, Axes -> False, Frame -> True, FrameLabel -> {"#", "\!\(\*OverscriptBox[\(\[Mu]\), \(^\)]\)"}, LabelStyle -> {Black, Bold}, PlotStyle -> Black, Epilog -> {Purple, Thick, Dashed, Line[{{0, 0}, {n, 0}}]}] , ListPlot[Table[StandardDeviation[data[[1 ;; i]] ], {i, 9, j}], Joined -> True, PlotRange -> {{0, n}, All}, DataRange -> j, Axes -> False, Frame -> True, FrameLabel -> {"#", "\!\(\*OverscriptBox[\(\[Sigma]\), \(^\)]\)"}, LabelStyle -> {Black, Bold}, PlotStyle -> Black, Epilog -> {Purple, Thick, Dashed, Line[{{0, 10}, {n, 10}}]}] }, { Show[ Histogram[data2[[1 ;; j]], {1}, "Probability", ChartStyle -> Orange], Plot[PDF[CauchyDistribution[0, 10], x], {x, -40, 40}, PlotRange -> All, PlotStyle -> {Purple, Thick}], PlotRange -> {{-40, 40}, {0, 0.035}}, Axes -> False, Frame -> True, FrameLabel -> {"x", "P(x)"}, LabelStyle -> {Black, Bold}, PlotLabel -> "Cauchy distribution"] , ListPlot[Table[Mean[data2[[1 ;; i]] ], {i, 1, j}], Joined -> True, PlotRange -> {{0, n}, All}, DataRange -> j, Axes -> False, Frame -> True, FrameLabel -> {"#", "\!\(\*OverscriptBox[\(\[Mu]\), \(^\)]\)"}, LabelStyle -> {Black, Bold}, PlotStyle -> Black, Epilog -> {Purple, Thick, Dashed, Line[{{0, 0}, {n, 0}}]}] , ListPlot[Table[StandardDeviation[data2[[1 ;; i]] ], {i, 2, j}], Joined -> True, PlotRange -> {{0, n}, All}, DataRange -> j, Axes -> False, Frame -> True, FrameLabel -> {"#", "\!\(\*OverscriptBox[\(\[Sigma]\), \(^\)]\)"}, LabelStyle -> {Black, Bold}, PlotStyle -> Black] }}, ImageSize -> 800] , {j, 10, n, 20}]; ListAnimate[p0]