I really do hope I finally get this finished in some reasonable fashion.

Bit of a Recovery Mission

As I continued coding experiment 8, I modified the code to generate a single figure with four charts (one for each value of the number of repetitions of that particular sample size). I slowly realized that for my blogging purposes, I might still want to generate a single plot showing the histogram for a single set of repeated samples. I also wanted to maintain control of the seed for the random sampling. That was not something any of the other experiments allowed me to do. And, I had already committed some of the changes.

I did think about modifying the code to allow me to tell experiment 8 what I wanted, single chart or 2x2, and have it proceed appropriately. But decided that cluttered the code up too much and would probably require an additional command line parameter. So, I decided I’d move my current experiment 8 code to an experiment 9. Then put my old code back in experiment 8. But, I didn’t have my old code? Or did I?

Git to the rescue. Specifically git show. This command does a great many things (do check out the documentation), but I was only interested in having it show me the experiment 8 code from my 2nd last commit — HEAD~1. I have to use head as I am on a branch. Using master will not get me what I want. And, I didn’t want to display it all in a command window. Then have to hunt and copy/paste from there. Figured it would be easier if I piped the output into a file. So:

PS R:\learn\py_play> git show HEAD~1:population/est_avg_age.py > population/play/old_est_avg_age.py

And voilà, I have a file containing all the code for est_avg_age.py prior to my last commit. Perfect. Once I copied things over I deleted the file. As it was not covered by my .gitignore, git kept telling me it was untracked.

I also wanted to be able to display the 95% confidence interval for all the repeated samples. So, I added another kwarg and modified the code for plot_hist_basic() and experiment 8 accordingly. May or may not add that to the charts in epxeriment 9.

And, should you be interested, here’s my git diff for the above changes.

PS R:\learn\py_play> git diff head^ head

diff --git a/population/est_avg_age.py b/population/est_avg_age.py
index c6258e3..3643f7f 100644
--- a/population/est_avg_age.py
+++ b/population/est_avg_age.py
@@ -240,6 +240,7 @@ def plot_hist_basic(ax, h_data, **kwargs):
   ttl_def = f"Simulation: {len(h_data)} countries, no repeats"
   mean_lbl_def = "Est. Average Age"
   do_lgnd = False
+  rpts = len(h_data)
 
   # Optional keyworded arguments and derived values
   x_lbl = kwargs.get('x_lbl', x_def)
@@ -256,6 +257,7 @@ def plot_hist_basic(ax, h_data, **kwargs):
     p95 = s_mean + s_std_err
   pop_mean = kwargs.get('pop_mean', None)
   missed_95 = kwargs.get('ms95', None)
+  r_serr = kwargs.get('se', None)
 
   # now onto plotting
   ax.set_xlabel(x_lbl)
@@ -277,12 +279,20 @@ def plot_hist_basic(ax, h_data, **kwargs):
   if s_std_err:
     ax.axvline(s_std_err, 0, 0, color='w', label=f'std err: {s_std_err:.2f}')
   # ax.axvline(w_median, 0, 0, color='k', label=f'World Average: {w_median:.2f}')
-  # display legend if appropriate
+  if r_serr:
+    if s_mean:
+      lw95 = s_mean - r_serr
+      ax.axvline(lw95, 0, 1, color='hotpink', ls='-.', label=f'Std err for all {rpts} samples: {r_serr:.2f}')
+      hg95 = s_mean + r_serr
+      ax.axvline(hg95, 0, 1, color='hotpink', ls='-.')
+    else:
+      ax.avline(r_serr,0, 1, color='w', label=f'Std err for all {rpts} samples: {r_serr:.2f}')
   if pop_mean:
     ax.axvline(pop_mean, 0, 1, color='aqua', label=f'Population average: {pop_mean:.2f}')
   if missed_95:
-    ax.axvline(missed_95, 0, 1, color='w', label=f'Population average not in 95% CI: {missed_95:.2f}')
-  if s_mean or s_stdev or s_std_err or pop_mean:
+    ax.axvline(missed_95, 0, 1, color='w', label=f'Pop. average not in single sample 95% CI: {missed_95}')
+  # display legend if appropriate
+  if s_mean or s_stdev or s_std_err or pop_mean or r_serr:
     ax.legend()
 
 
@@ -318,7 +328,8 @@ if __name__ == '__main__':
               "Generate and plot a single sample of the specified size",
               "Generate and compare samples of varying sizes",
               "Compare repeated samples of a single size",
