Approximately 25 students
90-(90 * .72)
## [1] 25.2
6.7 2.7 2.5 3.6 3.4 4.1 4.8
First, we find the mean (u), then we substract each variable from the mean (x-u), then square each
x=c(6.7,2.7,2.5,3.6,3.4,4.1,4.8) # Entering the Dataset into a Vector
u=sum(x)/length(x) # Calculate the Mean
u # Print the Mean
## [1] 3.971429
x | x-u | (x-u)^2 |
---|---|---|
6.7 | 2.7 | 7.4 |
2.7 | -1.3 | 1.6 |
2.5 | -1.5 | 2.2 |
3.6 | -0.4 | 0.1 |
3.4 | -0.6 | 0.3 |
4.1 | 0.1 | 0.0 |
4.8 | 0.8 | 0.7 |
We then sum those up, divide by number of variables minus one to calculate the variance, and take the square root to get the standard deviation.
Variance = sum((x-u)^2)/(length(x)-1) # Calculate Variance
sqrt(Variance) # Calculate and print Standard Deviation
## [1] 1.437259
set1=c(25,41,27,32,43,66,35,31,15,5,34,26,32,38,16,30,38,30,20,21) # Dataset into a Vector
n=length(set1) # Obtain number of variables
u=sum(set1)/length(set1) # Mean
sorted = sort(set1) # Sort the data into a new vector
# The median is the average of the two middle values, 30 and 31
medianvalues = sorted[(length(set1)/2)] + (sorted[(length(set1)/2)]+1)
medianvalues / 2
## [1] 30.5
# Q1 = 25th Percentile
quantile(sorted, 0.25)
## 25%
## 24
# Q3 = 75th Percentile
quantile(sorted, 0.75)
## 75%
## 35.75
# IQR = Q3 - Q1 <-- The interquartile range
IQR(sorted)
## [1] 11.75
Lower Limit
24 - 1.5*(IQR(sorted)) # Lower Limit = Q1 – 1.5 × IQR
## [1] 6.375
Upper Limit
35.75 + 1.5*(IQR(sorted)) # Upper Limit = Q3 + 1.5 × IQR
## [1] 53.375
Potential outliers are 5 and 66 since they are outside the range of 6.375 and 53.375. A boxplot can easily visualize this, and shows that 66 is indeed an outlier.
The area under the curve for z = -1.28 is 0.1003. Multiply by two, then substract from 1: 1 - (2 *(0.1003)) = 0.7994 or 79.94% of the area under the normal distribution curve.
The area under the curve for z =-1.64 is 0.0505. Similar to case a: multiply by two, then substract from 1: 1 - (2 *(0.0505)) = 0.899 or 89.90% of the area under the normal distribution curve.
The area under the curve for z = -1.96 is 0.0250, so the area would be double that: 0.05, or 5% of the total area under the normal distribution curve.
The area under the curve for z = -2.33 is 0.0102, so the area would be double that: 0.0204, or 2.04% of the total area under the normal distribution curve.