Business Statistics Course Final

📚 Business Statistics Course Final (1).pdf

Brief overview

This document provides a comprehensive review of core business statistics concepts essential for data-driven decision-making. It covers the entire data analysis process from collection to interpretation, equipping readers with foundational analytical skills.

Key points

  • Overview of business statistics, learning objectives, and the DCOVA framework.
  • Exploration of data collection methods and various data types.
  • Detailed coverage of sampling techniques and data organization strategies.
  • Principles of data visualization and measures of central tendency.
  • Analysis of dispersion, shape, and bivariate relationships.

1. Introduction to business statistics and learning objectives (part 1)

1.1 What is business statistics?

  • Statistics: The science of collecting, organizing, analyzing, and interpreting data.

  • In business, statistics aids in:

    • Identifying market trends and customer behavior.
    • Improving operational efficiency.
    • Reducing decision-making risks.
    • Evaluating performance using key indicators.
  • The term "statistics" was introduced in English by John Sinclair in 1798.

  • It derives from the Latin "status," meaning "state" or "condition."

  • Informed decision-making: Making choices based on analyzed data, not intuition.

  • Performance evaluation: Measuring workplace morale and productivity.

  • Risk assessment: Calculating probabilities for services like insurance.

  • Market understanding: Tracking sales to identify popular products.

  • Quality improvement: Using statistical control to find defects.

  • Resource optimization: Analyzing data to improve routes and reduce costs.

Business statistics helps make better decisions using data.

  • Statistics (field of study) refers to the methods used to analyze data.

  • A statistic (numerical data) refers to numbers in tables or graphs.

  • Statistics (Field): The entire discipline of data analysis.

  • A Statistic (Data): A specific numerical value or set of values.

1.2 Data and variables in statistics

  • Data: Facts and information collected to understand phenomena.

  • It is the foundation for solving problems and making decisions.

  • Example: A company collects monthly sales figures to analyze performance.

  • Variable: A characteristic that can take different values.

  • It is what you measure or analyze in a dataset.

  • Variables are essential for statistical modeling.

Variable TypeExample
Quantitative (Continuous)Age (25.5 years)
Quantitative (Discrete)Number of employees (10 people)
Qualitative (Ordinal)Customer satisfaction (Satisfied, Neutral, Dissatisfied)
Qualitative (Nominal)Eye color (Blue, Green, Brown)
  • A variable is the characteristic being measured.
  • Data are the actual values collected for that variable.

1.3 Populations and samples

  • Population: All items or individuals you want to draw conclusions about.

  • This is the entire group of interest.

  • Sample: A portion of the population selected for analysis.

  • This is a smaller, representative group.

Population is the whole; sample is a part of the whole.

1.4 The DCOVA framework for data analysis

  • The DCOVA framework provides a step-by-step process for data analysis.

  • It guides you from defining variables to reaching conclusions.

  • Define: Identify the variables for which you want to draw conclusions.

  • Collect: Gather data from appropriate sources.

  • Organize: Arrange the collected data into tables.

  • Visualize: Create charts to represent the data.

  • Analyze: Examine tables and charts to reach conclusions.

DCOVA: Define, Collect, Organize, Visualize, Analyze.

  • Define variables of interest.
  • Collect data from sources.
  • Organize data into tables.
  • Visualize data with charts.
  • Analyze to draw conclusions.

Data organization involves creating tables to structure information. Data visualization uses charts to present data graphically.

This table displays the number of student enrollments at the Faculty of Law, Economics, and Social Sciences, SOUISSI Souissi for the years 2022, 2023, and 2024.

  • Enrollment Year: 2022, 2023, 2024.
  • Number of Enrollments: 500, 700, 900.

This table is an example of organized data.

🔑 Important: The DCOVA framework is a standard process for conducting statistical analysis in business.

🔑 Important: Understanding the difference between a population and a sample is crucial for interpreting statistical results correctly.

2. Introduction to business statistics and learning objectives (part 2)

2.1 Descriptive and inferential statistics

  • Descriptive statistics: These procedures use gathered data to describe or draw conclusions about only the group from which the data was collected. They help summarize and present data.
  • Inferential statistics: These procedures use sample data to draw conclusions about a larger population from which the sample was taken. They involve making estimates about population parameters based on sample statistics.

Descriptive statistics summarize the known group; inferential statistics estimate the unknown population.

2.1.1 Descriptive procedures

  • Collect data through methods like surveys, observations, or experiments.
  • Present data using visual aids such as charts and graphs.
  • Describe data using measures like the sample mean 25.

A line graph can visually represent data trends over time, showing an upward trend in percentage from 1994 to 1997. A line graph shows an upward trend in percentage over years from '94 to '97.

2.1.2 Inferential procedures

  • Inferential statistics involve making statements about a population by examining sample results.
  • Sample statistics, which are known, are used to estimate unknown population parameters.
  • This process of inference allows us to generalize findings from a sample to the broader population.

2.2 Applying the concepts: Attendance and grades

  • A study examined the relationship between student attendance and grades 27.
  • Variables: Attendance Rate (%) and Grade (Score out of 20). 28.
  • Data: Students' attendance percentages and their corresponding grades.
  • Statistics used: Both descriptive (summarizing patterns) and inferential (suggesting attendance impacts grades) statistics were applied 29.
  • Population: Students at the Faculty of Law, Economics, and Social Sciences Souissi.
  • Sample: A sample of students from this faculty was collected.
  • Relationship: A positive relationship was found; higher attendance generally led to higher grades 30.

Higher attendance correlates with higher grades.

2.3 Applying the concepts: Business statistics

  • A study at Marjane Company explored the link between customer satisfaction and sales 31.
  • Variables: Customer satisfaction (quantitative, continuous) and Sales (quantitative, continuous).
  • Data: Customer satisfaction ratings and corresponding sales figures.
  • Statistics used: Descriptive statistics summarized trends; inferential statistics could draw broader conclusions.
  • Population: All stores in the Marjane Company.
  • Sample: Likely a sample of stores was used, though not explicitly stated.
  • Relationship: A positive correlation exists; higher customer satisfaction generally leads to higher sales 32.

Higher customer satisfaction leads to higher sales.

🔑 Important: Understanding the difference between descriptive and inferential statistics is crucial for interpreting data and drawing valid conclusions in business scenarios. 24 26. </document_content>

3. Data collection and types

Data collection is vital for informed business decisions. The quality of collected data directly impacts analysis accuracy and reliability.

Data can be gathered from two main sources: primary and secondary 33.

3.1 Data sources

3.1.1 Primary data

Primary data is information collected firsthand for a specific research purpose. Common methods include surveys, interviews, observations, and experiments.

For instance, a company might conduct a customer satisfaction survey to gauge brand perception 34.

Procedures for collecting primary data can involve censuses, written questionnaires, telephone surveys, or direct observation and personal interviews 35.

3.1.2 Secondary data

Secondary data is information that has already been collected by others for different purposes. It is readily available in various sources like financial statements, government reports, industry publications, academic research, and online databases.

An example is using World Bank reports to analyze economic trends 36.

Key sources for secondary data include:

SourceWebsite Link
The World Bankdata.worldbank.org
International Monetary Funddata.imf.org
Yahoo Financefinance.yahoo.com
Our World in Dataourworldindata.org

