Case Study - A weight tracker that shows the trend, not the noise

An iOS app whose twelve-algorithm statistical engine (EWMA smoothing, Hampel filtering, Theil-Sen slopes) separates real body change from daily fluctuation, entirely on device.

Client
Weightics
Year
Service
iOS Development, Data Science & ML
Weightics onboarding: your real weight is stable

Overview

The trend under the number

Step on a scale two mornings running and it will tell you two different stories, both of them wrong. Weightics is an iOS app built on one premise: today’s number is mostly noise, and the useful figure is the trend underneath it. A twelve-algorithm engine separates the two, entirely on device.
  • EWMA smoothing
  • Hampel filter
  • Theil-Sen slope
  • Seasonality removal
  • Confidence bands
  • On-device only

The engine

From raw entry to real trend

Five stages between a number typed on a dial and a line you can act on. Each one exists to remove a specific kind of lie.
01

Clean the signal

Hampel winsorization and 3σ/MAD checks catch the entries that are measurement error rather than body change: a scale on carpet, a heavy meal, a weigh-in at the wrong hour.

02

Smooth the trend

EWMA with an adaptive half-life, plus a Theil-Sen median slope that survives the outliers a least-squares fit would chase.

03

Remove the week

Weekend effects are real and predictable. Detecting weekly seasonality and subtracting it stops Monday from reading as failure.

04

Earn confidence

A DataPhase progression rates how far the trend can be trusted yet, so the dashboard says “Building your trend, 31%” instead of faking certainty from four entries.

05

Project forward

Seven-day projections ship with a confidence band, so the forecast shows its own uncertainty rather than a single confident line.

Product

The app, screen by screen

Onboarding argues the thesis before asking for a single entry. The dashboard answers one question. Analysis is where the statistics surface for anyone who wants them.
Onboarding: a noisy daily chart above the message that the real weight is stable

Onboarding · the thesis

Dashboard showing current weight, a stable trend chart and a Maintaining Well insight

Dashboard

Add Weight screen with a dial picker and date and time fields

Entry · dial

Analysis tab plotting the smoothed trend against real weight, with volatility statistics

Trend × real weight

Seven-day projection chart with a confidence band and forecasts at one, three and six months

Projections · confidence band

Stack & proof

The maths never leaves the phone

There is no inference server and no analytics pipeline, which means there is nothing to leak. The statistics that make the app worth using are also why it never has to send anything anywhere.
Trend engine
12

Algorithms in the ensemble, EWMA and Theil-Sen among them

Projections
7 days

Forecast horizon, shipped with its confidence band

Timeframes
4

Aggregation windows: 7, 14, 21 and 30 days

Off device
0

Bytes of weight data leaving the phone

Technologies

  • Swift
  • SwiftUI
  • SwiftData
  • Swift Charts
  • HealthKit
  • iCloud sync
  • Background Tasks
  • RevenueCat

Swift Charts renders the trend against real weight; SwiftData persists entries and syncs through iCloud; HealthKit reads and writes body mass in the background. The premium tier (auto-sync, projections, advanced analytics) is metered through RevenueCat.

More case studies

A course platform for building with AI, still in the studio

Mellofattura’s course platform: build real digital products with AI, from prototype to publication, lesson by lesson. Two courses are live; more are in production.

Read more

Curated agent skills for iOS UX and accessibility

A research-led skills framework that started as a Mackenzie TCC, shipped as an open agent plugin, and is now a Springer-accepted workshop paper, with Camera Ready underway for JIIHC 2026 in Chile.

Read more

Tell us about your project

Where we are

  • São Paulo
    São Paulo, SP
    Brazil