Showing posts with label Quartiles. Show all posts
Showing posts with label Quartiles. Show all posts

Monday, September 29, 2014

R Statistical Software Basics – Descriptive Statistics - Quartiles

The practice sheet titled StatisticMarks Data.csv downloaded from Link. – Download Sheet

About the Data Sheet - The data in this sheet is related to marks scored by 100 Students in a Statistical Test.

Based on the data, we will use R Software Statistical functions to analyze the descriptive statistics.

In the Data Sheet, we have Data from A2:A101, A1 being the header of the Data. I have stored the StatisticMarks.csv file in Working Directory on my Desktop.

setwd("C:/Users/Rajesh Prabhakar/Desktop/R")

For inputting or reading Data from “StatisticMarks.csv” file, R Command would be

StatMarks=read.csv("StatisticMarks.csv")

Quartiles
Quartiles divide a rank-ordered data set into four equal parts. The values that divide each part are called the first, second, and third quartiles; and they are denoted by Q1, Q2, and Q3, respectively.
Note the relationship between quartiles and percentiles. Q1 corresponds to P25, Q2 corresponds to P50, Q3 corresponds to P75. Q2 is the median value in the set.
In R Statistical Software, Quartiles & percentiles are represented by function called “quantile”

quantile(  )

In the Data Sheet, we have Data from A2:A101, A1 being the header of the Data titled StatisticsMarks. 
quantile(StatMarks$StatisticsMarks)

StatMarks is the name of the variable in which we stored the data followed by $ sign and column header of the Data i.e. StatisticsMarks.

Remember the title of the column should be exactly same including the large caps & small caps or else it will give error.

In R the file names, column headers and row headers should exactly match the same or else the function will give errors

The result of this function in R Console is

quantile(StatMarks$StatisticsMarks)
0%    25%    50%    75%   100%
25.00  69.75  75.00  80.00 100.00

The results highlights that 25% of students scored less than 69.75 marks, 25% to 50% students scored between 69.75 & 75.00, 50% to 75% of students scored between 75.00 & 80.00 and 75 to 100% students scored between 80.00 & 100.00 marks.

                                                                           

Sunday, September 14, 2014

Quartiles - Descriptive Statistics using Microsoft Excel Statistical Functions

The practice sheet can be downloaded from Link. Statistics Marks Data - Download Sheet

About the Data Sheet - The data in this sheet is related to marks scored by 100 Students in a Statistical Test. 

Based on the data, we will use Microsoft Excel Statistical functions to analyse the descriptive statistics. 

In the Data Sheet, we have Data from A2:A101, A1 being the header of the Data. 

Quartiles
Quartiles divide a rank-ordered data set into four equal parts. The values that divide each part are called the first, second, and third quartiles; and they are denoted by Q1, Q2, and Q3, respectively.
Note the relationship between quartiles and percentiles. Q1 corresponds to P25, Q2 corresponds to P50, Q3 corresponds to P75. Q2 is the median value in the set.

Quartiles are mostly used in sales and survey data to divide populations into groups.

=QUARTILE(array,quart)

Array     is the array or cell range of numeric values for which you want the quartile value.
Quart     indicates which value to return.

Quartile = 0 returns Minimum Value
Quartile = 1 returns First Quartile (25th   Percentile)
Quartile = 2 returns Second Quartile (50th Percentile) = Median
Quartile = 3 returns Third Quartile (75th Percentile)
Quartile = 4 returns Maximum Value

In the Data Sheet, we have Data from A2:A101, A1 being the header of the Data. 
=Quartile(A2:A101,0)
=Quartile(A2:A101,1)
=Quartile(A2:A101,2)
=Quartile(A2:A101,3)
=Quartile(A2:A101,4)


First Quartile i.e. 25% of students scored less than 69.75 Marks 

Second Quartile i.e. 25% of students scored between 69.75 to 75 Marks 
Third Quartile i.e. 25% of students scored between 75 & 80 Marks 
Fourth Quartile i.e. 25% of students scored between 80 & maximum 100 Marks.
Minimum Marks scored in test is 25



Result is below Table





The practice sheet can be downloaded from Link. Statistics Marks Data - Download Sheet