Menu

Tutorial12 min read

Factorial Design Explained: Full vs Fractional Factorial (With Free Tool)

By Francesco Villasmunta
Factorial Design Explained: Full vs Fractional Factorial (With Free Tool)

Factorial designs are the workhorses of experimental research. They let you study multiple factors simultaneously and discover interactions that single-factor experiments miss entirely.

This tutorial walks through full and fractional factorials with a live interaction plot you can modify and run.

What You Will Learn

0.Live Code: Interaction Plot

1.What is a Factorial Design?

2.Full Factorial (2^k)

3.Fractional Factorial

4.Interaction Effects

5.Visualizing Results

0. Live Code: Interaction Plot

A 2x2 factorial interaction plot - the key visualization for detecting factor interactions. Non-parallel lines mean the effect of one factor depends on the other.

Live Code Editor
Code EditorPython
Loading editor...
Live Preview

Preparing preview

Running once automatically on first load

Learn by Experimenting

This is a safe playground for learning! Try changing:

  • Colors: Modify color values to see different palettes
  • Numbers: Adjust sizes, positions, or data ranges
  • Labels: Update titles, axis names, or legends

Edit the code, run it, then open the full data visualization tool to continue with your own dataset.

1. What is a Factorial Design?

A factorial design investigates the effect of two or more factors by testing all possible combinations of their levels. Unlike one-factor-at-a-time (OFAT) experiments, factorial designs reveal interactions - when the effect of one factor depends on the level of another.

Why Not OFAT?

One-factor-at-a-time experiments require more runs to achieve the same precision and completely miss interactions. Factorial designs are statistically more efficient in every way.

2. Full Factorial Design (2^k)

In a 2^k design, you have k factors, each at 2 levels (typically "low" and "high"). The total number of experimental runs is 2^k.

RunTempPressureCatalyst
1LowLowLow
2HighLowLow
3LowHighLow
4HighHighLow
5LowLowHigh
6HighLowHigh
7LowHighHigh
8HighHighHigh

3 factors x 2 levels = 2^3 = 8 runs. Each row is one experimental condition.

3. Fractional Factorial Design

When you have 5+ factors, full factorial becomes expensive (2^5 = 32 runs, 2^6 = 64 runs). Fractional factorial designs use a strategically selected subset of runs to estimate main effects and some interactions.

2^(5-1)

16 instead of 32

Loses some 3-way interactions

2^(6-2)

16 instead of 64

Loses 2-way confounding

2^(7-3)

16 instead of 128

Resolution III - screening only

Create Your Design Free

Use our Experiment Planner to generate factorial designs automatically. Get randomization, blocking, and export your design matrix.

Open Planner

4. Understanding Interaction Effects

The key advantage of factorial designs is detecting interactions. An interaction occurs when the effect of factor A depends on the level of factor B.

For example: Temperature might have a small effect at low pressure, but a large effect at high pressure. This is a Temperature x Pressure interaction. In the interaction plot above, you can see this as non-parallel lines.

Reading Interaction Plots

Parallel lines = no interaction (factors are independent). Non-parallel lines = interaction present. Crossing lines = strong interaction (factor effects reverse depending on other factor levels).

5. Visualizing Factorial Results

After running your experiment, upload results to Plotivy and ask for visualizations. Example prompt: "Create an interaction plot showing Temperature x Catalyst effect on Yield".

Chart gallery

Chart types for factorial analysis

Start from these chart types commonly used in DOE analysis.

Browse all chart types →
Bar chart comparing average scores across 5 groups with error bars
Comparisonmatplotlib, seaborn
From the chart galleryComparing performance across categories

Bar Chart

Compares categorical data using rectangular bars with heights proportional to values.

Sample code / prompt

import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
from scipy import stats

# Generate performance scores for 5 treatment groups
np.random.seed(42)
groups = ['Control', 'Treatment A', 'Treatment B', 'Treatment C', 'Treatment D']
n_samples = 30
Multi-line graph showing temperature trends for 3 cities over a year
Time Seriesmatplotlib, seaborn
From the chart galleryStock price tracking over time

Line Graph

Displays data points connected by straight line segments to show trends over time.

Sample code / prompt

import matplotlib.pyplot as plt
import numpy as np

# Generate temperature data for 3 major US cities over 12 months
months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
nyc = [30, 32, 40, 52, 65, 75, 82, 81, 74, 63, 50, 38]
miami = [65, 66, 70, 76, 82, 87, 90, 90, 87, 80, 72, 66]
chicago = [25, 27, 35, 48, 62, 72, 80, 79, 71, 60, 45, 32]

# Create figure with enhanced styling
Correlation heatmap with diverging color scale and coefficient annotations
Statisticalseaborn, matplotlib
From the chart galleryCorrelation analysis between variables

Heatmap

Represents data values as colors in a two-dimensional matrix format.

Sample code / prompt

import matplotlib.pyplot as plt
import seaborn as sns
import pandas as pd
import numpy as np

# Create correlation matrix for financial metrics
metrics = ['Revenue', 'Profit', 'Expenses', 'ROI', 'Customers', 'AOV', 'Marketing', 'Employees']
correlation_data = np.array([
    [1.00, 0.85, -0.45, 0.72, 0.88, 0.65, 0.72, 0.55],
    [0.85, 1.00, -0.78, 0.92, 0.75, 0.58, 0.63, 0.48],
Box and whisker plot comparing gene expression across 4 genotypes with significance brackets
Distributionseaborn, matplotlib
From the chart galleryComparing experimental groups in scientific research

Box and Whisker Plot

Displays data distribution using quartiles, median, and outliers in a standardized format.

Sample code / prompt

import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
from scipy import stats

# Generate gene expression data for 4 genotypes
np.random.seed(42)
genotypes = ['WT', 'KO1', 'KO2', 'Mutant']
n_per_group = 20
Line graph with error bars showing 95% confidence intervals
Statisticalmatplotlib
From the chart galleryScientific data presentation

Error Bars

Graphical representations of the variability of data indicating error or uncertainty in measurements.

Sample code / prompt

import numpy as np
import matplotlib.pyplot as plt
from scipy import stats

# Generate bacterial growth data with replicates
np.random.seed(42)
time_points = np.array([0, 4, 8, 12, 18, 24])
mean_values = np.array([10, 25, 80, 250, 600, 800])

# Generate 5 replicates per time point with noise

From Design to Visualization

Design your experiment with the Planner, then upload results to create publication-ready interaction plots automatically.

Tags:#factorial design#full factorial#fractional factorial#2k factorial design#DOE

Found this helpful? Share it with your network.

FV
Francesco Villasmunta

Experimental Physicist & Photonics Researcher

Hands-on experience in silicon photonics, semiconductor fabrication (DRIE/ICP-RIE), optical simulation, and data-driven analysis. Built Plotivy to help researchers focus on discoveries instead of data struggles.

More about the author

Visualize your own data

Apply the techniques from this article to your own datasets. Upload CSV, Excel, or paste data directly.

Start Analyzing - Free