Statistics - Basic 1 - Types of Data
Types of Data
1. Numeric:
2. Categorical
1. Numeric:
- Data that is quantifiable
- Two types of numeric data:
- Discrete numeric data : Counts an event. [Example: Transaction values, No. of days, etc.] Represented by a ratio
- Continuous numeric data: Represented by a range/interval [Example: Amount of rainfall, temperature range, etc.]
2. Categorical
- Data that has no inherent numeric meaning
- Nominal Categorical data: Example : Gender [Man/Woman], State of birth, etc. Numbers are assigned to these values but the numbers themselves don’t mean anything.
3. Ordinal
- Combination of numerical and categorical data. Example: Customer ratings between very satisfied[5] to not satisfied[0] for a restaurant, etc.
Mean, Median, Mode
Mean:
Given a set of data points:
x = [28, 49, 3, 78, 32, 9, 77]
Given a set of data points:
x = [28, 49, 3, 78, 32, 9, 77]
Mean = Total of the values of the samples/ Number of samples.
Mean = (28+49+3+78+32+9+77)/7 = 39.43
Median:
Sort the values and take the middle value.
x_sorted = [3, 9, 28, 32, 49, 77, 78]
Median = 32
Here total no. of samples = 7 (odd)
For even no of samples = even
Median = average of middle values of the sorted sample
If y_sorted = [3, 10, 33, 56, 77, 78]
Median of y_sorted= 33+56/2 = 44.5
Advantage of Median over Mean:
1. Median is less susceptible to outliers than mean.
2. If there is a high chance of outliers being present in the data set, it is wiser to take the median instead of the mean.
Mode:
1. Mode represents the most common value in a data set.
2. Mode is most useful when you need to understand clustering or number of ‘hits’.
For example, a retailer may want to understand the types of refrigerator purchased so that he can set stocking labels optimally. Say, store A has a mode of ‘front_load’ while store B has a mode of ‘top_load’.
Variance:
Average of the squared differences from the mean.
Standard Deviation:
Square root of variance
Mean = (28+49+3+78+32+9+77)/7 = 39.43
Median:
Sort the values and take the middle value.
x_sorted = [3, 9, 28, 32, 49, 77, 78]
Median = 32
Here total no. of samples = 7 (odd)
For even no of samples = even
Median = average of middle values of the sorted sample
If y_sorted = [3, 10, 33, 56, 77, 78]
Median of y_sorted= 33+56/2 = 44.5
Advantage of Median over Mean:
1. Median is less susceptible to outliers than mean.
2. If there is a high chance of outliers being present in the data set, it is wiser to take the median instead of the mean.
Mode:
1. Mode represents the most common value in a data set.
2. Mode is most useful when you need to understand clustering or number of ‘hits’.
For example, a retailer may want to understand the types of refrigerator purchased so that he can set stocking labels optimally. Say, store A has a mode of ‘front_load’ while store B has a mode of ‘top_load’.
Variance, Standard Deviation
Variance:
Average of the squared differences from the mean.
Standard Deviation:
Square root of variance
Comments
Post a Comment