# Excel Hypothesis Test

### Introduction

The macro looks to answer the following question. It can be run by opening the VB editor whilst inside the spread sheet. Note that It is assumed that the user knows how to run script from the VB editor.

At some significance level $$\alpha$$ is null hypothesis $$H_0$$ rejected for alternative hypothesis $$H_1$$ (or vice versa)?

where

$$H_0: \mu_1-\mu_2= d$$

and $$H_1$$ is one of the three statements

$$H_1: \mu_1-\mu_2 \neq d$$

$$H_1: \mu_1-\mu_2 > d$$

$$H_1: \mu_1-\mu_2 < d$$

Excel Hypothesis Test Guide

VBA Module

### Implementation

The main goal of using spreadsheet is to streamline the process of hypothesis testing of two different sample means, and to make a statement about the extent to which two sample means are different. This problem was first brought to me during my work at KADANT when a change was made to a manufacturing process. The question was not simply whether there was a statistically significant difference in the two means, but whether the company could make a reasonable claim that the end product had in fact improved as a result of the change.

In this specific case we are interested in the two hypotheses

$$H_0: \mu_1-\mu_2= d$$

$$H_1: \mu_1-\mu_2 > d$$

You will need to download the "Excel Hypothesis Test Spreadsheet". In my "Excel Hypothesis Test Guide" I walk through an example. Note that you will have to run the "compareMean" subroutine within the VBA editor, which you can access by pressing Alt+F11. You can also view the PDF below in the window (or expand it to open it in Google Drive). This embedded document is the same as the download at the top of the page.