Here is a spreadsheet made by "flyinfungi" of Elitist Jerks. It basically tells you if Obsidium, Elementium and Pyrite ores are worth purchasing at a given price. It's a little confusing at first look, so let's examine it.
First, you'll want to go to File --> Download As and then save it as whatever you want (most likely Excel or OpenOffice).
The first segment, "Profit per Proc," just tells us the projected gold we're going to earn from each Prospecting cast. 5% under and so forth indicate percentages of that number: 5% under tells us what the price is if we sold it for 95% of the "Profit per Proc," and so forth.
The next part, "Jems" [sic] is where you enter the market value of each gem. For the rare gems, you're going to want to enter the selling price of the CHEAPEST cut you have. Why? Because if you use the lowest common denominator, you'll only earn more than expected (which is good) as opposed to less than expected (which is bad).
Short tangent time: You purchase Widget A expecting to make Product B and C. B sells for $50, and C sells for $35. If you make your purchases based on the assumption you will sell only B, you will buy widgets for up to $40. Each B you sell, you make $10, but each C you sell, you lose $5. The more Cs you sell, the more money you lose.
Anyway, what you do is go to the Auction House and find the values for the gems. Then, input those values into the spreadsheet. You could do fancy stuff like calculating the cost if you turned the Carnelians into Carnelian Spikes (as referenced at the end of this post), and then disenchanted them, but let's stick to the basics.
After you input those values, the rest of the values will change. To make a long explanation short, the other part you need to worry about is the "Total per Stack." This value will tell you how much you're expected to earn per stack of whatever ore you purchase.
The rule of thumb when dealing with ores is as follows:
Obsidium - will always get 1 uncommon gem, sometimes 2. Rarely get a rare gem
Elementium - Always get 1 uncommon gem, sometimes 2. Often get a rare gem, sometimes 2.
Pyrite - Always get 1 uncommon gem, rarely 2. Often get a rare gem, sometimes 2. Always get a Volatile Earth, sometimes 2, rarely 3.