Want to make a Confidence Interval Illustration

Tags:
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #15669 Score: 0
    Lee Creighton
    Participant

    Back when I worked for JMP, I created a demonstration to illustrate what a confidence interval means. I’ll attach a screenshot and you’ll get the idea of what I want to do. I repeatedly (100 times) from a population data table and create means and confidence intervals for each sample.  Since I created the population, I know its mean, and I can color the confidence interval as gray (captured the true mean) vs red (I didn’t). This idea is certainly not original with me.

    So I set up a data table with 1000 normal variates and use the sampler to repeatedly collect samples. In the middle Sampler table (labeled Samples in my attachment), I’d need a count from 1 to 100 so that I can make the plot. However, the CaseIndex function has let me down a bit. I sort of expected it to return the row number of the table, thus generating the numbers I need. However, it (quite logically) returns the case number as labeled in the table, so I get 1 2 3 1 2 3 for the first two samples.

    I thought maybe I could get the caseIndex from the Experiments table and combine them somehow to generate the number I need, which is why you see a CaseIndex2 variable. I’m not able to puzzle it out. So my question:

    Is there a way to count rows in the Samples data table?

    A future question will be whether I can specify the colors of the lines like I did in JMP. I don’t see a way to do that either, which I suppose means this should be a plugin rather than something I build from existing tools. The existing tools are so good, though! I want to use them!

    #15674
    Bill Finzer
    Keymaster

    Hi Lee,

    Nice challenge! And it led me to find a serious bug in the current V3 beta when I tried to make a new dataset with 1000 cases. ☹️

    But I was able to solve the indexing problem, as shown in the attached screenshot. (It’s not completely general in that it falls apart if the number of samples in each experiment is not constant.)

    I don’t have time to try it, but I suspect that you can also color the bars using a legend to detect when they do not encompass the true mean.

    Thanks for working with us!

    Bill

    #15685
    Dan Damelin
    Keymaster

    Lee, can you send a share link to the doc you are working with containing a full set of samples you would like to use for a demonstration?

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.