Chocolate Cake Lab357 recipes

Chocolate Cake Lab

What moves together in 357 chocolate cake recipes

When a recipe uses more of one ingredient, does it tend to use more or less of another? For every pair of the 8 ingredient ratios (grams per 100 g of flour), this page ranks all 357 recipes on each and measures how closely the two rankings agree: Spearman's rho, from −1 (the more of one, always the less of the other) through 0 (unrelated) to 1 (always rise together).

28 pairs in all: 12 rise together at rho 0.20 or more, 2 move in opposite directions at −0.20 or less, and 7 are close to unrelated (between −0.10 and 0.10). This describes recipes as they are published; it does not say what changing one amount would do to a bake.

Every pair at once

Read a cell by its row and column. Caramel cells rise together, slate cells move in opposite directions, and the deeper the color the stronger the relationship. Pale cells with grey numbers are not distinguishable from no relationship with 357 recipes (p of 0.05 or more).

Cocoa and chocolate: rho −0.36, weak−0.36Cocoa and sugar: rho 0.37, weak0.37Chocolate and sugar: rho −0.06, negligible, not distinguishable from zero−0.06Cocoa and fat: rho 0.06, negligible, not distinguishable from zero0.06Chocolate and fat: rho 0.14, very weak0.14Sugar and fat: rho 0.27, weak0.27Cocoa and egg: rho 0.07, negligible, not distinguishable from zero0.07Chocolate and egg: rho 0.25, weak0.25Sugar and egg: rho 0.19, very weak0.19Fat and egg: rho 0.20, weak0.20Cocoa and liquid: rho 0.44, moderate0.44Chocolate and liquid: rho −0.14, very weak−0.14Sugar and liquid: rho 0.40, moderate0.40Fat and liquid: rho −0.03, negligible, not distinguishable from zero−0.03Egg and liquid: rho −0.10, very weak, not distinguishable from zero−0.10Cocoa and leavening: rho 0.33, weak0.33Chocolate and leavening: rho −0.15, very weak−0.15Sugar and leavening: rho 0.19, very weak0.19Fat and leavening: rho −0.11, very weak−0.11Egg and leavening: rho 0.05, negligible, not distinguishable from zero0.05Liquid and leavening: rho 0.30, weak0.30Cocoa and salt: rho 0.46, moderate0.46Chocolate and salt: rho −0.29, weak−0.29Sugar and salt: rho 0.36, weak0.36Fat and salt: rho −0.06, negligible, not distinguishable from zero−0.06Egg and salt: rho −0.03, negligible, not distinguishable from zero−0.03Liquid and salt: rho 0.42, moderate0.42Leavening and salt: rho 0.20, weak0.20ChocolateSugarFatEggLiquidLeaveningSaltCocoaChocolateSugarFatEggLiquidLeavening
All 28 pairs as a table
Spearman correlation for every pair of ratios, strongest first
PairRhoStrengthp
Cocoa and salt0.46moderateunder 0.001
Cocoa and liquid0.44moderateunder 0.001
Liquid and salt0.42moderateunder 0.001
Sugar and liquid0.40moderateunder 0.001
Cocoa and sugar0.37weakunder 0.001
Cocoa and chocolate−0.36weakunder 0.001
Sugar and salt0.36weakunder 0.001
Cocoa and leavening0.33weakunder 0.001
Liquid and leavening0.30weakunder 0.001
Chocolate and salt−0.29weakunder 0.001
Sugar and fat0.27weakunder 0.001
Chocolate and egg0.25weakunder 0.001
Fat and egg0.20weakunder 0.001
Leavening and salt0.20weakunder 0.001
Sugar and egg0.19very weakunder 0.001
Sugar and leavening0.19very weakunder 0.001
Chocolate and leavening−0.15very weak0.004
Chocolate and fat0.14very weak0.008
Chocolate and liquid−0.14very weak0.009
Fat and leavening−0.11very weak0.046
Egg and liquid−0.10very weak0.050
Cocoa and egg0.07negligible0.16
Fat and salt−0.06negligible0.23
Cocoa and fat0.06negligible0.30
Chocolate and sugar−0.06negligible0.30
Egg and leavening0.05negligible0.37
Fat and liquid−0.03negligible0.54
Egg and salt−0.03negligible0.56

The three clearest relationships

The strongest pairs that reach rho 0.20 either way with a p-value under 0.01. Each dot is a recipe; the line joins the median of the second ingredient within each fifth of recipes ranked by the first.

  1. Recipes with more cocoa tend to use more salt

    rho 0.46 across 357 recipes · moderate · p under 0.001

    The third of recipes with the most cocoa use a median of 1.8% salt; the third with the least cocoa, 0%.

    0%20%40%60%80%0%1%2%3%Cocoa, % of flour →↑ Salt, % of flour
  2. Recipes with more cocoa tend to use more liquid

    rho 0.44 across 357 recipes · moderate · p under 0.001

    The third of recipes with the most cocoa use a median of 175% liquid; the third with the least cocoa, 118%.

    0%20%40%60%80%0%100%200%300%Cocoa, % of flour →↑ Liquid, % of flour
  3. Recipes with more sugar tend to use more liquid

    rho 0.40 across 357 recipes · moderate · p under 0.001

    The third of recipes with the most sugar use a median of 184% liquid; the third with the least sugar, 125%.

    0%100%200%300%0%100%200%300%Sugar, % of flour →↑ Liquid, % of flour

Also strong, and left out above because both of its ingredients already appear: liquid and salt (rho 0.42).

What moves on its own

Every ingredient moves with at least one other: none has its strongest correlation under 0.15.

The pairs closest to unrelated: egg and salt (−0.03), fat and liquid (−0.03), egg and leavening (0.05) and cocoa and fat (0.06).

How the numbers are made

Spearman's rho is the ordinary correlation of the two rankings, so it measures whether one amount tends to rise with the other, in a straight line or not, and a single extreme recipe moves it little. A recipe with none of an ingredient ranks lowest on it. An ingredient fewer than 12 recipes use is left out of the matrix.

The p-value is the chance of a rho at least this far from zero if the two amounts were unrelated. With 28 pairs tested, about 1.4 would pass 0.05 by chance alone even if no ingredient were related to another, which is why the relationships explained above must pass 0.01 and reach 0.20.

Every number is divided by the same flour weight, so a recipe light on flour reads high on every ingredient at once. That nudges every correlation toward positive: part of a positive rho can be flour, not the two ingredients. A negative one holds despite it.

A correlation describes the recipes as published. “Recipes with more cocoa tend to use…” is a statement about what bakers write down together, not a rule that adding one forces the other. Plot any two ingredients to see the recipes behind a number.