How the summary works
The table
Each meal is counted once. It is followed by pain if pain started at the time of the meal or up to the lookback window after it (set in Settings, 6 hours unless you change it). It is over if its fat total is above your limit; a meal exactly at the limit counts as within.
A meal from the last few hours with no pain yet is left out until its window ends, because pain could still follow. Deleted meals and pain entries are left out.
Median time to pain
For every meal followed by pain, the app takes the time from the meal to the first pain after it. The median is the middle of those times: half were shorter, half longer.
Why small counts are unreliable
With few pain entries, one more or one fewer changes a percentage a lot: 1 of 2 meals is 50%, 2 of 2 is 100%. That is why percentages stay hidden until you have logged 5 pain entries, and even after that a difference between the rows can be chance.
One pain entry can follow several meals, so it can be counted more than once. Things other than fat, such as meal size or timing, can also matter.
Foods and pain: the permutation test
For each food eaten in at least 10 meals, the app counts how many of those meals were followed by pain. Then it asks: if this food made no difference, how often would its meals end up with at least that many by luck alone?
To answer, it keeps the real number of meals followed by pain but hands that label out to meals at random, 10,000 times, and counts how often the food's meals get at least as many as they really did. That share is the p-value. A small p-value (say below 0.05) means the real result would be unusual if the food didn't matter.
Treat it as a lead to discuss, not proof:
- Testing many foods means some will look unusual by chance. With 20 foods, about one is expected below 0.05 even if none matter.
- Foods eaten together, such as rice with a fatty dish, share their results.
- Meals close together share the same pain entry, so they are not independent, which makes the test overconfident.
- It only looks at whether a food was in the meal, not how much of it.
Foods with fewer meals are left out, and nothing is shown before 5 pain entries, because the result would not mean anything.
This is a record to discuss with your doctor, not a diagnosis.