Price Calculation based on probabilities This is a strange question, it might be easy for all you math wizards or it even may be impossible. If you don't understand what I mean let me know so I can change the way I post the question.

Product A can be built using Product B.

To get Product B I have to transform product C or Product D.

I have a 50% chance to get product B by transforming product C and 25% to get product B by transforming product D.

Is there any way to predict the cost of production for Product A knowing the price for Product C and D

Edit 1
There are no transformation costs, only the costs for the materials
Suppose you go with the strategy "buy C and attempt a transformation to B until you get B".  Then with probability 1/2, this will cost C, with probability $1/2(1-1/2)$, cost $2C$, with probability $1/2^n$ cost $nC$.  Thus the expected price will be

$C\sum_{n=1}^\infty \frac{n}{2^n}=2C$

Similarly, the strategy "buy D and attempt a transformation to B until you get B" will have expected price

$B_D+D\sum_{n=1}^\infty \frac{n3^{n-1}}{4^n}=4D$

It's no coincidence that the expected price is just the cost divided by the probability of success; this follows from the properties of the binomial distribution.

You'll want to compare these two and see which is minimal and run with that strategy.
Product A can be built using Product B at a 50% chance (costs $5)

To get Product B I have to transform Product D (costs $1400)

I have a 25% to get product B by transforming product D.

I want to produce 5 x Product A.

Could anyone help me determine the probability and expected costs to produce 5 of Product A? and what at what price would be better statistically to purchase Product B than to produce it?

An explanation and an answer would be great and much appreciated.