HYPOTHESES TEST


Types of Hypothesis Tests in Excel

Hypothesis testing is a fundamental statistical technique used in data analytics to make decisions based on sample data. In real-world business, healthcare, marketing, and scientific applications, analysts frequently need to determine whether observed differences or patterns in data are statistically significant or simply the result of random variation.

Microsoft Excel provides several tools and functions that allow analysts to perform hypothesis testing efficiently. Depending on the structure of the data and the question being asked, different hypothesis tests are appropriate.

The most commonly used hypothesis tests in Excel include:

TestUse CaseExcel Function
One Sample t-testCompare sample mean to populationManual calculation
Two Sample t-testCompare two groupsT.TEST()
Paired t-testBefore vs after experimentT.TEST()
Z-testLarge sample (>30)Z.TEST()
ANOVACompare multiple groupsData Analysis Toolpak

Each of these tests serves a different analytical purpose. The following sections explain these tests in detail.

1. One Sample t-Test

Concept

A One Sample t-test is used to determine whether the mean of a sample differs significantly from a known or hypothesized population mean.

This test is commonly used when:

  • A company wants to verify if the average production meets a target value.

  • A retailer wants to determine if average daily sales differ from a historical average.

  • A healthcare researcher tests whether the average blood pressure differs from a known medical standard.

The test compares the sample mean with a known population mean while considering the variability within the sample.


Example

A company claims that the average daily sales are ₹5000.

A data analyst collects a sample of 10 days of sales data and wants to test whether the average sales have changed.

Hypotheses

Null Hypothesis (H₀)

Average sales = ₹5000

Alternative Hypothesis (H₁)

Average sales ≠ ₹5000


Why t-Test is Used

The t-test is used because:

  • Population standard deviation is unknown

  • Sample size is small (less than 30)


Performing One Sample t-Test in Excel

Excel does not provide a direct built-in function for a one-sample t-test, so it must be calculated manually.

Steps:

  1. Calculate the sample mean

=AVERAGE(range)
  1. Calculate the standard deviation

=STDEV.S(range)
  1. Calculate the sample size

=COUNT(range)
  1. Compute the t-statistic



  1. Compute the p-value using

=T.DIST.RT(t, degrees_of_freedom)

2. Two Sample t-Test

Concept

A Two Sample t-test is used to compare the means of two independent groups to determine whether they are statistically different.

This test is commonly used in situations such as:

  • Comparing sales between two stores

  • Comparing exam scores between two classes

  • Comparing conversion rates of two marketing campaigns

The key idea is to determine whether the difference between the two sample means is statistically significant.


Example

A company wants to compare sales performance of Store A and Store B.

Store AStore B
500520
520530
510540
530550
540560

Hypotheses

H₀: Mean sales of Store A = Mean sales of Store B

H₁: Mean sales of Store A ≠ Mean sales of Store B


Performing Two Sample t-Test in Excel

Excel provides a built-in function for this test.

=T.TEST(array1, array2, tails, type)

Parameters:

  • array1 → Data from group 1

  • array2 → Data from group 2

  • tails

    • 1 = one-tailed test

    • 2 = two-tailed test

  • type

    • 1 = paired test

    • 2 = equal variance

    • 3 = unequal variance

Example:

=T.TEST(A2:A6, B2:B6, 2, 2)

If the p-value is less than 0.05, the difference between groups is statistically significant.


3. Paired t-Test

Concept

A Paired t-test is used when the two datasets are related or dependent.

This type of test is commonly used in before-and-after experiments.

Examples include:

  • Sales before and after a marketing campaign

  • Weight before and after a diet program

  • Student test scores before and after training

Because the data points are related, the analysis focuses on differences between paired observations.


Example

A training institute measures employee productivity before and after a training program.

EmployeeBefore TrainingAfter Training
15060
25565
35263
45867
55466

Hypotheses

H₀: Training has no effect

H₁: Training improves productivity


Performing Paired t-Test in Excel

Excel uses the same function:

=T.TEST(before_range, after_range, tails, 1)

Example:

=T.TEST(A2:A6, B2:B6, 2, 1)

Here type = 1 indicates paired samples.


4. Z-Test

Concept

A Z-test is used when:

  • The sample size is large (usually greater than 30)

  • Population variance is known or assumed stable

In large datasets, the sampling distribution of the mean becomes approximately normal due to the Central Limit Theorem.

Z-tests are often used in:

  • Quality control

  • Large-scale surveys

  • Manufacturing processes

  • Large online platform experiments


Example

An e-commerce company claims the average order value is ₹2000.

A sample of 50 orders is collected to test the claim.


Hypotheses

H₀: Mean order value = ₹2000

H₁: Mean order value ≠ ₹2000


Performing Z-Test in Excel

Excel provides the function:

=Z.TEST(array, x)

Where:

  • array = sample data

  • x = hypothesized population mean

Example:

=Z.TEST(A2:A51, 2000)

The function returns the p-value.


5. ANOVA (Analysis of Variance)

Concept

ANOVA is used when comparing more than two groups.

While a t-test can compare only two groups, ANOVA allows analysts to test whether three or more group means differ significantly.

ANOVA is widely used in:

  • Marketing experiments

  • Product testing

  • Agricultural research

  • Clinical trials


Example

A company tests three different advertising campaigns.

Campaign ACampaign BCampaign C
120130140
125135145
128138142
122132148

The question is:

Do the campaigns produce different average sales?


Hypotheses

H₀: All group means are equal

H₁: At least one group mean is different


Performing ANOVA in Excel

Steps:

  1. Enable Analysis ToolPak

File → Options → Add-ins → Excel Add-ins → Analysis ToolPak

  1. Go to

Data → Data Analysis → ANOVA
  1. Select

ANOVA: Single Factor
  1. Input the dataset and run the analysis.

Excel produces:

  • F-statistic

  • p-value

  • Between-group variance

  • Within-group variance

If the p-value < 0.05, at least one group mean is different.


Summary

Different hypothesis tests are used depending on the analytical question and data structure.

TestWhen to Use
One Sample t-testCompare sample mean with population mean
Two Sample t-testCompare two independent groups
Paired t-testCompare before vs after results
Z-testLarge samples with known variance
ANOVACompare three or more groups

Excel provides both functions and built-in analysis tools that allow analysts to perform these tests quickly without specialized statistical software.

Understanding these tests enables data analysts to make data-driven decisions, validate assumptions, and support business strategies with statistical evidence.


Comments