-              "Compare repeating a single sample size a differing number of times",
+              "Generate and plot means for samples of size -c repeated -r times"
+              "Compare repeating a single sample (size -c) a differing number of times",
               # following should always be the last test
               "Plot Single Statistic, One Histogram"
   ]
@@ -714,6 +725,87 @@ if __name__ == '__main__':
       autolabel(rects1, "left")
 
     elif n_tst == 8:
+      world_avg = w_median
+      t8_data_file = f't8_samples_{ex_f_nbr}.txt'
+      t8_rpt = 30
+      t8_size = 10
+      t8_stat = 0
+      t8_means = []
+      t8_stderrs = []
+
+      t8_seed = 349
+
+      if args.stat and (args.stat >= 1 and args.stat <= max_smpl):
+        t8_stat = args.stat - 1
+      if args.rpts and (args.rpts >= 1 and args.rpts <= max_rpt):
+        t8_rpt = args.rpts
+      if args.c_cnt and (args.c_cnt >= 1 and args.c_cnt <= max_size):
+        t8_size = args.c_cnt
+
+      t8_means = []
+      t8_stderrs = []
+      tmp_seed = t8_seed
+      for i in range(t8_rpt):
+        tmp_seed += (i * 409)
+        p_medians, p_tots, p_mean, p_sd, p_se = all_stat_sng_sample(t8_size, df_seed=tmp_seed)
+        t8_means.append(p_mean[t8_stat])
+        t8_stderrs.append(p_se[t8_stat])
+
+      missed_interval = 0
+      for i, mean in enumerate(t8_means):
+        if world_avg < mean - t8_stderrs[i] or world_avg > mean + t8_stderrs[i]:
+          missed_interval += 1
+      
+      with open(P_PATH / t8_data_file, 'a') as fl_dbug:
+        fl_dbug.write("{")
+        fl_dbug.write(f"  'parameters': [{t8_size}, {t8_rpt}]")
+        fl_dbug.write(f"  'means': {t8_means},\n")
+        fl_dbug.write(f"  'stderrs': {t8_stderrs},\n")
+        fl_dbug.write(f"  'missed': {missed_interval})\n")
+        fl_dbug.write("},\n")
+      
+      #fig, axs = plt.subplots(2, 2, figsize=(15,9), sharey=True)
+      f_wd = 10
+      f_ht = 6
+      fig, ax = plt.subplots(figsize=(f_wd,f_ht))
+      # Defaults
+      # x_def = 'Age'
+      # y_def = 'Count'
+      # ttl_def = f"Simulation: {len(h_data)} countries, no repeats"
+      # mean_lbl_def = "Est. Average Age"
+      # do_lgnd = False
+
+      # # Optional keyworded arguments and derived values
+      # x_lbl = kwargs.get('x_lbl', x_def)
+      # y_lbl = kwargs.get('y_lbl', y_def)
+      # p_ttl = kwargs.get('title', ttl_def)
+      # s_mean = kwargs.get('mean', None)
+      # mean_lgnd = kwargs.get('m_lbl', mean_lbl_def)
+      # s_stdev = kwargs.get('stdev', None)
+      # s_std_err = kwargs.get('std_err', None)
+      # pop_mean = kwargs.get('pop_mean', None)
+      # missed_95 = kwargs.get('ms95', None)
+      # r_serr = kwargs.get('se', None)
+  
+      fig.suptitle(f"Estimated World Average Age for {t8_rpt} Samples of Size {t8_size}")
+      smpl_mean = sum(t8_means) / t8_rpt
+      rnd_mean = f"{smpl_mean:.2f}"
+      plt_mean = float(rnd_mean)
+      t8_mean = statistics.mean(t8_means)
+      t8_stdev = statistics.stdev(t8_means)
+      t8_se = t_conf_int(t8_size, t8_stdev, p_interval=95, tails=2)
+   
+      kargs = {
+        'title': '',
+        'mean': plt_mean,
+        'm_lbl': f'Mean of all {t8_rpt} samples',
+        'pop_mean': world_avg,
+        'ms95': missed_interval,
+        'se': t8_se
+        }
+      plot_hist_basic(ax, t8_means, **kargs)
+
+    elif n_tst == 9:
       world_avg = w_median
       t8_data_file = f't8_samples_{ex_f_nbr}.txt'
       # for the base 4 example case, the nbr of rpts will be:

