R confident intervals

I would like to find the confident intervals for both of those samples. How can I go about this, please?

sample1 =c(103.85717,
           103.14916,
           113.90591,
           104.91262,
           90.84991,
           97.60370,
           101.22786,
           102.18647,
           97.69707,
           95.88739,
           109.02683,
           92.12523,
           106.21427,
           98.92642,
           90.83309,
           93.55331,
           102.26012,
           99.50595,
           109.58390,
           99.52911,
           106.94329,
           98.57266,
           95.04966,
           94.62632,
           105.90799,
           103.72201,
           98.21947,
           99.34361,
           103.06769,
           105.33094)

sample2 <- c(84.91725,	
             100.62723,
             88.79755,
             104.33116,
             98.37728,
             97.46470,
             94.56373,
             96.59360,
             95.56268,
             90.70722,
             90.80393,
             102.37638,
             100.52961,
             99.52056,
             106.59802,
             85.82843,
             92.39860,
             100.09725,
             98.49902,
             103.80920,
             92.75619,
             108.97948,
             107.33424,
             94.47826,	
             107.20983,
             97.42251,
             91.63524,	
             95.62785,	
             98.37055,	
             88.43078)

Just use “ci” function?

You should be able to use the CI function from the Rmisc package as suggested by shenting017. You can also calculate it manually as explained, for example, in this document:
http://www.stat.ucla.edu/~rgould/110as02/bsci

That might give you a better idea of where the number comes from . You would want to use the method described in the section Setting II, though read it from the beginning.

2 Likes

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.