Skip to content

This code calculates various statistical measures such as mean, median, range, variance, standard deviation, quartiles, inter-quartile range, and outliers for either a population or a sample data. The user inputs the type of data and the elements and the code outputs the results in a neat and organized manner.

License

Notifications You must be signed in to change notification settings

MaleeshaUdan/Easy-Stat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Ungrouped Data Analysis

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.

How to use

  1. First, the user needs to select whether the calculation is regarding a population or a sample.
  2. Then, the user needs to enter the number of elements.
  3. Finally, the user needs to enter the elements.
Example Input:
Your calculation is regarding?
(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
Output

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
Example Output:

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

How to run this file on Linux

Install Git on Linux

sudo apt-get update
sudo apt-get install git-all

Install g++ compiler on Linux

sudo apt-get install g++

Clone the repository

git clone https://github.com/MaleeshaUdan/Easy-Stat.git

Run the program

cd Easy-Stat
g++ -o example example.cpp
./static

About

This code calculates various statistical measures such as mean, median, range, variance, standard deviation, quartiles, inter-quartile range, and outliers for either a population or a sample data. The user inputs the type of data and the elements and the code outputs the results in a neat and organized manner.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages