Chi-Square Test Guide: Nailed with My Nerd

13 min read
chi-square test guide image
Share on Facebook0Tweet about this on TwitterShare on LinkedIn0Email to someone

We’ve got a feedback story from our grateful customer who decided to share his success story and help students who struggle with the chi-squared test.

This article contains a full and really simple guide to solving chi-square. To keep his identity anonymous, we’ve changed his name.

I’m Donald and this is my story about conquering chi-square. Einstein was completely right saying that, “If you can’t explain it to a six-year-old, you don’t understand it yourself.

If you’re currently struggling with the chi-square test, I’ll answer all — and I mean all — your questions about this tricky statistical method in really easy to understand terms!

I’ve adapted this article from the “Methodology” section of my paper. You are welcome to use it to understand how the methodology of your own homework should work.

What is the Chi-Square Test and Where to Use It?

The first time I had to use chi-square was when I was at the 4th year of my undergraduate program at Pittsburgh University School of Nursing. I planned to prove that googling about mental health issues can cause anxiety and negative emotions.

Thus, the topic of my paper was “How reading of online resources about mental health issues impacts patients’ mental and emotional state”.

I surveyed 100 patients. I asked them how often they read about health issues, and whether such a guilty pleasure triggers their anxiety. Then, I recorded their answers on a table.  

All I needed was to find the right statistical test. I looked through a short chi-square guide online and it totally triggered my math anxiety.

You know, I felt that I’m the dumbest person in the world. Thankfully, I did not give up and continued.

At the end of the day, Donald resolves his case — being mentored by a professional Nerd.

Let Nerdify find your perfect academic match using AI! 🤖


❓ What is the Chi-Square Test?

First things first, I got to know my enemy. Chi-square test is a common statistical method used to determine whether two things (in statistics they are called variables) are somehow related.

❓ How to find out whether variables are related? If one variable somehow changes, and another immediately changes in response, it means that they are related.

This is actually very simple to understand once you put the concept of chi-square in the context of a real example.

In my case, patients would be reading about health issues online and experience anxiety. If they feel bad after browsing horrifying symptoms of mental illnesses on WedMD, that means these variables are related.

chi-square text anxiety

