Using Chebyshev’s Theorem, obtain an interval in which lies at least 75% of the data.
m <- mtcars$mpg
m.lower_bound <- mean(m) - 2*sd(m)
m.upper_bound <- mean(m) + 2*sd(m)
#(length(m[m > m.lower_bound & m < m.upper_bound])) / length(m) # For verification (in fact, 93% of data lie within this interval)
Using Chebyshev’s Theorem, obtain an interval in which lies at least 89% of the data.
m <- mtcars$mpg
m.lower_bound <- mean(m) - 3*sd(m)
m.upper_bound <- mean(m) + 3*sd(m)
#(length(m[m > m.lower_bound & m < m.upper_bound])) / length(m) # For verification (in fact, 100% of data lie within this interval)
Using empirical rule, obtain an interval in which lies at least 68% of the data.
m <- mtcars$mpg
m.lower_bound <- mean(m) - sd(m)
m.upper_bound <- mean(m) + sd(m)
#(length(m[m > m.lower_bound & m < m.upper_bound])) / length(m) # For verification (in fact, 75% of data lie within this interval)
Using empirical rule, obtain an interval in which lies at least 95% of the data.
m <- mtcars$mpg
m.lower_bound <- mean(m) - 2*sd(m)
m.upper_bound <- mean(m) + 2*sd(m)
#(length(m[m > m.lower_bound & m < m.upper_bound])) / length(m) # For verification (in fact, 93% of data lie within this interval)
Using empirical rule, obtain an interval in which lies at least 99.7% of the data.
m <- mtcars$mpg
m.lower_bound <- mean(m) - 3*sd(m)
m.upper_bound <- mean(m) + 3*sd(m)
#(length(m[m > m.lower_bound & m < m.upper_bound])) / length(m) # For verification (in fact, 100% of data lie within this interval)