Data types: Categories that specify which kind of value a variable has and what operations can be performed on it
Note: Common data types include categorical, numerical, ordinal, and nominal.
- Examine the values in the dataset
- Determine if values represent categories or quantities
- Identify if categories have a natural order (ordinal) or not (nominal)
- Classify numerical data as discrete or continuous
Sizes: Small, Medium, Large
Count: 1, 2, 3, 4, 5
Sizes: Ordinal
Count: Discrete
Look at "Red, Blue, Green" - these are color names
Colors represent categories, not quantities
Red, Blue, Green have no inherent order - nominal
Count values (1, 2, 3) are discrete integers
Colors are nominal categorical data; Sizes are ordinal categorical data; Count is discrete numerical data
• Nominal: Categories with no natural order (colors, names)
• Ordinal: Categories with a natural order (small, medium, large)
• Discrete: Countable numerical values (integers)
• Continuous: Measurable values that can take any value (height, weight)
- Nominal: Gender (Male, Female), Country (USA, Canada, Mexico)
- Ordinal: Education Level (High School, College, Graduate)
- Discrete: Number of Students (15, 20, 25)
- Continuous: Temperature (98.6°F, 101.2°F), Distance (3.5 miles)
- Nominal data cannot be ordered (colors, names)
- Ordinal data has a natural order (grades, sizes)
- 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
Favorite colors (Red, Blue, Green) are categorical data
Categorical data works well with bar charts and pie charts
Bar chart better for comparing values; pie chart for showing parts of whole
Bar chart is typically best for categorical comparisons
Bar charts are ideal for comparing categorical data like favorite colors
• Categorical data: Use bar charts, pie charts, or histograms
• Numerical data: Use line graphs, scatter plots, or histograms
• Relationships: Use scatter plots to show correlations
• Trends: Use line graphs to show changes over time
- Bar Chart: Sales by Region (categorical comparison)
- Line Graph: Temperature over Time (trend analysis)
- Scatter Plot: Height vs Weight (relationship analysis)
- Pie Chart: Budget Allocation (part-to-whole relationship)
- Bar charts: Best for comparing categories
- Line graphs: Best for showing trends over time
- Scatter plots: Best for showing relationships between variables
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.
Statistical measures: Mathematical measures that summarize and describe key features of a dataset
Note: Mean, median, and mode are measures of central tendency that represent typical values in a dataset.
- Organize the data in order
- Calculate the mean (average)
- Find the median (middle value)
- Determine the mode (most frequent value)
Sort the data: [5, 7, 7, 8, 9, 10, 10, 10]
Add all values and divide by count: (5+7+7+8+9+10+10+10) ÷ 8 = 66 ÷ 8 = 8.25
With 8 values (even), average the two middle values: (8+9) ÷ 2 = 8.5
Identify the most frequent value: 10 appears 3 times (most frequent)
Mean = 8.25, Median = 8.5, Mode = 10 for the given dataset
• Mean: Sum of all values divided by the number of values
• Median: Middle value when data is ordered; average of two middle values for even count
• Mode: Value that appears most frequently in the dataset
• Practice Tip: Always organize data first before calculating measures
- Mean: Test scores [85, 90, 78, 92] → (85+90+78+92) ÷ 4 = 86.25
- Median: Ages [25, 30, 35, 40, 45] → Middle value = 35
- Mode: Colors [Red, Blue, Red, Green, Red] → Mode = Red
- Mean is affected by extreme values (outliers)
- Median is resistant to outliers
- Mode may not exist or may have multiple values
Q: What if there's no mode in the data?
A: If all values appear with equal frequency, there is no mode.
Q: Can there be more than one mode?
A: Yes, if multiple values appear with the same highest frequency.
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 outliers in the data
Formulate insights based on the observed patterns
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
- 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.
- Identify missing values
- Detect outliers and inconsistencies
- Remove or correct invalid entries
- Standardize data formats
Find NULL, empty, or placeholder values in the dataset
Look for values that are unusually high or low (like age 150)
Remove or replace impossible values like age 150
Ensure all values follow the same format and standards
Data cleaning involves identifying and correcting issues like missing values and outliers
• Missing values: Look for NULL, empty cells, or placeholder values
• Outliers: Identify values that don't fit the expected range
• Invalid entries: Remove or correct impossible values
• Standardization: Ensure consistent formatting across the dataset
- Missing: Name field with "N/A" or blank entries
- Outliers: Temperature reading of 200°F in normal conditions
- Format: Phone numbers in different formats (some with dashes, some without)
- Always validate data against logical constraints (age limits, etc.)
- Look for patterns in missing data that might indicate systematic issues
- Document all cleaning steps for reproducibility
Q: Should I always remove outliers?
A: Not always. Sometimes outliers are valid data points that provide important insights.
Q: How do I handle missing values?
A: Options include removal, imputation (filling with average), or leaving as is depending on context.