CSC420 · 2081 · 10 marks
When do we prefer trim mean for statistical description of data? Justify with an example. Describe about multi-dimensional data model and conceptual modeling of data warehouse.
When do we prefer trim mean for statistical description of data? Justify with an example. Describe about multi-dimensional data model and conceptual modeling of data warehouse.[10]
Quick answer
The trimmed mean (trim mean) is a measure of central tendency calculated by removing a specified percentage of the smallest and largest values from a dataset before computing the arithmetic mean. If we trim p% from each end, it is called a p% trimmed mean.
Trim Mean for Statistical Description & Multidimensional Data Model / Conceptual Modeling of Data Warehouse
PART 1: Trim Mean - When to Prefer It and Justification
Definition of Trim Mean
Formula:
$$\bar{x}{trim} = \frac{1}{n - 2k} \sum{i=k+1}^{n-k} x_{(i)}$$
where:
- $x_{(i)}$ are the sorted (ordered) values
- $k = \lfloor p \times n / 100 \rfloor$ is the number of values trimmed from each end
- $n$ is the total number of observations
When Do We Prefer Trim Mean?
We prefer the trimmed mean over the ordinary arithmetic mean in the following situations:
-
Presence of Outliers: When the dataset contains extreme values (outliers) that distort the arithmetic mean, the trim mean provides a more robust and representative central value.
-
Skewed Distributions: When data is heavily skewed (positively or negatively), the ordinary mean is pulled toward the tail. The trim mean reduces this effect.
-
Noisy or Erroneous Data: In real-world data collection, some values may be recorded incorrectly or represent measurement errors. Trimming removes these suspicious extreme values.
-
When Median is Too Extreme: The median ignores all values except the middle one, while the arithmetic mean is too sensitive to extremes. The trim mean offers a balance between the two - it is more robust than the mean but uses more data than the median.
-
Data Mining and Statistical Description: In data preprocessing for data mining, when describing large datasets with potential noise, the trim mean gives a cleaner summary statistic.
Justification with Example
Example:
Consider the monthly salaries (in thousands) of 10 employees:
$${12, 14, 15, 16, 17, 18, 19, 20, 21, 150}$$
Step 1: Compute the Arithmetic Mean
$$\bar{x} = \frac{12 + 14 + 15 + 16 + 17 + 18 + 19 + 20 + 21 + 150}{10} = \frac{302}{10} = 30.2$$
The mean is 30.2, but 9 out of 10 employees earn between 12 and 21. The value 150 is clearly an outlier (perhaps the CEO's salary), and it has inflated the mean significantly.
Step 2: Compute the 10% Trimmed Mean
- Trim 10% from each end: $k = 0.10 \times 10 = 1$ value removed from each side
- Remove the lowest value: 12
- Remove the highest value: 150
- Remaining values: ${14, 15, 16, 17, 18, 19, 20, 21}$
$$\bar{x}_{10%} = \frac{14 + 15 + 16 + 17 + 18 + 19 + 20 + 21}{8} = \frac{140}{8} = 17.5$$
Conclusion: The trimmed mean of 17.5 is far more representative of the typical employee salary than the arithmetic mean of 30.2. This justifies using the trim mean when outliers are present.
PART 2: Multidimensional Data Model
Definition
A multidimensional data model is a data model that organizes data in multiple dimensions to facilitate complex analytical queries and reporting. It is the foundation of OLAP (Online Analytical Processing) systems and data warehouses.
- Data is viewed as a data cube with multiple dimensions.
- Each dimension represents a perspective or entity of interest (e.g., Time, Location, Product).
- The model is typically organized around a central theme (e.g., Sales), represented by a fact table.
- Facts are numerical measures such as sales amount, units sold, profit, etc.
- Each dimension may have a dimension table associated with it.
Key Components
| Component | Description |
|---|---|
| Fact Table | Central table containing numerical measures (facts) |
| Dimension Table | Tables describing the dimensions (e.g., Time, Product, Location) |
| Measures/Facts | Quantitative data: sales, revenue, units sold |
| Dimensions | Qualitative context: who, what, when, where |
OLAP Operations in Multidimensional Data Model
1. Roll-Up (Consolidation / Aggregation)
- Generates summary from lower level to higher level.
- Can be performed by:
- Reducing dimensions
- Climbing up a concept hierarchy
- Concept Hierarchy: A system of grouping things based on their order level. For example, from daily summary, weekly summary is generated; from weekly, monthly summary is generated.
- Example: Roll-up on location from cities to countries - individual city sales are aggregated into country-level totals.
2. Drill-Down
- The reverse of roll-up; navigates from summary data to more detailed data.
- Example: From yearly sales, drill down to quarterly, then monthly sales.
3. Slice
- Selects one particular dimension from a data cube, resulting in a sub-cube.
- Example: Slice on Time = "Q1 2024" to get all sales data for Q1 only.
4. Dice
- Selects two or more dimensions from a data cube to produce a sub-cube.
- Example: Dice on Location = {Nepal, India} AND Time = {Q1, Q2}.
5. Pivot (Rotate)
- Rotates the data axes to provide an alternative presentation of data.
- Example: Swapping rows and columns in a cross-tabulation.
PART 3: Conceptual Modeling of Data Warehouse
Definition
A **conceptual
Short on time? The 1, 5 and 10 mark versions of this answer, flashcards and practice sets come with a program pass.