Getting confidence intervals
Using confidence intervals allows us to estimate the interval range of unknown parameters in the data. In this recipe, we will teach you methods that can help obtain confidence intervals in R.
Ensure that you installed R on your operating system.
How to do it…
Perform the following steps to obtain confidence intervals:
- Let's first generate a normal distribution using the
>set.seed(123) >population<- rnorm(1000, mean = 10, sd = 3) >plot(dens, col="red", main="A density plot of normal distribution")
- Next, we will sample 100 samples out of the population: ...