The prospect theory works/describes two stages in decision making under risk*.
Stage 1:
Clustering/grouping of the outcomes based on some heuristic. i.e the group the possible outcomes into groups and then choose a reference point out of these.
Stage 2:
Now they switch to the expected utility theory,and act as a rational agent that makes a decision based on the expected value.
To quote wikipedia:
The formula that Kahneman and Tversky assume for the evaluation phase
is (in its simplest form) given by
$U = \sum_{i=1}^n w(p_i)v(x_i) = w(p_1)v(x_1) + w(p_2)v(x_2) + ... + w(p_n)v(x_n)$
where $U$ is the overall or expected utility of the outcomes to the individual making the decision, $x_1, x_2, ..., x_n$ are the potential outcomes and $p_1, p_2, ..., p_n$ their respective probabilities. The function $v$ is the value function that assigns a value to an outcome. The function $w$ is a probability weighting function and expresses that people tend to overreact to small probability events, but underreact to medium and large probabilities.
Losses hurt more than gains feel good (loss aversion).
This differs greatly from expected utility theory, in which a rational
agent is indifferent to the reference point. In expected utility
theory, the individual only cares about absolute wealth, not relative
wealth in any given situation. The function is a probability
weighting function and expresses that people tend to overreact to
small probability events, but underreact to medium and large
probabilities.
Note that this is constrained by the assumption that the probabilities of outcomes are known.
To apply to your case, with any meaningfulness, you'll have to try to quantify the probability of failure in both cases and also assign a weight to the quantity of upside.
My guess is even though gambling has 50% probability you see the immediate(short time span) big wad of cash as high utility while the upside of finishing the project with a reward over a longer time span seems to reduce/lower the apparent utility.
I'd recommend this algorithm to combat this. I am only trying it myself.