Logistic Regression: Predicting the Outcome of an Event

Logistic regression is a statistical model used to predict the probability of an event based on a set of independent variables. It’s particularly useful when you want to classify an event as belonging or not to a specific category (for example, whether a customer will buy a product or not, or whether a patient will develop a disease or not).

It is a Supervised Machine Learning algorithm that can be used to model the probability of a specific class or event. It is used when the data is linearly separable – that is, if there exists a line or plane that can be used to uniquely separate the data into different classes – and the outcome is binary or dichotomous. This means that logistic regression is typically used for binary classification problems (Yes/No, Correct/Incorrect, True/False, etc.),

In this post, I will demonstrate how to perform binomial logistic regression to create a classification model, in order to predict binary responses on a given set of predictors.

Continue reading “Logistic Regression: Predicting the Outcome of an Event”

Non-Parametric Tests: The Wilcoxon Test for Non-Normal Data (with R Examples)

Imagine comparing session durations between two groups of pages: those with a featured snippet and those without. You run a Student’s t-test and get a p-value of 0.08. Not significant, apparently. But looking at the data, you notice the distributions are heavily skewed: a few pages with very long sessions, many with very short ones. The t-test assumes normality, and here we are light-years away.

The Wilcoxon test is a non-parametric test that makes no assumptions about the shape of the distribution. It works on ranks, not on original values: it orders all data from smallest to largest and assigns scores based on position. This makes it especially useful in SEO, where many metrics (sessions, CTR, rankings) are anything but normal.

Continue reading “Non-Parametric Tests: The Wilcoxon Test for Non-Normal Data (with R Examples)”

The Beta Distribution Explained Simply

Imagine we have 800 sessions on a landing page and 65 conversions. The raw rate is 65/800 ≈ 8.1%. It looks like a precise number, but is it really? Is it the true conversion probability of the page, or could it be different? And if someone claimed the page converts at least 10% — do the data confirm or contradict that?
Questions like this are everyday fare for anyone working with traffic and conversion data. Bayesian statistics offers an elegant and direct tool to answer them: the Beta distribution.

The Beta distribution is a continuous probability distribution defined on the interval [0, 1]. That sounds abstract, but it’s exactly what we need whenever we want to model the uncertainty around a proportion: a conversion rate, a CTR, a click percentage, a probability of success. Intuitively, Beta is a distribution over the possible probabilities of the event, and that is what makes it unique.

Continue reading “The Beta Distribution Explained Simply”

Multicollinearity, Heteroscedasticity, Autocorrelation: Three Difficult-Sounding Concepts (Explained Simply)

In various posts, particularly those on regression analysis, variance analysis, and time series, we’ve come across terms that seem deliberately designed to scare the reader.
The aim of these articles is to explain these key concepts simply, beyond the apparent complexity (something I really wanted when I was a student, instead of facing texts written in a purposely convoluted and unnecessarily difficult way).
So, it’s time to spend a few words on three very important concepts that often recur in statistical analysis and need to be well understood. The reality is much, much clearer than it seems, so… don’t be afraid!

Continue reading “Multicollinearity, Heteroscedasticity, Autocorrelation: Three Difficult-Sounding Concepts (Explained Simply)”

Analysis of Variance: ANOVA Explained Simply

You have three Google Ads campaigns. Or four landing pages. Or five versions of a newsletter. The averages seem different, but are these real differences or just statistical noise?

This is exactly the problem that Analysis of Variance (ANOVA) solves: determining whether at least one group differs genuinely from the others, without falling into the trap of running dozens of separate comparisons.

Continue reading “Analysis of Variance: ANOVA Explained Simply”