Back to the Code for Experiment 9

I have got the code together to plot 4 charts (2 x 2 on one figure) each showing a differing number of repetitions for a sample of a given size. The sample means are being plotted. My defaults are a sample size of 10 and with repetitions of 30, 50, 70 and 100. And, being rather lazy, I did not change my variable names to reflect the change in experiment number. So the experiment 9 code has numerous variables labelled t8_*.

I have also changed my code to, in each execution, select a somewhat different seed for the random sampling based on the current time.

t8_seed = 13 * (int(time.time()) % int(use_yr))

That said, I have command line paramters allowing me to change the sample size (-c), the number of repetitions (-r) and the default seed value (-m). I reused a parameter for the latter from a different experiment (#7) for this one (#9).

And, of course we are back to the multi-axes form for initializing our matplotlib figure:

fig, axs = plt.subplots(2, 2, figsize=(15,9), sharey=True, sharex=True)

And, since I will be using all four positions, I am sharing the x and y axis labels. And, I am using our previously discussed code to get the appropriate axis for each chart.

I am determining the various repetition values based on multipliers and the current value for the t8_rpt variable. Either 30, the default, or whatever was set via the command line paramter. The multiplier array consists of the following multipliers (chosen to get 30, 50, 70, 100 for the default value of 30):

t8_r_mult = [1, 1.66, 2.33, 3.33]

And, the calculation of the actual values looks like:

# in my variable defintions at the top of the experiment block I have the following
      t8_base = 10
      if t8_rpt % 5 == 0:
        t8_base = 5

...

# further down I sort out the 4 repetition amounts to be used
      t8_rpts = [t8_rpt]
      for i in range(1, 4):
        t8_rpts.append(int(round(t8_rpt * t8_r_mult[i] / t8_base) * t8_base))

Bit of fooling around on my part. Not of any particular value to the code or experiment. If the user supplies a new initial repeat value ending in 5, all the generated values will be multiples of 5. Otherwise they will be multiples of 10.

As mentioned above there were also some changes to the histogram plotting function so that I could add extra details to the charts should I wish to do so.

Here’s the output for the default situation:

(base-3.8) PS R:\learn\py_play> python R:\learn\py_play\population\est_avg_age.py -e 9
loading CSV and getting data from population database took 9.77 (1611083478.398643-1611083488.165751)

generating sample stats took 0.22 (1611083488.165751-1611083488.382161)

Test #9: Compare repeating a single sample (size -c) a differing number of times

Initial seed value: 13039

whole sampling process took 11.84
histogram showing means for 30 samples of size 10

You will note that the mean age for each of the 4 sample distributions is very close to the actual world (population) average. This will of course vary from execution to execution. But will always produce this result if the initial seed variable is set to 13039.

Now, if I add the standard error for each set of repeated sample means, it looks like the following. You will note I used the command line parameter to specify the same seed the first chart used.

(base-3.8) PS R:\learn\py_play> python R:\learn\py_play\population\est_avg_age.py -e 9 -m 13039
loading CSV and getting data from population database took 9.95 (1611084115.761430-1611084125.708925)

generating sample stats took 0.16 (1611084125.708925-1611084125.864962)

Test #9: Compare repeating a single sample (size -c) a differing number of times

Initial seed value: 13039

whole sampling process took 12.17
histogram showing means for 30 samples of size 10

And here’s my code for experimetn #9. Note, I once again save the sampling data to a file so that I have it available should I wish to do other things with it for inclusion in this or another post. You likely don’t need to do that.

    elif n_tst == 9:
      world_avg = w_median
      t8_data_file = f't9_samples_{ex_f_nbr}.txt'
      # for the base 4 example case, the nbr of rpts will be:
      t8_rpt = 30
      t8_size = 10
      t8_stat = 0
      t8_means = []
      t8_stderrs = []
      t8_base = 10
      if t8_rpt % 5 == 0:
        t8_base = 5
      t8_r_mult = [1, 1.66, 2.33, 3.33]

      t8_seed = 13 * (int(time.time()) % int(use_yr))

      if args.stat and (args.stat >= 1 and args.stat <= max_smpl):
        t8_stat = args.stat - 1
      if args.rpts and (args.rpts >= 1 and args.rpts <= max_rpt):
        t8_rpt = args.rpts
      if args.c_cnt and (args.c_cnt >= 1 and args.c_cnt <= max_size):
        t8_size = args.c_cnt
      # going to use this cmd line arg (-m) with exp 8 to allow me to specify initial seed value
      if args.e7_multiples:
        t8_seed = args.e7_multiples
      print(f"Initial seed value: {t8_seed}")

      fig, axs = plt.subplots(2, 2, figsize=(15,9), sharey=True, sharex=True)
      fig.suptitle(f"Estimated World Average Age for Repeated Samples of Size {t8_size}")

      t8_rpts = [t8_rpt]
      for i in range(1, 4):
        t8_rpts.append(int(round(t8_rpt * t8_r_mult[i] / t8_base) * t8_base))
      r_nbr = 0
      for r in range(4):
        # sort axes for plot
        if r > 0 and r % 2 == 0:
          r_nbr += 1
        c_nbr = r % 2

        t8_r_tmp = t8_rpts[r]
        t8_means = []
        t8_stderrs = []
        tmp_seed = t8_seed

        for i in range(t8_r_tmp):
          tmp_seed += (i * 409)
          p_medians, p_tots, p_mean, p_sd, p_se = all_stat_sng_sample(t8_size, df_seed=tmp_seed)
          t8_means.append(p_mean[t8_stat])
          t8_stderrs.append(p_se[t8_stat])

        missed_interval = 0
        for i, mean in enumerate(t8_means):
          if world_avg < mean - t8_stderrs[i] or world_avg > mean + t8_stderrs[i]:
            missed_interval += 1
        
        smpl_mean = sum(t8_means) / t8_r_tmp
        rnd_mean = f"{smpl_mean:.2f}"
        plt_mean = float(rnd_mean)
        t8_stdev = statistics.stdev(t8_means)
        t8_se = t_conf_int(t8_size, t8_stdev, p_interval=95, tails=2)

        with open(P_PATH / t8_data_file, 'a') as fl_dbug:
          fl_dbug.write("{")
          fl_dbug.write(f"  'parameters': [{t8_size}, {t8_r_tmp}, {t8_seed}],\n")
          fl_dbug.write(f"  'means': {t8_means},\n")
          fl_dbug.write(f"  'stderrs': {t8_stderrs},\n")
          fl_dbug.write(f"  'missed': {missed_interval}, 'sample mean': {smpl_mean}, 'sample std dev': {t8_stdev}, 'sample std err': {t8_se}\n")
          fl_dbug.write("},\n")
      
        kargs = {
          'title': f'Sample Repeated {t8_r_tmp} Times',
          'mean': plt_mean,
          'm_lbl': f'Mean of all {t8_rpt} samples',
          'pop_mean': world_avg,
          'ms95': missed_interval,
          'se': t8_se
          }
        plot_hist_basic(axs[r_nbr, c_nbr], t8_means, **kargs)

A Look at a Few Different Combinations

Varying Random Seed for Each Sample and Repetition Value

(base) PS R:\learn\py_play> conda activate base-3.8
(base-3.8) PS R:\learn\py_play> python.exe R:\learn\py_play\population\est_avg_age.py -e 9 -c 20
loading CSV and getting data from population database took 9.80 (1611161888.603303-1611161898.403286)

generating sample stats took 0.41 (1611161898.403286-1611161898.810870)

Test #9: Compare repeating a single sample (size -c) a differing number of times

Initial seed value: 12792

whole sampling process took 13.16
figure with 4 histograms showing means of average age for varying numbers of repetitions for samples of size 20 with minimum repetition of 30
(base-3.8) PS R:\learn\py_play> python.exe R:\learn\py_play\population\est_avg_age.py -e 9 -c 30
loading CSV and getting data from population database took 9.14 (1611162051.543878-1611162060.681555)

generating sample stats took 0.64 (1611162060.681555-1611162061.323608)

Test #9: Compare repeating a single sample (size -c) a differing number of times

Initial seed value: 14911

whole sampling process took 12.53
figure with 4 histograms showing means of average age for varying numbers of repetitions for samples of size 30 with minimum repetition of 30
(base-3.8) PS R:\learn\py_play> python.exe R:\learn\py_play\population\est_avg_age.py -e 9 -c 50
loading CSV and getting data from population database took 9.52 (1611162180.255771-1611162189.774642)

generating sample stats took 0.96 (1611162189.774642-1611162190.731630)

Test #9: Compare repeating a single sample (size -c) a differing number of times

Initial seed value: 16588

whole sampling process took 14.30
figure with 4 histograms showing means of average age for varying numbers of repetitions for samples of size 50 with minimum repetition of 30

And in the above (50 x 30), the world (population) average never once fell within the 95% confidence interval for the result of all the repetitions combined. Close, but… Let’s try again using a larger starting value for the number of repetitions and a different random seed.

(base-3.8) PS R:\learn\py_play> python.exe R:\learn\py_play\population\est_avg_age.py -e 9 -c 50 -r 50
loading CSV and getting data from population database took 9.37 (1611162961.967492-1611162971.339756)

generating sample stats took 0.50 (1611162971.339756-1611162971.842826)

Test #9: Compare repeating a single sample (size -c) a differing number of times

Initial seed value: 598

whole sampling process took 14.22
figure with 4 histograms showing means of average age for varying numbers of repetitions for samples of size 50 with minimum repetition of 50

And, no real change. The world (population) average once again never once fell within the 95% confidence interval for any of the four repeated samplings.

As I appreciate that the figures are a “wee bit small”, here’s a table of the data for the above four experiment executions. Note: indicates the world average was within the 95% confidence interval for all the repetitions, or that the number of samples that did not contain the world average within their 95% confidence interval was less than 5%. An 𝖷 means it/they did not.

SampleNumber ofTotal of Repeated Samples# Samples That
SizeRepetitionsMeanStd DevStd ErrMissed 95% CI

203028.161.330.62 ✓1 ✓
5028.251.560.73 ✓2 ✓
7028.231.700.79 ✓3 ✓
10028.151.820.85 ✓4 ✓

303028.521.330.50 ✓1 ✓
5028.431.360.51 ✓2 ✓
7028.431.370.51 ✓3 ✓
10028.511.390.52 ✓4 ✓

503027.951.440.41 𝖷4 𝖷
5028.231.390.40 𝖷4 𝖷
7028.291.270.36 𝖷4 𝖷
10028.181.240.35 𝖷7 𝖷

505028.350.900.25 𝖷1 ✓
8528.340.990.28 𝖷2 ✓
11528.330.950.27 𝖷2 ✓
16528.250.950.27 𝖷3 ✓

Same Random Seed

Now I am going to go back and run those last three using the same initial random seed, 12792, as the first one (sample size 10 with 30 initial repetitions).

figure with 4 histograms showing means of average age for varying numbers of repetitions for samples of size 30 with minimum repetition of 30 using the same random seed at the first execution above -- samples of size 20 starting with 30 repetitions figure with 4 histograms showing means of average age for varying numbers of repetitions for samples of size 50 with minimum repetition of 30 using the same random seed at the first execution above -- samples of size 20 starting with 30 repetitions figure with 4 histograms showing means of average age for varying numbers of repetitions for samples of size 50 with minimum repetition of 50 using the same random seed at the first execution above -- samples of size 20 starting with 30 repetitions

As mentioned above, the figures are a “wee bit small”, so here’s a table of the data for the above three and the first with the same random seed.

SampleNumber ofTotal of Repeated Samples# Samples That
SizeRepetitionsMeanStd DevStd ErrMissed 95% CI

203028.161.330.62 ✓1 ✓
5028.251.560.73 ✓2 ✓
7028.231.700.79 ✓3 ✓
10028.151.820.85 ✓4 ✓

303028.261.370.51 ✓2 𝖷
5028.181.510.56 ✓4 𝖷
7028.221.510.56 ✓6 𝖷
10028.211.510.56 ✓8 𝖷

503028.301.060.30 𝖷1 ✓
5028.251.040.29 𝖷2 ✓
7028.281.010.29 𝖷3 ✓
10028.290.970.28 𝖷3 ✓

505028.251.040.29 𝖷2 ✓
8528.230.990.28 𝖷3 ✓
11528.291.010.29 𝖷4 ✓
16528.301.010.29 𝖷4 ✓

Sample Size of 50?

In none of our above attempts with a sample size of 50, did any of our sixteen 95% confidence intervals contain the world average. Close — but no cigar. Though the number of decimal points may be a factor. So, I am going to execute the experiment numerous times using a sample size of 50 and a starting repetition value of 50. Allowing the code to select the starting random seed each time. The results look like this. (Random seed in brackets in sample size column in case you wish to try repeating the sampling and charting.)

SampleNumber ofTotal of Repeated Samples# Samples That
SizeRepetitionsMeanStd DevStd ErrMissed 95% CI

50
(17550)
5028.371.120.32 ✓2 ✓
8528.401.030.29 ✓3 ✓
11528.411.020.29 ✓4 ✓
16528.401.000.28 ✓6 ✓

50
(19487)
5028.381.040.30 ✓1 ✓
8528.411.060.30 ✓4 ✓
11528.431.020.29 ✓4 ✓
16528.361.060.30 𝖷6 ✓

50
(20176)
5028.250.870.25 𝖷1 ✓
8528.290.930.26 𝖷3 ✓
11528.290.990.28 𝖷6 𝖷
16528.340.950.27 𝖷6 ✓

50
(20826)
5028.131.030.29 𝖷1 ✓
8528.210.980.28 𝖷2 ✓
11528.301.000.28 𝖷2 ✓
16528.321.040.29 𝖷4 ✓

50
(21632)
5028.371.020.29 𝖷1 ✓
8528.491.070.30 ✓2 ✓
11528.471.120.32 ✓4 ✓
16528.341.100.31 𝖷6 ✓

For comparison, I then did the same thing with a sample of size 30 repeated with a starting value of 50. For five differing random seeds.

SampleNumber ofTotal of Repeated Samples# Samples That
SizeRepetitionsMeanStd DevStd ErrMissed 95% CI

30
(22711)
5028.211.510.56 ✓3 𝖷
8528.101.450.54 𝖷6 𝖷
11528.171.420.53 ✓6 𝖷
16528.291.450.54 ✓8 ✓

30
(23686)
5028.201.440.53 ✓4 𝖷
8528.251.240.46 ✓4 ✓
11528.261.350.50 ✓6 𝖷
16528.341.400.52 ✓8 ✓

30
(24310)
5028.211.330.50 ✓0 ✓
8528.361.390.52 ✓2 ✓
11528.311.350.50 ✓3 ✓
16528.371.410.53 ✓5 ✓

30
(24908)
5028.261.710.64 ✓6 𝖷
8528.221.620.61 ✓8 𝖷
11528.261.600.60 ✓10 𝖷
16528.271.540.57 ✓13 𝖷

30
(26013)
5028.321.360.51 ✓2 ✓
8528.331.400.52 ✓3 ✓
11528.241.450.54 ✓5 ✓
16528.331.440.54 ✓7 ✓

Conclusions?

Well, sampling can get us close to the actual population average. With some caveats.

To me it looks like using a sample size of 50 countries is questionable. It is at though we are over sampling and not quite getting the correct answer. Though it is still very close to the one we were after. But it seemed smaller sample sizes got there more frequently than the larger size. And, I don’t think it is related to the number of repetitions as those are the same for many of the experiments. So, the resulting z-value would be the same for all of them. The only difference would be the variability of the data in each execution, as measured by the standard deviation.

And, there didn’t really seem to be a correlation between the number of individual samples that didn’t contain the population average in their 95% confidence interval and whether or not the population mean was in the 95% confidence interval for the mean of the repeated samples.

Also, for each set where we used the same starting random seed, if the initial value for the smallest number of repetitions was “bad”, taking additional samples didn’t appear to help. Not sure why not.

I believe there is something not quite right with the data we are using. As the population mean was always near the upper boundary for the 95% confidence interval. I would have expected just a bit more variation. And, we did notice before that the sample means always seemed to be lower than the actual population mean. I expect this is likely attributable to my approach to selecting the countries from the population database. Or, possibly, to data missing from the database.

I also believe I really need to try taking a statistics course.

That’s It For This One

Lengthy post. Though lots more charts and data than content — such is life. And, finally done with this topic! At least for the time being.

I have no real idea where to go next. Some things rolling around in my head, but…

That said, I think I am going to waste some time and try to animate a chart. Saw something in an article, and thought I’d give it a try. Likely waste a bunch of time; but, an animation often provides information to those viewing it. Not sure what to animate, but I will start with one of our repeated sampling histograms. I would look at showing each sample being added to the chart in the appropriate column.

As I said, likely a big waste of time. But, it might prove fun.

I am thinking about perhaps also trying to animate covid-19 data after sorting the histograms.

Oh, yes. I will also merge my avg-age branch into the main branch before starting on anything else. Perhaps create one for the animation coding. Though not sure that is really necessary as I will like start a completely new code module.

Until next time.

Resources