Test and Compare Material Strength with a Simple ML Model

Break things on purpose, then teach a computer to predict the results

High School Materials 2–3 weeks
Last reviewed: March 2026

Overview

Engineers have been testing materials to destruction for centuries — it is the most direct way to learn how strong something is. In this project you will carry out your own structural tests on simple wooden specimens, measure the force required to break them, and then do something no 19th-century engineer could: train a machine learning model to predict break force from the dimensions you measured before the test.

You will build small beam and column specimens from popsicle sticks or balsa wood, varying length, width, thickness, and support configuration. Each specimen gets measured with calipers, loaded to failure with a kitchen scale or a simple lever rig, and logged in a spreadsheet. Once you have 30–50 data points, you will use Python and scikit-learn to fit a linear regression model that predicts break force from geometry.

This is a genuine introduction to the data-driven approach that is transforming materials engineering. Modern aerospace companies combine physical testing with ML models to reduce the number of expensive coupon tests needed to qualify a new material — and the workflow starts with exactly the steps you will follow here.

What You'll Learn

  • Design and conduct a repeatable structural test with controlled variables
  • Record experimental data in a structured format suitable for ML
  • Train a linear regression model with scikit-learn and interpret its coefficients
  • Evaluate model accuracy using R² score and residual plots
  • Connect physical intuition about material strength to quantitative predictions

Step-by-Step Guide

1

Plan Your Test Matrix

Decide which variables you will control. A good starting set: specimen length (50, 75, 100 mm), width (single stick vs. two sticks glued side-by-side), thickness (single vs. laminated), and support type (simply supported vs. cantilever). Aim for at least 30 unique combinations with 2 repetitions each — this gives you roughly 60 data points, enough for a meaningful regression.

Create a spreadsheet with columns for every variable plus the measured break force. Fill in the planned dimensions before you start testing so you have a clear checklist to work through.

2

Build a Simple Test Rig

You don't need a lab. Two stacks of books placed a measured distance apart create a simply-supported beam test. For loading, hang a small bucket from the midpoint of the beam and slowly add water (or coins, or sand) until the specimen breaks. Weigh the bucket on a kitchen scale to get the break force in grams, then convert to newtons (divide by 102).

For a cantilever test, clamp one end of the specimen to a table edge with a C-clamp and hang the load from the free end. Consistency matters more than precision — use the same loading point and support spacing every time.

3

Run the Tests and Record Data

Work through your test matrix methodically. For each specimen, measure actual dimensions with a ruler or calipers before testing — the nominal value (e.g., "one stick wide") may differ from the real measurement. Record length, width, thickness, support span, and the mass at failure.

Take a photo of each failure. Note the failure mode: did the stick snap in the middle (bending failure), crush at the support (compression), or split along the grain (shear)? This qualitative data will help you interpret your model later.

4

Load and Explore the Data in Python

Save your spreadsheet as a CSV file. Load it into Python using pandas:

import pandas as pd
df = pd.read_csv('strength_tests.csv')

Use df.describe() to see the range of each variable. Plot break force vs. each dimension using matplotlib scatter plots. You should see clear trends — longer beams break under less force, thicker beams withstand more. These trends are exactly what linear regression will capture.

5

Train a Linear Regression Model

Split your data into training (80%) and test (20%) sets. Define your feature columns (length, width, thickness, span) and your target column (break force). Train the model:

from sklearn.linear_model import LinearRegression
model = LinearRegression()
model.fit(X_train, y_train)

Print the model coefficients and intercept. Each coefficient tells you how much the predicted force changes per unit change in that dimension — a negative coefficient for length means longer beams are predicted weaker, which matches your physical intuition.

6

Evaluate and Improve

Calculate the R² score on your test set. An R² above 0.7 is good for physical experiments; above 0.85 is excellent. Plot predicted vs. actual break force — points should cluster near the diagonal line. Also plot residuals (prediction errors) to check for patterns.

If accuracy is low, try adding polynomial features (e.g., width × thickness, length²) using scikit-learn's PolynomialFeatures. Beam bending theory predicts that strength scales with width × thickness² / length — does adding these interaction terms improve your model?

7

Document and Present

Write a short report that includes: your test setup (with photos), the dataset summary, your best model's coefficients and R² score, and the predicted-vs-actual plot. Discuss which variables mattered most and how the ML model compares to the theoretical beam bending formula (σ = M·c/I).

This report format — hypothesis, method, data, model, results — is the standard structure for engineering lab reports and ML experiment write-ups alike.

Go Further

  • Replace linear regression with a Random Forest and compare accuracy — tree-based models can capture non-linear relationships without manually engineering features.
  • Add material type as a categorical feature (popsicle stick vs. balsa vs. basswood) and use one-hot encoding to let the model learn material-specific strength.
  • Build a simple Streamlit web app where a user enters beam dimensions and gets a predicted break force from your trained model.
  • Compare your ML predictions to the analytical beam bending formula and quantify where theory and data disagree.