Calculate Sample Size for Chi-square Test

This tutorial shows how you can calcuate sample size for one variable chi-square test here. The example in this tutorial is that a marketing agency tests two versions of packaging (A version vs. B Version). The null hypothesis is that there is no difference between these two versions, and the alternative hypothesis is that there … Read more

OLS vs. MLE in Linear Regression

This tutorial is to compare OLS (Ordinary Least Square) and Maximum Likelihood Estimate (MLE) in linear regression. We are going to use simple linear regression as examples here. Most of the conclusions can be directly extended into general linear regressions. OLS in Linear Regression Coefficients The principle of ordinary least squares is to minimize the … Read more

Maximum Likelihood Estimation (MLE) in Linear Regression

This tutorial is going to explain what Maximum Likelihood Estimation (MLE) is and how Maximum Likelihood Estimation (MLE) can be used in linear regression. Basics of Maximum Likelihood Estimation Before discussing about linear regression, we need to have a basic idea of MLE. In particular, assume that \( y_i \) are all independently and identically … Read more

Experimental Design in Advertising Research

This tutorial explains the types of advertising experiment design and the detailed steps of conducting experimental research for advertising campaigns. Types of Advertising Experiments The first one is a simple version of the experiment design, which includes a control condition (no ad) and a treatment condition (with ad viewing). In some situations, you might want … Read more

Linear Mixed Models in SPSS

This tutorial includes the explanation of what a linear mixed model is, how to structure its statistical model, data example, as well as steps for linear mixed models in SPSS. Definition of Linear Mixed Models Linear mixed models (LMMs) are statistical models used to analyze data that have both fixed and random effects. They are … Read more

Data Type and Data Summary

This tutorial explains what data type (including numerical data and categorical data) is and how to summarize different types of data. Data Type Broadly speaking, data can be categorized into two types: categorical and numerical. Categorical data refers to variables that have a finite number of categories or groups. Examples of categorical data include gender … Read more

Linear Regression and Orthogonal Projection

This tutorial explains why and how linear regression can be viewed as an orthogonal projection on 2 and 3-dimensional spaces. Projection with 2 Dimensions Suppose that both X0 and Y have 2 dimensions (e.g., 2 observations from 2 participants). It is worth pointing out that, when talking about dimensions here, we refer to the number … Read more

Mean as a Projection

This tutorial explains how mean can be viewed as an orthogonal projection onto a subspace defined by the span of an all 1’s vector (i.e., basis vector). Suppose that \( \vec{y} \in \mathbb{R}^n \) and \( L \subset \mathbb{R}^n\) is the span defined by the space of vector \( \vec{x} \), namely, \( \vec{x}=\left[\begin{array}{ccc}1\\1\\ …\\ … Read more

Orthogonal Projection

This tutorial explains what an orthogonal projection is in linear algebra. Further, it provides proof that the difference between a vector and a subspace is orthogonal to that subspace. Let’s define two vectors, \(\vec{X} \) and \(\vec{Y} \), and we want to find the shortest distance between \(\vec{Y} \) and the subspace defined by the … Read more

Orthonormal Vectors: Definitions and Examples

Two Orthogonal Vectors Definition: Two vectors are orthogonal if they are perpendicular to each other. That is, the dot product of the two vectors is zero. The following is an example of two orthonormal vectors. \( \vec{V_1} =\left[\begin{array}{ccc}1\\0\\-1\end{array}\right]\), \( \vec{V_2} =\left[\begin{array}{ccc}1\\3\\1\end{array}\right] \) That is, \( (1 \times 1) + (0 \times 3) +(-1 \times 1) … Read more