3.1.3 Primary vs. Secondary data comparison

CriteriaPrimary DataSecondary Data
Collected byResearcher (firsthand)External sources
PurposeSpecific to the studyCollected for other research
CostHigh (time & money)Low (readily available)
Time RequiredLongShort
AccuracyHigh (if collected properly)May require validation

3.2 Data types

Data can be broadly classified into two main types: quantitative and qualitative.

Data TypeDescriptionExamples
QuantitativeMade of numbersAge, weight, number of children, shoe size
QualitativeMade of wordsEye colour, gender, blood type, ethnicity

3.2.1 Quantitative data subtypes

Quantitative data, which consists of numbers, can be further divided into discrete and continuous types.

SubtypeDescriptionExamples
DiscreteFinite options (countable)Shoe size, number of children
ContinuousInfinite options (measurable)Age, weight, blood pressure

3.2.2 Qualitative data subtypes

Qualitative data, made of words, is classified into nominal and ordinal types, based on the presence or absence of a hierarchy.

SubtypeDescriptionExamples
NominalData has no hierarchyEye colour, dog breed, blood type
OrdinalData has a hierarchyPain severity, satisfaction rating, mood

3.2.3 Exercise: Retail sales data

A retail company tracks sales revenue, customer satisfaction ratings, store location, and the number of daily customers.

  • Quantitative Data:

    • Total sales revenue (numerical).
    • Customer satisfaction ratings (numeric values from 1 to 10).
    • Number of customers visiting (a count).
  • Qualitative Data:

    • Store location (North, South, East, West - a category).
  • Discrete Data (countable whole numbers):

    • Number of customers visiting.
    • Customer satisfaction ratings (typically on a fixed scale).
  • Continuous Data (can take any value, measurable):

    • Total sales revenue (can have decimal values).

The store location data (North, South, East, West) is nominal. These categories have no inherent ranking or order, they are simply labels 43.

3.2.4 Exercise: Accidents per transportation mode

The following table shows the number of accidents by transportation mode in Morocco for 2024.

This table displays the number of accidents per transportation mode in Morocco for the year 2024.

  • Variables under study: Number of accidents and transportation mode.
  • Quantitative Variable: Number of accidents (discrete, ratio level).
  • Qualitative Variable: Transportation modes (nominal level).

While trains (ONCF) show the lowest number of accidents this doesn't definitively prove they are the safest overall. Factors like usage frequency or distance traveled should also be considered .

🔑 Important: Understanding data types (quantitative/qualitative, discrete/continuous, nominal/ordinal) is crucial for selecting appropriate analysis methods and interpreting results correctly. 45 46.

4. Sampling techniques and data organization (part 1)

4.1 Sampling methods

Collecting primary data requires a clear understanding of the target population and the selection of an appropriate sampling method. A sample is a subset of the population.

Using a sample allows researchers to make inferences about the entire population.

4.1.1 Bias in sampling

Bias is a systematic error in data collection or analysis. Selection bias occurs when the sample is not representative of the population.

This happens if some individuals have a higher or lower chance of being chosen. A representative sample ensures that the sample characteristics mirror those of the population.

4.1.2 Types of sampling

Sampling techniques are broadly divided into non-statistical and statistical methods. Non-statistical methods rely on researcher judgment, while statistical methods use probabilities.

Sampling TypeDescription
Non-statisticalMethods not based on known or calculable probabilities.
StatisticalItems are chosen based on known or calculable probabilities.

50.

4.1.2.1 Non-statistical sampling

  • Convenience sampling: Data is collected in the most convenient way for the researcher. This often involves selecting individuals who are easily accessible.

  • Judgment sampling (also called purposive sampling): The researcher uses their judgment to select individuals who are most likely to provide the needed information. This method relies on the researcher's knowledge of the population.

4.1.2.2 Statistical sampling

Statistical sampling, also known as probability sampling, ensures that sample members are chosen based on known probabilities. This reduces bias and increases the generalizability of the results.

  • Simple random sampling (SRS): Every possible sample of a given size has an equal chance of being selected. This can be done using random number tables or computer generators.

  • Stratified random sampling: The population is divided into subgroups, called strata, based on a shared characteristic. A simple random sample is then taken from each stratum.

  • Systematic random sampling: Sample members are selected from a larger population with a random starting point and a fixed, periodic interval. The interval (kk) is calculated by dividing the population size (NN) by the desired sample size (nn).

  • Cluster sampling: The population is divided into clusters, with each cluster aiming to be representative of the population. A random sample of clusters is then selected.

SRS, Stratified, Systematic, and Cluster are the main statistical sampling methods. [ 61] 54.

4.1.3 Summary of sampling methods

MethodDescription
RandomSubjects are selected using random numbers.
SystematicSubjects are selected using every kkth number after a random start.
StratifiedPopulation divided into strata, then subjects randomly selected within each group.
ClusterSubjects selected using an intact group (cluster) representative of the population.

61.

4.2 Data organization

Raw data is collected information in its original, often unorganized form. Interpreting raw data directly can be difficult due to its lack of structure.

4.2.1 Frequency distribution

A frequency distribution is a method of organizing data to show how often each value or category occurs. It simplifies large datasets into a clear format, typically a table or chart, making patterns easier to identify.

📝 Example: Raw data on transportation accidents might show a list of accident counts per mode. A frequency distribution would group these counts to show how many times each specific count (e.g., 10 accidents, 20 accidents) appears.

  • Personal Cars and Taxis have the highest number of accidents.
  • Airlines (RAM) have the lowest number of accidents.
  • Intercity Buses have more accidents than Trains (ONCF).

[ 66] 44.

🔑 Important: Organizing raw data into a frequency distribution is crucial for making sense of collected information and identifying trends. 66.

5. Sampling techniques and data organization (part 2)

5.1 Frequency distributions

Frequency distributions organize raw data. They show how often each value or category appears.

This helps in understanding the data's pattern.

5.1.1 Categorical frequency distributions

Categorical data involve distinct groups or labels. You create a frequency distribution by listing each category.

Then, you count how many times each category appears.

  • Class: The categories or groups in the data.
  • Tally: Marks used to count data points within each class.
  • Frequency: The total count of data points for each class.
  • Percent: The proportion of each class's frequency relative to the total data.

The formula to calculate the percentage for a class is: Percent=FrequencyTotal Number of Values×100%\text{Percent} = \frac{\text{Frequency}}{\text{Total Number of Values}} \times 100\%

Here's an example of a completed categorical frequency distribution:

ClassTallyFrequencyPercent
AIIII520%
BIIII II728%
OIIII IIII936%
ABIIII416%

A frequency distribution table showing classes, tally marks, frequencies, and percentages.

Another example shows trust levels in internet information:

Trust LevelDescriptionFrequencyPercentage (%)
ATrust in everything they read410%
MTrust in most of what they read2870%
HTrust in about half of what they read615%
STrust in a small portion of what they read25%

This table displays the frequency and percentage of different trust levels in what people read.

5.1.2 Grouped frequency distributions

Grouped frequency distributions are used for quantitative data. You group data into numerical ranges called classes.

