A C++ program to perform ungrouped data analysis. This program provides the median, mean, range, variance, standard deviation, quartiles, interquartile range (IQR), and the upper and lower limits for outliers.
- First, the user needs to select whether the calculation is regarding a population or a sample.
- Then, the user needs to enter the number of elements.
- Finally, the user needs to enter the elements.
(1) Population
(2) Sample
Select the number
2
Enter the number of elements
8
Enter the 1 element
9
Enter the 2 element
11
Enter the 3 element
12
Enter the 4 element
14
Enter the 5 element
15
Enter the 6 element
17
Enter the 7 element
20
Enter the 8 element
22
The program will provide the following results:
- Median value
- Range value
- Variance value
- Standard deviation value
- First quartile (Q1)
- Second quartile (Q2)
- Third quartile (Q3)
- Interquartile Range (IQR)
- Upper limit for outlier
- Lower limit for outlier
Median value : 14
Mean value : 14.5
Range value : 13
Variance value : 25.75
Standard deviation value : 5.06815
First quartile (Q1) : 11
Second quartile (Q2) : 14
Third quartile (Q3) : 17
Inter Quartile Range (IQR) : 6
Upper limit for outlier : 25.5
Lower limit for outlier : 8.5
sudo apt-get update
sudo apt-get install git-all
sudo apt-get install g++
git clone https://github.com/MaleeshaUdan/Easy-Stat.git
cd Easy-Stat
g++ -o example example.cpp
./static