The VBA File

You can download the "GoodnessOfFit.bas" code file and "import" into an Excel VBA Module. It's all text so you can examine it in any editor.

If that doesn't mean anything to you there are many books and online sources about Excel VBA. It's much simpler than it seems.

Here's a link to one site that I used - Anthony's Excel VBA Page.

What it is

As part of a project for my sabbatical I collected quite a lot of data in the form of evaluations of questions on a 1-5 scale - a form that is commonly called a Likert scale.

I wanted to determine if the opinions expressed were "significant". To do so I made the following assumptions:

In order to analyze the results I followed an approach given in "Stats: Data and Models" by De Veaux, Velleman, Bock (2nd Edition) for categorical data, the "Goodness of Fit" model.

In essence I predicted the number of counts in each of the cells using the normal model with a standard deviation the same as that of the real data, then applied the Goodness of Fit test to develop a probability. If the probability that the null model fit the data was less than 5% the null hypothesis could be rejected - the data was significantly different.

What the VBA Code Does

Input Assumptions



Interpreting the results

Modifying the Code


If you use this code I'd greatly appreciate some feedback on whether it was helpful. Even more important, if you find errors I'd like to know of them so I can fix them.

I have quite a few other Architectural Engineering resources including a link (under Excel) to this page.

Jim Mitchell - Drexel University