Help creating moving average with random sub-sampling

Good day,

I’m trying to make a simple graph showing how the mean value of a dataset changes with iterative removal of one sample at a time. So the final product would be a simple X-Y plot where X was the number of samples and Y was the mean concentration of element. I would want mean values for all numbers of samples between 1 and 100.

I believe this involves making a loop but I have no idea where to start.

Thanks!

Hi @aahmed8,

I created an example workflow. means.knwf (115.2 KB)
It creates some dummy data and randomly samples a fraction of the data in a loop. The fractions are between 1% to 100%. Then the mean is calculated and plotted using a Line Plot.

If you don’t want to have a fraction of the data but single rows removed you can easily adapt the workflow. Then the counter must count to the number of rows in your dataset and the Row Sampler should use the absolute number and not the fraction to create the sample (see the flow variable).

Is that what you were looking for?

Cheers,
David

Hi David,
Thank you so much for your time!
I will try it out tomorrow and see what happens.
Gratefully,
Ayesha