Data classification: The process of organizing data into categories or types based on their characteristics
Note: Data types include nominal, ordinal, discrete, and continuous.
- Identify the values in the dataset
- Determine if values represent categories or quantities
- Check if categories have a natural order (ordinal) or not (nominal)
- Classify the data type accordingly
Examine the values: Small, Medium, Large, Extra Large
These are size categories, which represent categories
There is a natural order: Small < Medium < Large < Extra Large
Since they're categories with order, this is ordinal data
The data [Small, Medium, Large, Extra Large] is classified as ordinal categorical data
• Nominal data: Categories with no natural order (colors, names)
• Ordinal data: Categories with a natural order (small, medium, large)
• Discrete data: Countable numerical values (integers)
• Continuous data: Measurable values that can take any value
- Ordinal: Education Level (High School, College, Graduate)
- Ordinal: Satisfaction Rating (Poor, Fair, Good, Excellent)
- Ordinal: Shirt Size (XS, S, M, L, XL)
- Nominal: Gender (Male, Female), Country (USA, Canada, Mexico)
- Ordinal data has a natural order (sizes, grades)
- Nominal data cannot be ordered (colors, names)
- Discrete data consists of whole numbers (counts)
Q: How do I distinguish between ordinal and nominal data?
A: Ask yourself if the categories have a natural order. If yes, it's ordinal; if no, it's nominal.
Q: Is age discrete or continuous?
A: Age in years is discrete, but age in months or decimals is continuous.
Data visualization: The graphic representation of information and data using visual elements like charts, graphs, and maps
Note: Choosing the right visualization depends on the data type and the message you want to convey.
- Identify the data type and purpose
- Match the data type to appropriate chart types
- Consider the audience and message
- Select the most effective visualization
Product categories (Electronics, Clothing, Books) are categorical data
Goal is to show each category's contribution to total sales
Categorical data showing parts of a whole works well with pie charts
Pie chart is optimal for showing percentage contributions
A pie chart is the best visualization for showing percentage of sales by product category
• Categorical data: Use bar charts, pie charts, or histograms
• Parts of whole: Use pie charts to show percentages
• Numerical data: Use line graphs, scatter plots, or histograms
• Relationships: Use scatter plots to show correlations
- Pie Chart: Budget allocation (parts of whole)
- Bar Chart: Sales by Region (categorical comparison)
- Line Graph: Temperature over Time (trend analysis)
- Scatter Plot: Height vs Weight (relationship analysis)
- Pie charts: Best for showing parts of a whole
- Bar charts: Best for comparing categories
- Line graphs: Best for showing trends over time
Q: When should I use a pie chart vs a bar chart?
A: Use pie charts for showing parts of a whole; bar charts for comparing values across categories.
Q: Can I use multiple chart types for the same data?
A: Yes, different chart types can reveal different aspects of the same data.
Median: The middle value of a dataset when arranged in ascending order
Note: Median is a measure of central tendency that is resistant to outliers.
- Arrange the data in ascending order
- Count the number of values
- Determine if count is odd or even
- Find the middle value(s) and calculate median
Dataset is already ordered: [5, 7, 7, 8, 9, 10, 10, 10]
There are 8 values in the dataset
8 is an even number, so median is average of two middle values
For 8 values, middle positions are 4th and 5th: 8 and 9
(8 + 9) ÷ 2 = 8.5
The median of the dataset [5, 7, 7, 8, 9, 10, 10, 10] is 8.5
• Odd count: Median is the middle value
• Even count: Median is average of two middle values
• Robust measure: Median is not affected by extreme values
• Practice Tip: Always order data first before finding median
- Median of [10, 20, 30] = 20 (odd count)
- Median of [1, 2, 3, 4] = (2+3) ÷ 2 = 2.5 (even count)
- Median of [5, 5, 5, 5] = 5 (all values same)
- Median is not affected by extreme values (outliers)
- Always arrange data in order before finding median
- For even counts, average the two middle values
Q: How is median different from mean?
A: Median is the middle value; mean is the average. Median is resistant to outliers.
Q: What if I have an even number of data points?
A: Take the average of the two middle values as the median.
Data interpretation: The process of making sense of numerical data that has been processed and presented in various formats
Note: Effective interpretation requires understanding the context, scale, and relationships in the data.
- Examine the title and labels
- Understand the scale and units
- Identify trends and patterns
- Draw conclusions based on the data
Read the chart title and axis labels to understand what's being measured
Note the units and scale to accurately interpret values
Look for peaks, valleys, trends, and seasonal variations
Formulate insights about revenue patterns throughout the year
Effective data interpretation requires systematic examination of all chart elements
• Title and labels: Always read the chart title and axis labels first
• Scale awareness: Pay attention to units and scale intervals
• Pattern recognition: Look for trends, cycles, and anomalies
• Context consideration: Relate findings to real-world meaning
- Bar chart: Compare revenue across quarters
- Line graph: Identify increasing/decreasing trends over time
- Pie chart: Compare proportions of different categories
- Table: Extract specific values and compare across rows/columns
- Always read titles and axis labels before interpreting data
- Look for the highest and lowest values first
- Consider what the data represents in the real world
Q: How do I know if I'm interpreting data correctly?
A: Check that your interpretation makes logical sense and is supported by the visual elements.
Q: What if the data seems inconsistent?
A: Look for possible errors in the data or consider external factors that might explain anomalies.
Data cleaning: The process of detecting and correcting corrupt, inaccurate, or irrelevant records from a dataset
Note: Clean data is essential for accurate analysis and reliable insights.
- Scan the dataset for format inconsistencies
- Identify the type of inconsistency
- Determine appropriate standardization strategy
- Apply the cleaning method
Look for different formats within the same data type
Determine if it's format, capitalization, or encoding issues
Select a consistent format for all entries
Convert all entries to the chosen standard format
Data cleaning involves identifying and standardizing inconsistent formats in the dataset
• Format consistency: All entries of the same type should follow the same format
• Standardization: Choose one format and apply consistently
• Documentation: Record all cleaning steps taken
• Validation: Verify data integrity after cleaning
- Phone numbers: (123) 456-7890 vs 123-456-7890 vs 1234567890
- Names: JOHN SMITH vs John Smith vs john smith
- Addresses: 123 Main St vs 123 MAIN STREET vs 123 main st
- Always validate data against expected formats
- Look for patterns in inconsistencies that might indicate systematic issues
- Document all cleaning steps for reproducibility
Q: How do I handle different date formats?
A: Standardize to a single format like YYYY-MM-DD or MM/DD/YYYY.
Q: What if I have mixed data types in one column?
A: Either separate into different columns or convert to a consistent type.