This simplifies large datasets.

Steps to create a grouped frequency distribution:

  1. Find the highest and lowest values: Identify the maximum and minimum values in your dataset.
  2. Calculate the range: Subtract the lowest value from the highest value (R=H−LR = H - L).
  3. Select the number of classes: Choose a reasonable number of classes, typically between 5 and 20.
  4. Find the class width: Divide the range by the number of classes and round up to the nearest whole number (Class width=RNumber of classes\text{Class width} = \frac{R}{\text{Number of classes}}).
  5. Determine the class limits: Start with a convenient lower limit (often the lowest data value) and add the class width to create each class interval.
  6. Tally the data: Count how many data points fall into each class interval.
  7. Calculate frequencies and percentages: Sum the tallies for each class to get the frequency. Calculate percentages using the formula from section 5.1.1.
  8. Calculate cumulative frequency and percentage: Sum frequencies up to each class for cumulative frequency. Do the same for percentages.

Here is an example of a grouped frequency distribution for record high temperatures:

Class LimitsClass BoundariesTallyFrequency
100-10499.5-104.5II2
105-109104.5-109.5IIII IIII8
110-114109.5-114.5IIII IIII IIII III18
115-119114.5-119.5IIII IIII IIII13
120-124119.5-124.5IIII II7
125-129124.5-129.5I1
130-134129.5-134.5I1

The class boundaries are used to avoid overlap between adjacent classes.

An example for the ages of wealthy people:

Class IntervalFrequency (f)Cumulative FrequencyPercentage (%)Cumulative Percentage (%)
37 - 444488
45 - 526101220
53 - 609191838
61 - 6811302260
69 - 7610402080
77 - 846461292
85 - 924508100

5.2 Data structures

Data can be organized into different structures based on how it is collected. These structures help in analyzing relationships and trends.

5.2.1 Time series data

Time series data consists of observations collected over a period of time. The order of observations is crucial.

  • Time Series Data: Ordered data values observed over time.

This line chart displays the historical price of Bitcoin in U.S. Dollars from 2015 to 2024.

This Bitcoin price chart shows how its value changed over several years. This is a classic example of time series data.

5.2.2 Cross-sectional data

Cross-sectional data involves observations collected at a single point in time. It captures a snapshot of different entities at the same moment.

  • Cross-sectional Data: Data values observed at a single point in time.

This table shows sales data for different cities in a specific year. It represents cross-sectional data.

City2003200420052006
Atlanta435460475490
Boston320345375395
Cleveland405390410395
Denver260270285280

This table displays sales data in thousands of dollars for four cities (Atlanta, Boston, Cleveland, Denver) across four years (2003-2006).

The popularity of cryptocurrencies in 2022 is also an example of cross-sectional data.

CryptocurrencyPopularity
Bitcoin (BTC)80%
Ethereum (ETH)51%
Dogecoin (DOGE)23%
Litecoin (LTC)23%
Ripple (XRP)23%

This horizontal bar chart displays the popularity of different cryptocurrencies in 2022.

A table showing cross-sectional data structure might look like this:

Entity index (i)Time (t)Observed variable yObserved variable x
11y1,1y_{1,1}x1,1x_{1,1}
21y2,1y_{2,1}x2,1x_{2,1}
31y3,1y_{3,1}x3,1x_{3,1}

This table illustrates the structure of cross-sectional data with columns for entity index (i), time (t), and observed variables (y and x).

5.2.3 Panel data

Panel data, also known as longitudinal data, combines features of both time series and cross-sectional data. It tracks multiple entities over time.

  • Panel Data: Data that observes multiple entities over several time periods.

Panel data allows for more complex analysis. It can account for individual differences between entities and how they change over time.

🔑 Important: Frequency distributions help organize raw data. Data structures like time series, cross-sectional, and panel data define how observations are related by entity and time.

6. Sampling techniques and data organization (part 3)

6.1 Data structures: Time series, cross-sectional, and panel data

Data can be organized into distinct structures based on how observations are collected. Understanding these structures is key to appropriate analysis.

  • Time series data: This structure tracks a single entity over multiple points in time. It records changes and trends for one subject.
  • Cross-sectional data: This structure observes different entities at a single point in time. It allows comparisons across subjects.
  • Panel data: This structure combines both time series and cross-sectional aspects. It tracks multiple entities over multiple time periods.

The World Bank DataBank provides access to various datasets, such as market capitalization of listed domestic companies. This data can be visualized and analyzed across different structures.

This line chart displays the market capitalization of listed domestic companies (current US dollars) over time, from 1975 to 2020. This line chart displays the market capitalization of listed domestic companies (current USUSD) over time, from 1975 to 2020.

This data is sourced from the World Federation of Exchanges database and is licensed under CC BY-4.0. Such global data helps illustrate different data structures.

6.1.1 Time series data examples

Time series data focuses on one entity observed across different time periods. For instance, tracking a company's stock market value over several years falls into this category.

The table below illustrates time series data. It shows a specific entity, labeled 'i', observed over various time periods, labeled 't'.

The corresponding observed values are denoted by 'y' and 'x'.

A table illustrating time series data, showing an entity 'i' observed across different time periods 't' with corresponding values 'y' and 'x'.

Here is an example of market capitalization data for Morocco from 2010 to 2022. This represents a time series.

This line chart displays the market capitalization of listed domestic companies in Morocco from 2010 to 2022. This line chart displays the market capitalization of listed domestic companies in Morocco from 2010 to 2022.

Data Structure Comparison: Time Series

AttributeDescription
EntitySingle entity observed (e.g., one company)
TimeMultiple time periods
ObservationTracks changes and trends of the entity
ExampleStock prices of a company over five years

6.1.2 Cross-sectional data examples

Cross-sectional data examines different entities at a specific moment. This allows for comparisons between these entities.

Consider observing the market capitalization of several companies on the same day. This scenario exemplifies cross-sectional data.

This chart displays the market capitalization of listed domestic companies in Morocco from 2018 to 2023. This focuses on a specific period across entities. This chart displays the market capitalization of listed domestic companies in Morocco from 2018 to 2023.

Here is an example of market capitalization for different North African countries in 2022. This data captures a snapshot across multiple entities.

Data Structure Comparison: Cross-sectional

AttributeDescription
EntityMultiple entities observed
TimeSingle point in time
ObservationCompares different subjects at one moment
ExampleStock prices of different companies on one day

6.1.3 Panel data examples

Panel data merges time series and cross-sectional observations. It tracks multiple entities over a period, offering a richer dataset.

This is useful for analyzing how variables change for different subjects over time. For instance, tracking stock prices for multiple companies over several years.

The structure of panel data combines observations for different individuals (i) across different time periods (t). Each row represents a unique observation for a specific individual at a specific time.

A table illustrating the structure of panel data, showing observations for different individuals (i) over different time periods (t) with corresponding y and x values.

An example would be observing the market capitalization of North African countries from 2010 to 2023. This tracks multiple entities over an extended period.

Data Structure Comparison: Panel Data

AttributeDescription
EntityMultiple entities observed
TimeMultiple time periods
ObservationTracks multiple subjects over time
ExampleStock prices of multiple companies over five years

