You just have to compute the expected value. Let's say we play a game where you have to invest $10.
If you have a 65% chance to win and winning means you get $2 on top of your $10, then abort the plan. The expected value is $12×65% = $7.80 which is less than your investment.
If you have a 35% chance to win and winning means you get $30 on top of your 10$, then continue. An expected value of $40×35% = $14 is worth it.
In reality, the tricky part is often to assign numbers (How much does it cost to switch to Rust? How much errors does the stricter type system catch?) but the framework is available.
Ok, also look up the Kelly criterion because you can go bankrupt even with a high expected value.
If you have a 65% chance to win and winning means you get $2 on top of your $10, then abort the plan. The expected value is $12×65% = $7.80 which is less than your investment.
If you have a 35% chance to win and winning means you get $30 on top of your 10$, then continue. An expected value of $40×35% = $14 is worth it.
In reality, the tricky part is often to assign numbers (How much does it cost to switch to Rust? How much errors does the stricter type system catch?) but the framework is available.
Ok, also look up the Kelly criterion because you can go bankrupt even with a high expected value.