To make sure that the chi-square method suits your particular research, check these criteria:

  1. You need to analyze numerical results — specifically, the numbers of times you’ve observed something happening, or how many people gave the same response.
  2. Variables are categorical — variables should belong to specific groups. For instance, respondents in surveys can be categorized by gender, age, political views, etc.
  3. There are two individual variables (e.g. how frequently people google online about mental illnesses (very frequently or rarely) and the effect of their googling (increased anxiety or no negative emotions)
  4. You only need a “yes” or “no” answer – chi-square can only tell if two variables influence each other. It never tells how strong the influence is and when or why it occurs.

Chi-square is used pretty much anywhere because it is a simple, suitable for any sample size, and cheap way to test whether two variables are related. For instance:

chi-square test club


  • In healthcare: is anxiety associated with online research about health issues?
  • In sociology: is crime rate related to the poverty level in a specific region?
  • In marketing: do sales depend on the region where products are sold?
  • In politics: does voter turnout depend on voter age?

Given all this info, I decided that chi-square was exactly what I needed for my research. But how to convert my data into a table and then get all the calculations done right? After 5 days of trial and error, all I had was only errors and I got stuck.

Why Chi-Square Test is Mistakenly Thought to be Difficult?

You’d think that the good old Google knows everything, but nope. Page after page of the search results, I saw the same explanations by-the-book, which were all Greek to me. Without statistical education, I got the theoretical part but was completely lost when it came to practice.

Then a friend of mine recommended me Nerdify. Nerdify connected me with a perfect Nerd — a Master in Medical Statistics and finally, I knew I was going somewhere!

A detailed explanation from the Nerd on how chi-square works and how I should use it — it was all that I needed to nail my super difficult paper.

chi-square test nerd comes to resque

Why was chi-square so difficult for me? As my Nerd said, it happens with all the students for the following reasons:

  • Extremely complex definitions and explanations that make chi-square seem very entangled and confuse students
  • Without illustrative examples, complex formulas are overwhelming for anyone who does not have a fancy for math.
  • Lack of time teachers can devote to explaining every topic — students often have no one to ask for an extra explanation
  • Lack of knowledge due to that your major doesn’t have anything to do with statistics. As a student nurse, I didn’t have any background in studying statistics at all.

    Want a Personal Nerd to step in and make your test easier?

  • Explain formulas?
  • Provide real-life examples?
  • Mentor customization of statistical methods to your project?

 📲 Message Nerdify to get help!

If you’re struggling just as I did, for whatever reason, I’ve got a perfect step-by-step guide to chi-square that you can use!

Really Simple Step-by-Step Chi-Square Guide

Right off the bat, you should know that it’s totally acceptable for non-statistics students to skip doing all the calculations manually and use online chi-square test calculators.

However, my college professor required all the chi-square formulas explained in the paper. Thus, if you’ll use chi-square, you need to understand this method to interpret the results correctly.

Formula Explained

chi-square test formula

When you see this abomination of a formula, you probably think it’s extremely complex:


  • χ2 — value of chi square
  • Σ — sign of sum, means the total amount of elements in a sequence
  • O — observed value of a variable, or the numbers you already have from observations or task description
  • E — expected value of variables you need to calculate yourself; they represent how the variables would be distributed if there would be NO relationship between the variables

Even if you do all the calculations using MS Excel or SPSS, you still need to know where to put which number!

In sections below, you fill find out more about where to find these numbers.

Now it’s time for the best part — calculations!


0️⃣ My Case ➕ Sample Size

In my research, I surveyed 100 patients. I asked them how often they read about health issues, and whether such a guilty pleasure triggers their anxiety

  • So there were two categories of patients: those who frequently research health issues and those who rarely research them
  • There were also two options of their emotional response: increased anxiety and no changes  

Right now, I know my sample size — the number of observations. How many people responded to the survey? How many times you’ve seen something happening during the experiment or study?

In my case, sample equaled 100 — the number of people who participated in the survey.


1️⃣ Creating a Chi-Square Table

Using this data, I created this contingency table:

❓ Contingency tables present observations in matrix format — rows and columns, just like the table above. This type of tables is very commonly used in statistics, especially because it demonstrates how two variables are connected.

Increased anxiety No changes Total
Frequently research
Rarely research


2️⃣ Choosing Statistical Significance

If you’re writing a paper using the chi-square method, chances are that the level of statistical significance isn’t given. Where do you get it? You choose it yourself!

❓ Statistical significance — is the likelihood of that the relationship between two or more variables is accidental and the results of the observation are caused by something else than just chance.

For instance, if a patient gets anxiety every time he does online research about health issues, then statistically the probability of getting anxiety, aka level of confidence is 100%, or 1.

If a patient gets anxiety in 9 times out of 10, then we can confidently state that the probability here is 90%, or 0.9.

chi-square test statistical significance

The most typical levels of significance are 0.05 and 0.01 — both are 100% safe to use in your paper. I chose 0.01 because the lower the value, the more significant results you’ll get — lower significance implies a lower risk of error.

Why do we need the level of significance? My Nerd had a good metaphor to explain it. Imagine that you have to climb up a ladder that has 100 steps. The more steps are missing, the higher the risk that you’ll fall. That’s why we set a very low level of significance — to make sure that calculations are correct!


3️⃣ State your Hypotheses

The hypothesis is a fancy word that confuses many students, but in reality, the hypothesis is just an assumption that you have. In chi-square, you’ll need 2 of them.

  • Null hypothesis (H0)usually states that the results of the observations could result purely from chance and the variables are independent — if one of them changes, another one stays the same and doesn’t react to the changes in the first one.

My H0 would say that getting anxiety isn’t connected with researching health issues online.

  • Alternative hypothesis (H1)  states that the sample observations result not from a random cause, but from a specific cause and the variables are dependent in some way.

That is, my H1 says that patients really do get anxiety and experience negative feelings after researching health issues online.

chi-square test hypotheses

4️⃣ Fill in Observed Values

Here just enter all the observed values into the table:

❓ Observed value — what actually happened or how many times you’ve seen something occur. For instance, how many respondents out of 100 admitted to frequently research online about mental issues and get anxiety from it

Increased anxiety No change Total
Frequently research 36 9 45
Rarely research 24 31 55
Total 60 40 100

5️⃣ Calculate Expected Value

Here we calculate values that would be observed in case if there would be no relationship between researching health issues and experiencing negative emotions.

❓ Expected value — it’s calculated by the formula below and show what would happen if the variables were absolutely independent — wouldn’t affect each other at all.

chi-square test expected value


  • E — expected value
  • Mr — row total for the cell you’re calculating an expected value for
  • Mccolumn total for that cell
  • n — sample size

Increased anxiety No change Total
Frequently research 27 18 45
Rarely research 33 22 55
Total 60 40 100

  • Expected value for “frequently research, increased anxiety” E=45*60/100=27
  • Expected value for “only rarely research, increased anxiety” E=55*60/100=33
  • Expected value for “frequently research, no negative emotions” E=45*40/100=18
  • Expected value for“only rarely research, no negative emotions” E=55*40/100=22


6️⃣ Calculate Chi-Square Using the Formula

Once again, you can use online calculators, but this how it’s done in practice (aka the hard way):

chi-square test calculation


Not ready yet to move further with chi-square test?

Find your Nerd to ease your pain. In anything. Unless it’s legal. 😎

 🧐 Get Connected to a Personal Nerd!


7️⃣ Calculate Degrees of Freedom and Critical Value

Now that we got chi-square calculation done, let’s calculate the degrees of freedom

Degrees of freedom (df) — the number of independent variables that went into the calculation.

Just think of those promotions “buy 2 — get 1 for free!” — you’re free to choose several things, but +1 product is always set by the promotion. Degrees of freedom, however, subtract 1 from both your rows and columns.

chi-square test degrees of freedom

You need to use a chi-square distribution table and find your critical value at the intersection of the degrees of freedom (df=1) and the level of significance (α=0.01):

chi-square test distribution table

So, our critical value is 6.63. This value is smaller than our χ2 =13.63 Therefore, in our chi-square test example, researching about health issues online and getting anxiety or negative emotions are related.

We don’t know how much they are related, because chi-square doesn’t answer this question. But we definitely know that they are somehow related.👌

Chi-Square Calculators — the Easy Way

Even if you need to do all the difficult calculations by yourself, these calculators are awesome to verify your results. Or, if you’re lucky, online calculators are all you’ll need to use to calculate chi-square!

  1. Social Science Statistics Calculator — easy to use chi-square calculator that can calculate up to 5 rows and 5 columns. You can enter category names, fill in the data, and get the result in a flash.
  2. Kent University SPSS Guide for Chi-Square — if you have SPSS, you can consider your chi-square test pretty much already done. This guide will help you learn how to import chi-square tables and graphs into the SPSS and get the task solved. Many colleges and universities use SPSS as their default tool, and your professor may ask you to show your SPSS datasheet.
  3. Chi-Square Calculator — another extremely simple online chi-squared test calculator. All you need to do is enter the observed values and you’ll get degrees of freedom and chi-square ready.

How Can You Nail Chi-Square: My Pro Tips

If anyone told me I would be able to do it just a week before connecting with a Nerd, I’d never believed it. It was simple and logical explanations from my Nerd that helped me completely nail chi-square test and do all the calculations by myself.

Now, I understand each step of chi-square and interpret results correctly. For me, it was crucial that a professional, with a background in studying and applying statistics in practice, would explain everything to me in human language, not math language.

And now a few tips for you to cut corners if you’re dealing with chi-square:

  • Keep in mind that chi-square isn’t rocket science — it is doable and actually very easy if you have a really simple and detailed guideline
  • The number of rows and columns can vary and your table can be much larger than mine, however, the principle remains the same — you’ll just need to do more arithmetic
  • When calculating the expected value, you’ll most likely get fractions, which can confuse you, especially if you’re calculating the number of people in each category. Don’t bother about it — these calculations are intended for further calculation of chi-square

That’s all I wanted to share in my feedback story today. Hopefully, it will help you nail chi-square and get the grade you deserve! Chi-square isn’t as difficult as it may seem at first, so go ahead and break a lance!

Of course, you can make your own success story too!

Nerdify is an AI-powered platform to quickly connect with the experience of 1000s of Personal Nerds

Give a try right now!