🔑 Important: Panel data offers a more comprehensive view than pure time series or cross-sectional data, allowing for analysis of both individual differences and temporal trends.

📝 Example: An analyst wants to study the impact of interest rate changes on company profitability across several countries over a decade. This would require panel data, observing multiple companies in multiple countries over those ten years.

7. Data visualization and measures of central tendency (part 1)

7.1 Visualizing data

Data visualization uses graphs and charts to represent data. This makes complex information easier to understand.

It also helps reveal trends and patterns. Effective visualization simplifies decision-making and can persuade or engage an audience.

The four key elements of data visualization are:

  • Audience: Tailor content to who you are presenting to.
  • Goals: Set clear objectives before creating visuals.
  • Chart Type: Select the right chart for the data and purpose.
  • Color Theory: Use a color scheme that enhances understanding.

Visualization is key to making data clear and actionable.

7.2 Visualizing categorical data

Categorical data deals with distinct groups or labels.

7.2.1 Bar charts

A bar chart uses rectangular bars to show data for different categories. The height or length of each bar represents the frequency or value of that category.

This is useful for comparing qualitative data.

![A bar chart illustrating banking preferences, showing the percentage of respondents for each banking method.](https://ixscdoswnqhohheqmami.supabase.co/storage/v1/object/public/documents/892d6eba-3d41-4c4c-b634-b64bb6337f76/courses/d1ea5273-d029-4541-b7b3-cd325621f36a/figures/72971746-775c-4530-8b67-d92293ff5b76/fig_106_01_e8ad69e2b63c.jpg)

7.2.2 Pie charts

A pie chart is a circle divided into slices. Each slice represents a category's proportion of the whole.

The total percentage of all slices must sum to 100%.

![A pie chart illustrating banking preferences, with each slice representing a different banking method and its corresponding percentage.](https://ixscdoswnqhohheqmami.supabase.co/storage/v1/object/public/documents/892d6eba-3d41-4c4c-b634-b64bb6337f76/courses/d1ea5273-d029-4541-b7b3-cd325621f36a/figures/72971746-775c-4530-8b67-d92293ff5b76/fig_108_01_e2d36d86baeb.jpg)

Bar charts compare categories side-by-side; pie charts show parts of a whole.

7.3 Visualizing numerical data

Numerical data involves quantities or measurements.

7.3.1 Histograms

A histogram uses touching bars to display how often data falls into specific ranges or classes. Taller bars indicate higher frequencies within those ranges.

It shows the frequency distribution of numerical data.

![A histogram showing the frequency distribution of student ages.](https://ixscdoswnqhohheqmami.supabase.co/storage/v1/object/public/documents/892d6eba-3d41-4c4c-b634-b64bb6337f76/courses/d1ea5273-d029-4541-b7b3-cd325621f36a/figures/72971746-775c-4530-8b67-d92293ff5b76/fig_109_01_751e157af013.jpg)

7.3.2 Frequency polygons

A frequency polygon is a line graph that connects points. These points represent frequencies at the midpoints of data classes.

It offers a smooth representation of data distribution.

![A frequency polygon showing record high temperatures.](https://ixscdoswnqhohheqmami.supabase.co/storage/v1/object/public/documents/892d6eba-3d41-4c4c-b634-b64bb6337f76/courses/d1ea5273-d029-4541-b7b3-cd325621f36a/figures/72971746-775c-4530-8b67-d92293ff5b76/fig_111_01_3646bfe11af8.jpg)

Histograms show frequency in ranges; frequency polygons show frequency at class midpoints.

7.3.3 Ogives (cumulative frequency graphs)

An ogive graphs cumulative frequencies, showing the running total of observations up to a certain value. The y-axis represents the cumulative frequency, and the x-axis represents the data values or class boundaries.

This graph illustrates the distribution of data.

![This line graph, also known as an ogive, displays the cumulative frequencies of record high temperatures.](https://ixscdoswnqhohheqmami.supabase.co/storage/v1/object/public/documents/892d6eba-3d41-4c4c-b634-b64bb6337f76/courses/d1ea5273-d029-4541-b7b3-cd325621f36a/figures/72971746-775c-4530-8b67-d92293ff5b76/fig_112_01_59dab22269ab.jpg)

![This line graph, known as an ogive, displays the cumulative frequencies of record high temperatures.](https://ixscdoswnqhohheqmami.supabase.co/storage/v1/object/public/documents/892d6eba-3d41-4c4c-b634-b64bb6337f76/courses/d1ea5273-d029-4541-b7b3-cd325621f36a/figures/72971746-775c-4530-8b67-d92293ff5b76/fig_113_01_4210fa237a8d.jpg)

7.4 Measures of central tendency

Measures of central tendency describe the center or typical value of a dataset. They are key components of descriptive statistics.

The main measures are the mean, median, and mode. These help summarize data and draw conclusions about business contexts.

Central tendency measures indicate a dataset's typical value.

7.4.1 The mean

The arithmetic mean is the most common measure of central tendency. It is calculated by summing all observed values and dividing by the total number of observations.

For a sample of size nn, the mean (xˉ\bar{x}) is calculated as:

xˉ=∑i=1nxin\bar{x} = \frac{\sum_{i=1}^{n} x_i}{n}

  • xix_i: The ithi^{th} observed value.
  • nn: The sample size.

The mean is the average value, sensitive to outliers.

🔑 Important: The mean is calculated by summing all values and dividing by the count of values.

8. Data visualization and measures of central tendency (part 2)

8.1 Measures of central tendency: the mean

  • Mean definition: the sum of all values divided by the total number of values.
  • Formula: Mean=∑i=1nxin\text{Mean} = \frac{\sum_{i=1}^{n} x_i}{n} 134.
  • Pros: Simple to calculate and understand.
  • Cons: Highly sensitive to extreme values called outliers.
  • Outlier definition: a data point that is significantly different from other observations.

🔑 Important: The mean is useful for symmetric data but can be misleading with skewed data due to outliers.

8.1.1 Mean calculation example

Scenario: TechGear Ltd. monthly sales revenue (in thousands of dollars) for eight months: 75, 85, 78, 90, 95, 200, 88, 80.

The target is 100 thousand dollars.

  • Mean monthly revenue: Summing all values gives 791. Dividing by 8 months results in 98.875 thousand dollars 123.
  • Comparison to target: The mean revenue (98.875 thousand dollars) is slightly below the 100 thousand dollar target.
  • Outlier identification: The 200 thousand dollar figure appears to be an outlier.
  • Mean without outlier: Removing 200, the sum of the remaining seven months is 591. The new mean is 591 / 7 = 84.43 thousand dollars.
  • Effect of outlier: The outlier significantly inflated the mean, making performance look better than it was for most months.

🔑 Important: Relying solely on the mean can mask performance issues if outliers are present.

8.1.2 Mean for comparative analysis

Comparing sales revenue for the first four months (75, 85, 78, 90) versus the last four months (95, 200, 88, 80).

  • Mean of first four months: (75 + 85 + 78 + 90) / 4 = 328 / 4 = 82 thousand dollars.
  • Mean of last four months: (95 + 200 + 88 + 80) / 4 = 463 / 4 = 115.75 thousand dollars.
  • Trend indication: The mean of the last four months is higher. This suggests an increasing trend, largely due to the outlier in July 124.

8.1.3 Mean for group comparison

Examining final exam scores (out of 20) for male and female students.

  • Male student scores: 14, 16, 18, 17, 15, 13, 19, 12, 16, 17. Sum = 157. Mean = 15.7.
  • Female student scores: 17, 18, 19, 18, 16, 17, 20, 15, 14, 17. Sum = 171. Mean = 17.1 125.
  • Interpretation: The mean score for female students (17.1) is higher than for male students (15.7), indicating better performance on average for the female group 126.

8.2 Measures of central tendency: the median

  • Median definition: the middle value in a dataset that has been ordered from smallest to largest.
  • It represents the point where 50% of the data falls below and 50% falls above.
  • The median is not affected by extreme values (outliers).

🔑 Important: The median is a robust measure, making it suitable for skewed distributions where the mean might be misleading.

8.2.1 Locating the median

The position of the median in an ordered dataset is found using the formula:

Median position=n+12\text{Median position} = \frac{n+1}{2}

where nn is the number of data points.

  • Odd number of data points (nn): The median is the single middle value. For 9 students, the position is (9+1)/2 = 5th value.
  • Even number of data points (nn): The median is the average of the two middle values. For 10 students, the positions are (10+1)/2 = 5.5, meaning the average of the 5th and 6th values.

🔑 Important: The formula calculates the position of the median, not its value 128.

8.2.2 Median calculation example

Test scores of 9 students (out of 20): 12, 18, 15, 10, 14, 17, 13, 16, 19.

  1. Sort data: 10, 12, 13, 14, 15, 16, 17, 18, 19.
  2. Identify median: With 9 data points, the median is the (9+1)/2 = 5th value.
  3. Median score: 15.

Now, add a 10th student with a score of 11.

  1. Sort data: 10, 11, 12, 13, 14, 15, 16, 17, 18, 19.
  2. Identify median: With 10 data points, the median is the average of the (10+1)/2 = 5.5 positions, i.e., the 5th and 6th values.
  3. Median score: (14 + 15) / 2 = 14.5 129.

8.3 Measures of central tendency: the mode

  • Mode definition: the value that appears most frequently in a dataset.
  • It can be used with both numerical and categorical data.
  • A dataset can have:
    • No mode: If all values occur with the same frequency.
    • One mode (unimodal): If one value occurs most often.
    • Several modes (bimodal, multimodal): If multiple values share the highest frequency.
  • The mode is not affected by extreme values.

🔑 Important: The mode is particularly useful for identifying the most common category or value in nominal data 130 135.

8.3.1 Mode calculation example

Math test scores of 10 students (out of 20): 12, 15, 14, 15, 10, 17, 15, 14, 13, 15.

  • Identify frequencies:
    • 10: 1 time
    • 12: 1 time
    • 13: 1 time
    • 14: 2 times
    • 15: 4 times
    • 17: 1 time
  • Mode: The score 15 appears most frequently (4 times).
  • Teacher's interpretation: The most common performance level in the class is a score of 15 131.

8.4 Comparing measures of central tendency

MeasureDefinitionAffected by Outliers?Data Type ApplicableUse Case
MeanAverage of all valuesYesNumerical (Interval/Ratio)Symmetric data, when all values are important.
MedianMiddle value in ordered dataNoNumerical (Ordinal/Interval/Ratio)Skewed data, when outliers are present, for home prices.
ModeMost frequent valueNoNumerical & CategoricalIdentifying most common category, preferred option, or peak in distribution.

8.5 Choosing the right measure

The choice of central tendency measure depends on several factors:

  • Objective of study: What are you trying to understand about the data?
  • Type of data: Qualitative (categorical) vs. Quantitative (numerical).
  • Data distribution: Symmetric or skewed.
Data TypeMeanMedianMode
QualitativeApplicable to binary data onlyNot applicableIdentifies most frequent category.
QuantitativeFor interval/ratio data (symmetric).Useful for skewed data or with outliers.Identifies most frequent numerical value (may not be meaningful).

🔑 Important: Central tendency measures alone do not describe data spread or variability; dispersion measures are also needed for a complete picture 133.

8.6 Analyzing sales data using descriptive statistics in Excel

This scenario involves using Excel functions to calculate mean, median, and mode for sales data across multiple stores.

  • Data Import: Load sales figures for 10 stores over 6 months into Excel.
  • Calculate Mean: Use the =AVERAGE() function for each store's sales range.
  • Calculate Median: Use the =MEDIAN() function for each store's sales range.
  • Calculate Mode: Use the =MODE() function for each store's sales range.

The analysis would then involve creating a summary table of these statistics per store and visualizing the data with charts.

🔑 Important: Excel functions like AVERAGE(), MEDIAN(), and MODE() automate the calculation of central tendency measures, aiding in quick data analysis 137 138.

🔑 Important: For exam readiness, understand the properties and applications of mean, median, and mode, especially their sensitivity to outliers and suitability for different data types and distributions.

9. Measures of dispersion and shape, bivariate analysis (part 1)

9.1 Understanding variation

Variation describes how much data points in a set differ from each other. A small variation means data points are close together.

A large variation means they are spread out.

Variation is the essence of diversity in data.

9.1.1 Measures of dispersion

These measures quantify the spread or variability of data values. Key measures include range, variance, standard deviation, and interquartile range.

MeasureDescription
RangeDifference between the largest and smallest values.
VarianceAverage of squared deviations from the mean.
Standard DeviationSquare root of the variance, same units as data.

9.2 The Range

The range is the simplest measure of dispersion. It is calculated by subtracting the smallest value from the largest value in a dataset.

  • Calculation: Range = X_largest - X_smallest
  • Limitation: It is sensitive to outliers and ignores the distribution of other data points.

Range offers a quick but potentially misleading overview of spread.

9.3 Variance and Standard Deviation

Variance and standard deviation measure the average distance of data points from the mean. They provide a more robust understanding of data spread than the range.

9.3.1 Sample variance

The sample variance (s2s^2) is the average of the squared differences between each data point and the sample mean. It uses n−1n-1 in the denominator to provide a better estimate of the population variance.

  • Formula: s2=∑i=1n(xi−xˉ)2n−1s^2 = \frac{\sum_{i=1}^{n}(x_i - \bar{x})^2}{n-1}
    • s2s^2: sample variance
    • xix_i: the ithi^{th} value
    • xˉ\bar{x}: the sample mean
    • nn: the sample size

9.3.2 Sample standard deviation

The sample standard deviation (ss) is the square root of the sample variance. It is the most commonly used measure of variation because it has the same units as the original data, making it easier to interpret.

  • Formula: s=∑i=1n(xi−xˉ)2n−1s = \sqrt{\frac{\sum_{i=1}^{n}(x_i - \bar{x})^2}{n-1}}
  • Interpretation: A smaller standard deviation indicates data points are clustered closely around the mean. A larger standard deviation indicates data points are more spread out.

Standard deviation is the "average distance" of data from the mean.

9.3.3 Comparing standard deviations

When comparing standard deviations:

  • A smaller standard deviation means less variation. Data points are closer to the mean.
  • A larger standard deviation means more variation. Data points are further from the mean.

9.4 Coefficient of Variation (C.V.)

The coefficient of variation measures relative variability. It is the ratio of the standard deviation to the mean, expressed as a percentage.

This helps compare variability between datasets with different means and units.

  • Formula: C.V.=(σxˉ)×100%C.V. = \left(\frac{\sigma}{\bar{x}}\right) \times 100\%
    • σ\sigma: standard deviation
    • xˉ\bar{x}: mean

9.5 Numerical descriptive measures for a population

Population parameters use Greek letters. These describe the entire population, unlike sample statistics.

ParameterSymbolDescription
Population meanμ\muSum of all population values divided by population size (NN).
Population varianceσ2\sigma^2Average of squared deviations from the population mean.
Population standard deviationσ\sigmaSquare root of the population variance.
  • Population Mean Formula: μ=∑i=1NxiN\mu = \frac{\sum_{i=1}^{N}x_i}{N}

Population parameters describe the whole group; sample statistics estimate them.

9.6 Using Excel for descriptive statistics

Microsoft Excel can compute various descriptive statistics, including measures of dispersion.

  • Functions: AVERAGE, MEDIAN, STDEV, VAR, MIN, MAX, RANGE.
  • Data Analysis Tool: The "Descriptive Statistics" tool provides a comprehensive summary including mean, standard deviation, variance, range, and more.

🔑 Important: Excel's Data Analysis ToolPack simplifies calculating multiple dispersion measures simultaneously.

📝 Example: To find the standard deviation of a dataset in cells A2:A6, use the STDEV(A2:A6) function.

📝 Example: The Excel output for house prices shows a mean of 600,000 dollars and a standard deviation of 800,000 dollars, indicating high dispersion.

🔑 Important: When comparing datasets, use standard deviation for similar scales and the coefficient of variation for different scales.

10. Measures of dispersion and shape, bivariate analysis (part 2)

10.1 Measures of dispersion

Measures of dispersion quantify the spread or variability within a dataset. They tell us how much the data points differ from each other or from a central value like the mean.

  • Population variance (σ2\sigma^2): This is the average of the squared differences between each data point and the population mean. σ2=∑i=1N(Xi−μ)2N\sigma^2 = \frac{\sum_{i=1}^{N} (X_i - \mu)^2}{N} Where μ\mu is the population mean and NN is the population size.

  • Population standard deviation (σ\sigma): This is the square root of the population variance. It is the most common measure of variation and has the same units as the original data. σ=∑i=1N(Xi−μ)2N\sigma = \sqrt{\frac{\sum_{i=1}^{N} (X_i - \mu)^2}{N}}

  • Sample statistics: These are used to estimate population parameters.

MeasurePopulation ParameterSample Statistic
Mean$\mu$$\bar{X}$
Variance$\sigma^2$$s^2$
Standard Deviation$\sigma$$s$

10.2 Measures of shape: Quartiles and the IQR

Quartiles divide a ranked dataset into four equal parts. They help describe the spread and shape of the distribution.

  • Quartiles: These mark points where 25% of data falls below or above them.

    • Q1 (First Quartile): 25% of observations are smaller.
    • Q2 (Second Quartile): This is the median; 50% of observations are smaller.
    • Q3 (Third Quartile): 75% of observations are smaller.
  • Locating Quartiles: Use these formulas on ranked data.

    • Q1 position: (n+1)/4(n+1)/4
    • Q2 position: (n+1)/2(n+1)/2
    • Q3 position: 3(n+1)/43(n+1)/4 Where nn is the number of observations.
  • Calculation Rules:

    • If the position is a whole number, use that ranked value.
    • If the position is a fractional half (e.g., 2.5), average the two nearest values.
    • If the position is not a whole number or half, round to the nearest integer to find the ranked position.

📝 Example: For data (n=9): 11, 12, 13, 16, 16, 17, 18, 21, 22

  • Q1 position: (9+1)/4 = 2.5. Q1 = (12+13)/2 = 12.5
  • Q2 position: (9+1)/2 = 5. Q2 = 16
  • Q3 position: 3(9+1)/4 = 7.5. Q3 = (18+21)/2 = 19.5
  • Interquartile Range (IQR): This measures the spread of the middle 50% of the data. It is calculated as Q3−Q1Q3 - Q1. The IQR is a resistant measure, meaning it is not affected by outliers.

  • Five-number summary: This is a set of five key values that describe a dataset.

    • Minimum value (XsmallestX_{smallest})
    • First Quartile (Q1)
    • Median (Q2)
    • Third Quartile (Q3)
    • Maximum value (XlargestX_{largest})

10.3 Boxplots and distribution shape

A boxplot is a graphical representation of the five-number summary. It provides a visual way to understand the center, spread, and shape of a distribution.

  • Boxplot structure:
    • A box spans from Q1 to Q3, with a line inside marking the median (Q2).
    • "Whiskers" extend from the box to the minimum and maximum values (excluding outliers, if identified).

📝 Example: A boxplot for data with Q1=12.5, Median=16, Q3=19.5, Min=11, Max=22 would show a box from 12.5 to 19.5, a median line at 16, and whiskers to 11 and 22.

  • Interpreting shape from boxplots:

    • Symmetric distribution: The box is centered between the whiskers, and the median line is roughly in the middle of the box.
    • Right-skewed distribution: The median is closer to Q1, and the right whisker is longer. The mean is typically greater than the median.
    • Left-skewed distribution: The median is closer to Q3, and the left whisker is longer. The mean is typically less than the median.
  • Outliers: Values more than 1.5 times the IQR above Q3 or below Q1 are considered outliers.

10.4 Bivariate analysis introduction

Bivariate analysis examines the relationship between two variables. It helps understand how changes in one variable relate to changes in another.

  • Key goals:

    • Identify if a relationship exists.
    • Determine the direction (positive or negative) of the relationship.
    • Assess the strength of the relationship.
  • Scatterplots: These graphs plot pairs of data points (x,y)(x, y) for two quantitative variables. They visually reveal the pattern of association.

    • Positive relationship: As one variable increases, the other tends to increase.
    • Negative relationship: As one variable increases, the other tends to decrease.
    • No relationship: Points are scattered randomly.

> Relationship direction:

Positive: Both variables increase together. Negative: One variable increases as the other decreases.

🔑 Important: Bivariate analysis helps uncover patterns that might not be visible when looking at variables in isolation.

🔑 Important: This section introduces the foundational concepts of looking at two variables together, setting the stage for more detailed quantitative measures in subsequent parts.

11. Measures of dispersion and shape, bivariate analysis (part 3)

11.1 Introduction to bivariate analysis

Bivariate analysis examines relationships between two variables. This contrasts with univariate analysis, which describes a single variable.

The main goal of bivariate analysis is to explain these relationships. Common tools include scatter plots, correlation, and contingency tables.

Sample questions for bivariate analysis involve exploring connections, such as the link between study hours and test scores 180.

11.2 Scatter plots

A scatter plot visually represents pairs of data points, (x,y)(x, y). The xx-axis typically shows the independent variable, and the yy-axis shows the dependent variable.

These plots help identify patterns like positive, negative, or no linear trends between variables. 181.

📝 Example: Plotting student absences (xx) against their final grades (yy) can show if more absences relate to lower grades 183.

11.3 Measures of association: Covariance and correlation

Bivariate analysis uses quantitative measures to describe the relationship between two numerical variables.

  • Covariance: This measures how two variables change together. A positive covariance means they tend to increase or decrease together. A negative covariance indicates they move in opposite directions. A covariance of zero suggests independence. However, covariance values are hard to compare as they depend on the variables' units. 187.

  • Coefficient of Correlation: This indicates the strength and direction of a linear relationship. It is standardized, ranging from -1 to +1, making it easy to interpret and compare across studies. 185.

> Covariance: unit-dependent; Correlation: unit-free.

11.4 Types and cases of correlation

Correlations can be classified in several ways:

Type of CorrelationDescription
LinearPoints align on a straight line.
Non-linearPoints follow a curve.
PositiveBoth variables increase or decrease together.
NegativeOne variable increases as the other decreases.
No correlationNo clear relationship between variable changes.

11.5 The Correlation Coefficient (r)

The sample correlation coefficient, denoted by rr, quantifies the linear relationship. The population coefficient is ρ\rho.

The formula for rr is: r=cov(X,Y)sxsyr = \frac{\text{cov}(X, Y)}{s_x s_y} where:

  • cov(X,Y)\text{cov}(X, Y) is the sample covariance.
  • sxs_x is the sample standard deviation of XX.
  • sys_y is the sample standard deviation of YY.

A more direct formula for rr is: r=n(∑xy)−(∑x)(∑y)[n(∑x2)−(∑x)2][n(∑y2)−(∑y)2]r = \frac{n (\sum xy) - (\sum x)(\sum y)}{\sqrt{[n (\sum x^2) - (\sum x)^2][n (\sum y^2) - (\sum y)^2]}} where nn is the number of data pairs. 189 194.

11.5.1 Interpretation of correlation coefficient

The value of rr ranges from -1 to +1.

  • rr close to +1: Strong positive linear relationship.
  • rr close to -1: Strong negative linear relationship.
  • rr close to 0: Weak or no linear relationship.

> r=+1r=+1: Perfect positive linear relation. > r=−1r=-1: Perfect negative linear relation. > r=0r=0: No linear relation.

11.5.2 Calculating the correlation coefficient

To calculate rr, you need to:

  1. Create a table with columns for xx, yy, xyxy, x2x^2, and y2y^2.
  2. Calculate the sums of each column: ∑x\sum x, ∑y\sum y, ∑xy\sum xy, ∑x2\sum x^2, ∑y2\sum y^2.
  3. Substitute these sums into the formula for rr.

📝 Example: Calculating rr for advertising expense and sales. A high positive rr suggests increased advertising leads to increased sales. [192, 196-197]

📝 Example: For a car rental company, r=0.982r=0.982 indicates a strong positive linear relationship between the number of cars and revenue 197.

📝 Example: For student absences and final grades, calculate rr to see if more absences correlate with lower grades 198.

11.6 Applying correlation in business

Understanding the correlation coefficient helps in business decisions.

  • Strong positive correlation (r close to 1): Suggests one variable can be increased to boost another. For instance, higher advertising spending might lead to higher sales.

  • Weak or negative correlation: May indicate a need to review strategies. If advertising does not impact sales as expected, the strategy might need adjustment 192.

🔑 Important: Correlation does not imply causation. A strong correlation means variables move together, but it doesn't prove one causes the other 186.

🔑 Important: The correlation coefficient is unit-free, making it a versatile measure for comparing relationships across different contexts 190.

12. Measures of dispersion and shape, bivariate analysis (part 4)

12.1 Measuring linear relationships: correlation

  • The correlation coefficient (r) quantifies the strength and direction of a linear relationship between two variables.
  • A value of r close to 1 indicates a strong positive linear relationship.
  • A value of r close to -1 indicates a strong negative linear relationship.
  • A value of r near 0 suggests a weak or no linear relationship.

The correlation coefficient (r) ranges from -1 to +1.

A table can summarize the interpretation of r values:

Correlation Coefficient (r)Interpretation
1Perfect positive linear correlation
0.7 to 0.9Strong positive linear correlation
0.4 to 0.6Moderate positive linear correlation
0.1 to 0.3Weak positive linear correlation
0No linear correlation
-0.1 to -0.3Weak negative linear correlation
-0.4 to -0.6Moderate negative linear correlation
-0.7 to -0.9Strong negative linear correlation
-1Perfect negative linear correlation

12.1.1 Calculating the correlation coefficient

  • The formula for Pearson's correlation coefficient r is: r=n∑(xy)−(∑x)(∑y)[n∑(x2)−(∑x)2][n∑(y2)−(∑y)2]r = \frac{n \sum(xy) - (\sum x)(\sum y)}{\sqrt{[n \sum(x^2) - (\sum x)^2][n \sum(y^2) - (\sum y)^2]}}.
  • Here, n is the number of data pairs, Σx and Σy are the sums of the variables, Σx² and Σy² are the sums of the squared variables, and Σxy is the sum of the products of the variables.

Example: For students' final grades (y) and absences (x), an r of -0.944 shows a strong negative link. More absences mean lower grades 200.

  • Software like Microsoft Excel can quickly calculate r using functions like CORREL or the Data Analysis Toolpak 202 203.

12.2 Significance of the correlation coefficient

  • A calculated correlation coefficient (r) from a sample might not reflect a true relationship in the population. It could be due to random chance.
  • Significance testing determines if an observed correlation is likely real or just a coincidence in the sample data 204.

12.2.1 Hypotheses for correlation testing

  • Null Hypothesis (H0): There is no real correlation between the variables in the population (r = 0).
  • Alternative Hypothesis (H1): There is a real correlation between the variables in the population (r ≠ 0) 205.

12.2.2 Steps to test correlation significance

  1. State the hypotheses: Define H0 and H1.
  2. Find the critical value: Use a t-distribution table with the significance level (alpha) and degrees of freedom (df = n - 2).
  3. Compute the test value: Use the formula: t=rn−21−r2t = \frac{r\sqrt{n-2}}{\sqrt{1-r^2}}
  4. Compare test and critical values: If the test value is larger than the critical value, reject H0.
  5. Summarize the result: Conclude whether the correlation is statistically significant 206.

Example: For r = 0.982 with n = 6 and alpha = 0.05, df = 4. The critical value is ±2.776±2.776. The calculated test value t is 10.4. Since 10.4 > 2.776, we reject H0, indicating a significant correlation 210.

A table illustrates the t-distribution values for different degrees of freedom and significance levels:

d.f.Two tails, α = 0.05
42.776
52.571
62.447
......
  • If the calculated test value (t) falls within the critical region (i.e., is greater than the positive critical value or less than the negative critical value), the null hypothesis is rejected 211.

12.3 Bivariate analysis: qualitative variables

  • When analyzing two qualitative variables (categorical variables), the Chi-Square test is used to assess their relationship 214.
  • This test helps determine if the two variables are independent or dependent.

12.3.1 Contingency tables

  • A contingency table is used to organize the frequencies of two categorical variables.
  • It shows the observed counts for each combination of categories.

Example: A 2x2 contingency table can show the relationship between gender (Male/Female) and hand preference (Left/Right) in 300 children 216 217.

GenderLeft HandedRight HandedTotal
Female12108120
Male24156180
Total36264300

12.3.2 Chi-Square test procedure

  • Null Hypothesis (H0): The two categorical variables are independent (no relationship).
  • Alternative Hypothesis (H1): The two categorical variables are dependent (there is a relationship) 218.
  • The test calculates expected frequencies under the assumption of independence and compares them to the observed frequencies.

🔑 Important: The Chi-Square test is crucial for understanding associations between non-numerical data in areas like social sciences and market research.

🔑 Important: Significance testing for correlation helps ensure that observed relationships in sample data are likely to exist in the broader population, leading to more reliable conclusions.

13. Measures of dispersion and shape, bivariate analysis (part 5)

13.1 The Chi-square test for independence

The chi-square test is used to determine if there is a significant association between two categorical variables. This is often applied to contingency tables, which display the frequencies of observations across different categories of two variables.

The test assesses whether the observed frequencies differ from the frequencies expected if the variables were independent.

A key assumption is that each cell in the contingency table should have an expected frequency of at least 1. If this condition is not met, categories may need to be merged.

13.1.1 Calculating expected frequencies

Expected frequencies (fef_e) are calculated based on the assumption of independence between the two variables. This means we expect the proportion of observations in each row to be the same across all columns, and vice-versa.

The formula for expected frequency in a cell is: fe=(row total)×(column total)nf_e = \frac{(\text{row total}) \times (\text{column total})}{n}

  • row total: The sum of all frequencies in that specific row.
  • column total: The sum of all frequencies in that specific column.
  • n: The overall sample size, which is the total number of observations.

13.1.2 The chi-square test statistic

The chi-square test statistic (XSTAT2X^2_{STAT}) quantifies the difference between observed and expected frequencies. A larger statistic indicates a greater discrepancy, suggesting the variables may not be independent.

The formula for the chi-square test statistic is: XSTAT2=∑all cells(fo−fe)2feX^2_{STAT} = \sum_{\text{all cells}} \frac{(f_o - f_e)^2}{f_e}

  • fof_o = observed frequency in a cell.
  • fef_e = expected frequency in a cell.

The degrees of freedom (d.f.) for the chi-square test statistic are calculated from the dimensions of the contingency table (rr rows and cc columns): d.f.=(r−1)(c−1)\text{d.f.} = (r-1)(c-1)

The chi-square test statistic follows a chi-squared distribution.

13.1.3 The decision rule

To make a decision about the independence of the variables, we compare the calculated test statistic (XSTAT2X^2_{STAT}) to a critical value (Xα2X^2_{\alpha}) from the chi-squared distribution. The critical value depends on the chosen significance level (α\alpha) and the degrees of freedom.

Decision Rule:

  • If XSTAT2>Xα2X^2_{STAT} > X^2_{\alpha}, reject the null hypothesis (H0H_0). This suggests there is sufficient evidence of an association between the variables.
  • If XSTAT2≤Xα2X^2_{STAT} \le X^2_{\alpha}, do not reject the null hypothesis (H0H_0). This suggests there is not enough evidence to conclude an association between the variables.

Critical values for the chi-square distribution are typically found in statistical tables.

A higher test statistic suggests a stronger association.

Critical values of the Chi-square distribution

Degrees of freedom (d)α=0.05\alpha=0.05α=0.01\alpha=0.01α=0.001\alpha=0.001
13.8416.63510.828
25.9919.21013.816
37.81511.34516.266
49.48813.27718.467
511.07015.08620.515
612.59216.81222.458
714.06718.47524.322
815.50720.09026.125
916.91921.66627.877
1018.30723.20929.588
1119.67524.72531.264
1221.02626.21732.910

13.1.4 Special case: Comparing two proportions

When dealing with a 2x2 contingency table, the chi-square test can be used to compare two proportions. For example, we can test if there is a difference in hand preference between genders.

The calculation for a 2x2 table uses the same formulas but results in 1 degree of freedom.

Example: Gender vs. Hand Preference

Consider a sample of 300 individuals.

Hand PreferenceLeftRightTotal
Female12108120
Male24156180
Total36264300
  1. Calculate expected frequencies:

    • Female, Left: (120×36)/300=14.4(120 \times 36) / 300 = 14.4
    • Female, Right: (120×264)/300=105.6(120 \times 264) / 300 = 105.6
    • Male, Left: (180×36)/300=21.6(180 \times 36) / 300 = 21.6
    • Male, Right: (180×264)/300=158.4(180 \times 264) / 300 = 158.4
  2. Calculate the test statistic: XSTAT2=(12−14.4)214.4+(108−105.6)2105.6+(24−21.6)221.6+(156−158.4)2158.4X^2_{STAT} = \frac{(12 - 14.4)^2}{14.4} + \frac{(108 - 105.6)^2}{105.6} + \frac{(24 - 21.6)^2}{21.6} + \frac{(156 - 158.4)^2}{158.4} XSTAT2=(−2.4)214.4+(2.4)2105.6+(2.4)221.6+(−2.4)2158.4X^2_{STAT} = \frac{(-2.4)^2}{14.4} + \frac{(2.4)^2}{105.6} + \frac{(2.4)^2}{21.6} + \frac{(-2.4)^2}{158.4} XSTAT2=0.4+0.0545+0.2667+0.0364≈0.7576X^2_{STAT} = 0.4 + 0.0545 + 0.2667 + 0.0364 \approx 0.7576

  3. Apply the decision rule:

    • Degrees of freedom = (2−1)(2−1)=1(2-1)(2-1) = 1.
    • At α=0.05\alpha = 0.05, the critical value (X0.052X^2_{0.05}) for 1 d.f. is 3.841.
    • Since 0.7576≤3.8410.7576 \le 3.841, we do not reject H0H_0.
    • Conclusion: There is not sufficient evidence to conclude that hand preference differs between genders at the 0.05 significance level.

Example: College Acceptance Rates

GroupAcceptedNot AcceptedTotal
Men198162360
Women88112200
Total286274560
  • Observation: Men have a higher acceptance rate (55%) than women (44%).
  • Question: Is this difference statistically significant, or could it be due to random chance? The chi-square test can answer this.

The chi-square test helps distinguish real differences from random variation.

🔑 Important: When applying the chi-square test, ensure your expected cell frequencies are at least 1 for all cells. Otherwise, results may be unreliable.

🔑 Important: The chi-square test tells you if there is a relationship, but not the nature or strength of that relationship beyond what the observed vs. expected frequencies show.

🔑 Important: Always check the degrees of freedom against the correct row in the chi-square critical values table.

🔑 Important: For a 2x2 table, the calculation simplifies, and the test is equivalent to testing for the difference between two proportions.

🔑 Important: The p-value for the chi-square test is the probability of observing a test statistic as extreme as, or more extreme than, the one calculated, assuming the null hypothesis of independence is true. If p < α\alpha, reject H0H_0.

🔑 Important: The chi-square test is sensitive to sample size; with very large samples, even small, practically insignificant associations can become statistically significant.

© 2026 Maeve. All rights reserved. This content is protected by copyright.

See also