Problem Statement: Minimum, Maximum, Median, Mean, Variance and Standard Deviation
Problem Statement: Minimum, Maximum, Median, Mean, Variance and Standard Deviation
An organized and systematic once solution is essential for all universities and organizations. There
are many departments of administration for the maintenance of college or universities information
and student databases in any institution. All these departments provide various records regarding
students’ results including quizzes, lab exam, mid-term, final exam etc. All these modules in college
or university administration are independent. In most of these educational institutions, they are
maintained manually, which is quite a long and complex process to be recorded and sorted.
Moreover, it gets even harder to find selective record from there. So they need to be automated and
centralized as, Information from one module can be needed by other module.
With that in mind, we approached to create an automated menu system which will decrease all
those complexity of result processing. In fact, this system will be able to record detailed data of
minimum 100 students results in every subject, to analyze them and present them according to
user’s desired formation. This automated data analyzing menu system will require these features as
follow:
It should read data from a particular csv formatted file given by the user.
It should calculate and display in table form according to these headings appropriately –
Minimum, Maximum, Median, Mean, Variance and Standard Deviation.
When any wrong input is inserted by the user, it should be able to response on that without
crashing.
It should store and display data in both ascending and descending order for a selective
column.
It should display two tables for above and below the mean (Pass/Fail) and also should
generate a histogram in text format.
It should be able to calculate the Pearson’s Correlation between any two column chosen by
the user.
Also, should calculate the Linear Regression for multiple columns selected by user.
Basically, it should automatically generate an appropriate statistical results of all the
calculation which are mentioned above in a proper formation and store all the data in a text
file.
Function Requirements
Data Inserting:
Only “.csv” format file will be used for input file. Otherwise, it’ll keep showing error.
#include<fstream> header will be used for inserting data file.
Menu System:
The main menu will consist of five options including options for subject-wise view,
comparison of subjects, whole result sheet, exit etc.
Several options shall contain sub menu for specification of output that user want.
If user insert any wrong input, it will catch error and ask for correct input again.
Basic Functions:
For subject-wise view, following functions will be used as header name as well:
Minimum – To find the minimum marks from the list.
Maximum – To find the maximum marks from the list.
Mean – To figure out the average marks from the list. This’ll be calculated by:
Mean = (Total marks of all student/Total student)
Median – To find out the exact middle position value of the list. For example, if there are
9 students’ data, it will show the 5th one’s mark. For 10 students, it will add 5th and 6th
students’ marks first, then subtract 1 and finally divide that by 2 for getting median.
Variance – Standard Deviation’s squared value. Which means first it will call the
function by passing the same parameters to calculate standard deviation, then it will
square the return value to show variance.
Standard Deviation - A statistic that measures the dispersion of a dataset relative to its
Mean and is calculated as the square root of the Variance. The standard deviation is
calculated as the square root of variance by determining each data point's deviation
relative to the mean.
Pearson Correlation: This function will find out the correlation co-efficiency between two
subjects, chosen by the user. It will calculate the sum of total marks for both subjects, the sum of
marks of all rows, the squared values of each row and its total sum for one subject.
Linear Regression: This one will calculate the linear regression between two subjects, chosen
by the user. It will calculate the sum of total marks for both subjects, the sum of marks of all
rows, the squared values of each row and its total sum for one subject.
Histogram: This function will be used for displaying the number of students’ marks that appears
within the range which given by the user. For example: 50 to 70 range is inserted by user, which
occurs 5 students’ marks. So, the output will be like
(….. >> 50-70 | *****)
Above / Below Mean: This function will display the marks that are above or below the
calculated Mean for the subject chosen by the user.
Store: The menu system should display all calculated data and store them into a text file.
The Menu System: Design & Motivation
Here, the system consists of a main menu and couple of sub-menus for executing the calculation
according to user’s choice. First, at the main menu, the system will show 5 options to choose –
LOAD DATA FROM FILE, SUBJECT WISE VIEW, COMPARISON OF ANY 2 SUBJECT,
OVERALL RESULT and EXIT. First, from “LOAD DATA FROM FILE” user must have to
input the data filename. If there’s wrong input given, system will show error and ask for correct
filename again. Once the correct filename is inserted it will gain access to the csv file, read and
store all the data from that csv file into several arrays in order to do the further calculation process.
Next, in “SUBJECT WISE VIEW” option, system will display the subjects and ask user to choose
a subject. After getting input from user, another sub-menu containing various options will appear
asking for the calculation process to be chosen. These options are – MIN, MAX, MEAN,
MEDIAN, VARIANCE, STANDARD DEVIATION, HISTOGRAM, ABOVE/BELOW and
BACK TO MAIN for returning to Main Menu. Users can choose one of the options, so that the
system will be able to calculate the data stored inside arrays. After calculating the data, it will be
saved inside a “.txt” file.
“COMPARISON OF ANY 2 SUBJECT” option will provide two options, “SUBJECT
SELECTION” for proceeding to choose SUBJECT 1 and SUBJECT 2; “BACK TO MAIN” for
returning to Main menu again. After choosing subjects user will be asked to choose either LINEAR
REGRESSION or PEARSON CORRELATION. Then system will calculate the according to
user’s choice and store it.
“OVERALL RESULT”, the 4th option will directly display all the data stored from the csv. Finally,
by choosing “EXIT” option user will be able to quit the system without losing any data as they were
already stored.
This structured visualizes the complete flow of the Menu System, how it should work, right from the beginning to
end. It is subject to change in case some alterations or modifications are required.