optimization – How much money can I make with my Top Tier Berries as a Botany Researcher?

I made this table using AnyDice:

Soil Quality Berry #1 Tier Berry #2 Tier $ Benefit of growing #1 over #2
0 2 1 -33.33
0 3 2 20.83
0 3 1 -12.50
1 2 1 -25.00
1 3 2 62.50
1 3 1 37.50
2 2 1 25.00
2 3 2 125.00
2 3 1 150.00

This is the mean money per yield roll. “Tier 2.5” is always better than 2 but worse than 3.

If you can make Apricorn balls, doing so and selling them is always more profitable than growing and selling any berry (except obviously when the soil won’t yield any Apricorns). You can get $75 more from selling balls grown from soil quality 1 than growing Tier 3 berries, and $225 more doing the same but at soil quality 2.

I also determined that using mulch always makes you lose money, with the exception of when you can grow an Apricorn and make it into a ball. Lower tier berries don’t sell for enough to make spending $200 worth it, and even tier 3 berries don’t yield enough berries per day for it to be worthwhile: you would need to be able to get to soil quality 3 in order to make a profit with it. Upgrading 0 soil quality to 1 for Apricorns breaks even (so is a waste of time and energy). Upgrading 1 soil quality to 2 for Apricorns is a $200 average profit per yield.

Code for the table:

function: nonnegative X:n {
  if X > 0 {
   result: X
  }
  else {
   result: 0
  }
}

output (nonnegative (1d3 - 2)) * 125 - (1d3 - 1) * 75 named "SQ 0: T2 vs T1"
output (nonnegative (1d4 - 3)) * 250 - (nonnegative (1d3 - 2)) * 125 named "SQ 0: T3 vs T2"
output (nonnegative (1d4 - 3)) * 250 - (1d3 - 1) * 75 named "SQ 0: T3 vs T1"

output (1d3 - 1) * 125 - (1d3) * 75 named "SQ 1: T2 vs T1"
output (nonnegative (1d4 - 2)) * 250 - (1d3 - 1) * 125 named "SQ 1: T3 vs T2"
output (nonnegative (1d4 - 2)) * 250 - (1d3) * 75 named "SQ 1: T3 vs T1"

output 1d3 * 125 - (1d3 + 1) * 75 named "SQ 2: T2 vs T1"
output (1d4 - 1) * 250 - 1d3 * 125 named "SQ 2: T3 vs T2"
output (1d4 - 1) * 250 - (1d3 + 1) * 75 named "SQ 2: T3 vs T1"

Tier 2.5 comparisons:

output (nonnegative (1d3 - 2)) * 125 - (nonnegative (1d3 - 2)) * 150 named "SQ 0: T2 vs T2.5"
output (1d3 - 1) * 125 - (1d3 - 1) * 150 named "SQ 1: T2 vs T2.5"
output (1d3) * 125 - (1d3) * 150 named "SQ 2: T2 vs T2.5"

output (nonnegative (1d4 - 3)) * 250 - (nonnegative (1d3 - 2)) * 150 named "SQ 0: T3 vs T2.5"
output (nonnegative (1d4 - 2)) * 250 - (1d3 - 1) * 150 named "SQ 1: T3 vs T2.5"
output (1d4 - 1) * 250 - (1d3) * 150 named "SQ 2: T3 vs T2.5"

Apricorn comparison:

output (1d2 - 1) * 400 - (1d4 - 2) * 250 named "SQ 1: A vs T3"
output (1d2) * 400 - (1d4 - 1) * 250 named "SQ 2: A vs T3"

Code to evaluate fertilizer:

output (nonnegative (1d4 - 3)) * 250 - ((nonnegative (1d4 - 2)) * 250 - 200) named "unfertilized SQ0 T3 vs fertilized SQ1 T3"
output (nonnegative (1d4 - 2)) * 250 - ((nonnegative (1d4 - 1)) * 250 - 200) named "unfertilized SQ1 T3 vs fertilized SQ2 T3"
output 0 - ((1d2 - 1) * 400 - 200) named "unfertilized SQ0 A vs fertilized SQ1 A"
output (1d2 - 1) * 400 - (1d2 * 400 - 200) named "unfertilized SQ1 A vs fertilized SQ2 A"

Note: In the code, SQ is soil quality, T means what tier of berry, A means an Apricorn that’s grown and made into a ball.