如何分析验证糖分摄入致胃部不适的糖分排除量化自我实验?
Nice setup for a self-experiment—this paired design is smart for checking both immediate and lagged stomach effects from sugar. Let’s break down how to analyze your data effectively:
1. First, Get Your Data Structured
Start by turning your daily notes into a clean, structured dataset with these core fields (use a spreadsheet or simple CSV):
date: Integer from 1 to 14 (matching your paper bags)is_sugar_free: Boolean (Truefor unsweetened Powerade,Falsefor regular)stomach_discomfort: Quantify this consistently—either a binary value (1for any discomfort,0for none) or a 1-4 scale (1=no issue,2=mild,3=moderate,4=severe). If your notes are qualitative, map them to these values first.pair_group: Label each two-day block (e.g.,1for days 1-2,2for days 3-4, up to7for days 13-14). This will be key for testing lag effects.
2. Exploratory Data Analysis (EDA): Spot Patterns First
Before diving into stats, visualize your data to get intuitive insights:
- Make a summary table: Calculate the percentage of days with discomfort for sugar-free vs. regular drinks, plus the average discomfort score for each group.
- Plot a line graph: X-axis = date, Y-axis = discomfort score. Use different colors for sugar-free vs. regular days. Look for trends—do regular drink days (or the day after) cluster with higher discomfort?
- Compare paired blocks: For each
pair_group, note the total discomfort across both days. Do regular pairs have consistently higher totals than sugar-free pairs?
3. Statistical Testing for Sugar’s Immediate Effect
Since you have a small sample (7 paired blocks), non-parametric tests are the way to go (they don’t assume normal data distribution):
- If you used binary discomfort (
0/1): Use the Wilcoxon Signed-Rank Test to compare the total number of discomfort days in sugar-free pairs vs. regular pairs. This test checks if the two groups have a statistically significant difference in outcomes. - If you used a 1-4 discomfort scale: Same Wilcoxon test, but compare the average discomfort score per pair instead of total days.
- Skip t-tests here—your sample size is too small to meet the normality assumptions needed for t-tests to be reliable.
4. Testing for Lagged Effects (Your Key Unknown)
To check if sugar causes discomfort the day after consumption:
- Method 1: Cross-day correlation
Look at each day 2-14, and group them by what you drank the previous day. So you’ll have two groups: "day after sugar-free" and "day after regular". Use:- Fisher’s Exact Test (if binary discomfort) to see if the proportion of discomfort days differs between the two groups.
- Mann-Whitney U Test (if using the 1-4 scale) to compare average discomfort scores.
- Method 2: Within-pair lag check
For each paired block, calculate the difference between day 2 and day 1 discomfort scores. Then compare these differences across sugar-free pairs vs. regular pairs. If sugar has a lag effect, regular pairs should have larger positive differences (day 2 discomfort > day 1) than sugar-free pairs. Use the Wilcoxon Signed-Rank Test here too. - Note: With only 7 pairs, statistical significance (p-values) might be hard to hit even if a real lag effect exists. Focus on effect size (e.g., how much higher discomfort scores are in lagged sugar days) rather than just p-values.
5. Pro Tips to Strengthen Your Analysis
- Control for confounders: If you had any days with other stomach triggers (e.g., spicy food, lack of sleep), add a
confounderfield (1for yes,0for no) and either exclude those days from analysis or adjust your tests to account for them. - Double-check blinding: Since someone else packed the drinks, you avoided bias in reporting discomfort—great job! Just make sure you didn’t accidentally figure out which drinks were which during the experiment (if you did, note that as a potential bias).
- Keep it simple: With small self-experiment data, overcomplicating stats isn’t helpful. Visualizations and clear descriptive stats will often tell you more than complex models.
内容的提问来源于stack exchange,提问作者Matt Ritter
相关产品推荐
相关产品推荐

