Quantcast
Channel: Active questions tagged r - Stack Overflow
Viewing all articles
Browse latest Browse all 201839

Is there a way to find a two sided confidence interval (by applying a t test) for a vector of 10000 samples in R?

$
0
0

I think I worded the question poorly in the title. Basically, I'm supposed to generate 10000 samples (of size 20) from a Laplace/Double Exponential distribution (Laplace(1/2), E[x] = 1/2). I've done that with this line (I think).

k <- 10000
n <- 20
mu <- 0.5
samples <- rerun(k, rlaplace(n, mean = mu))

rlaplace is just the function given that just creates the distribution.

I'm supposed to generate a 95% two-sided confidence interval (using t.test) but I'm unsure how to do that if I have multiple samples. Is there a way to do that using the t.test function?


Viewing all articles
Browse latest Browse all 201839

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>