Re: VB6 and the Sample Mean
Moved to CodeBank
I moved your thread since it wasnt a question or problem over to our CodeBank for finished tips, tricks and other cool code.
Thanks for the entry :thumb:
Re: VB6 and the Sample Mean
OK, RobDog, I wasn't sure if code that was not thoroughly tested was supposed to go to the Codebank thread, but I did run it through several iterations. Anyway, I kind of wish I had something like this to illustrate the principle when I was lecturing in the classroom.
Note that we are sampling essentially from an infinite population, which makes it a bit theoretical compared to actual practice, but there are real world examples of sampling from huge populations. It might also be interesting to count the number of times that the same value is selected at random more than once. However, that would require an array, be rather memory intensive with huge samples, and would definitely slow down the processing.
Another approach would be to first generate a large finite population of values and then extract samples from it without replacement until all are selected.
Re: VB6 and the Sample Mean
No prob. Most entries are not 100% bug free. Its ok as when members test it out and find a bug they will post it in your thread. Sometimes they have suggestions and improvements so its ok to post replies like that too.