Log-linear Analysis
Log-linear analysis is a method for studying how categorical variables are related in a contingency table. In Honors Statistics, it extends chi-square ideas to test independence and interaction patterns across three or more variables.
What is Log-linear Analysis?
Log-linear analysis is a way to model counts in a contingency table when your data are categorical, not numerical. In Honors Statistics, you use it to ask whether several variables are independent, or whether some combination of categories shows an association.
The basic idea is simple: you start with observed frequencies, then compare them to the frequencies a model would expect if the variables had no relationship. Instead of focusing on one pair of variables at a time, log-linear analysis can handle multi-way tables, so it works when you have three or more categorical variables.
The word "log-linear" comes from the model form. The analysis uses the log of expected cell counts, and those logs are expressed as a combination of terms for each variable and their interactions. If a model fits well, the expected counts are close to the observed counts, which suggests the model captures the pattern in the data.
A big reason this shows up in statistics class is that it generalizes the chi-square test of independence. The chi-square test is great for two-way tables, but once the table gets larger, log-linear analysis gives you a structured way to test which relationships matter and which ones do not. For example, if you have categories for gender, preference, and grade level, a log-linear model can check whether the association between two variables changes depending on the third.
You usually judge the model with a goodness-of-fit test, such as a likelihood-ratio chi-square or Pearson chi-square. A small p-value means the model does not fit the observed counts well, so the relationships in the table are more complicated than the model assumes. A large p-value means the model is plausible for the data, so the simpler pattern may be enough.
One common misconception is that log-linear analysis is the same thing as logistic regression. They both work with categorical data, but they answer different questions. Log-linear analysis treats the cell counts themselves as the outcome, while logistic regression typically predicts a categorical response from explanatory variables.
Why Log-linear Analysis matters in Honors Statistics
Log-linear analysis matters in Honors Statistics because it shows what to do when a simple two-variable chi-square test is not enough. Real datasets often have several categorical variables at once, and this method gives you a way to sort out which associations are actually present.
It also deepens your understanding of contingency tables. Instead of only checking whether two variables are independent, you learn how interactions change the story when a third variable enters the table. That idea shows up any time a class lab asks you to compare counts across multiple groups or conditions.
This topic also connects the math of the model to the interpretation of data. You are not just calculating a statistic, you are deciding whether the pattern of observed frequencies can be explained by independence, pairwise association, or a more complex interaction structure. That is the kind of thinking Honors Statistics asks for in lab write-ups and short-answer questions.
If you can read a contingency table and explain what the fitted expected counts are doing, you are already using log-linear thinking.
Keep studying Honors Statistics Unit 11
Official unit cheatsheet
open one-pagerHow Log-linear Analysis connects across the course
Contingency Table
A contingency table is the layout log-linear analysis works on. The rows and columns, and sometimes extra layers, hold the observed counts for each category combination. Log-linear models compare those observed cell counts to expected counts based on independence or interaction assumptions, so you need to read the table structure before you can interpret the model.
Chi-Square Test of Independence
The chi-square test of independence is the simpler two-variable version of the same basic idea. Both methods compare observed and expected counts, but log-linear analysis is built for larger tables with multiple categorical variables. If you already know how chi-square tests measure association, log-linear analysis feels like the next step up.
Goodness-of-Fit
Goodness-of-fit tells you whether the log-linear model matches the data well enough to be believable. In this topic, the model is judged by statistics like Pearson chi-square or likelihood-ratio chi-square. A poor fit usually means the table has interactions or patterns the model is leaving out.
Contingency Analysis
Contingency analysis is the broader approach to studying relationships among categorical variables. Log-linear analysis is one of its more flexible tools because it can examine independence and interaction in multi-way tables. It fits naturally after basic table reading and before more advanced modeling.
Is Log-linear Analysis on the Honors Statistics exam?
A quiz item or lab question will usually give you a contingency table and ask what kind of relationship is being tested. Your job is to identify whether the model is checking independence, comparing expected and observed counts, or looking for an interaction among several categorical variables.
You may also need to interpret the fit of the model from a chi-square statistic and p-value. If the p-value is small, you say the model does not fit well, which means the categories are not behaving as if they are independent under that model. If the p-value is large, the model is a reasonable summary of the table.
In a written response, be ready to explain what a significant interaction means in plain language, such as one variable changing the association between two others. That kind of interpretation is more useful than just naming the test.
Log-linear Analysis vs Chi-Square Test of Independence
These are closely related, but not identical. The chi-square test of independence usually compares two categorical variables in a two-way table, while log-linear analysis extends the same counting logic to multi-way tables and interaction patterns.
Key things to remember about Log-linear Analysis
Log-linear analysis studies relationships among categorical variables by modeling the counts in a contingency table.
It is especially useful when you have three or more categorical variables and want to check for independence or interaction.
The model compares observed frequencies to expected frequencies, and the fit is often judged with a chi-square statistic.
A good fit means the table can be explained by the model you chose, while a poor fit suggests missing associations or interactions.
This topic builds directly on chi-square ideas, but it reaches beyond a simple two-variable test.
Frequently asked questions about Log-linear Analysis
What is log-linear analysis in Honors Statistics?
It is a method for analyzing categorical data in contingency tables. You use it to study whether variables are independent and whether interactions among several categories affect the pattern of counts.
How is log-linear analysis different from the chi-square test of independence?
The chi-square test of independence usually compares two categorical variables. Log-linear analysis works with multi-way tables, so it can examine more than two variables and test interaction patterns as well as independence.
What does a log-linear model predict?
It predicts the expected cell counts in a contingency table. Those expected counts are compared with the observed counts to see whether the model fits the data well.
How do you know if a log-linear model fits?
You look at a goodness-of-fit statistic such as Pearson chi-square or likelihood-ratio chi-square. A large p-value suggests the model is a reasonable fit, while a small p-value suggests the observed counts do not match the model well.