# Is correct to calculate values in percentage, using the total number of iterations?

Trying to clarify the problem.

Imagine a factory that produce soccer balls; if you produce 1 ball, it will take a certain amount of game cycles. For sake of simplicity, let's say it could take between 5 and 15 cycles (depending from various conditions, like number of workers, quality of workers and so on). Once you make a certain amount of soccer balls, the process is considered done.

Now, I want to display a value in percentage for costs, and a value of defective balls made. with "cost", I am trying to display how much did I spent (materials, workers wage and so on), at the moment. The number in currency is self esplicative, but I believe a percentage value could help to know if you are using too many workers, or burning too many resources, resulting in a waste of money.

To calculate the percentage of defective is relatively simple, since every X amount of time, when I refresh, I can check the balls produced against the defective ones, and the result should be

Total produced * 100 / defective = percentage of defective.


But for the costs, things are different; so I was planning to use the number of cycles to calculate percentage for costs:

cycles * 100 / current costs = percentage of costs


Would this be considered correct? Since the number of cycles for a whole batch of balls may vary slightly, this may represent that when there are less cycles, it means that you spent less money, henche the percentage will be smaller.

• If the number of cycles required changes during the production (you add or remove a worker), and the particular batch has a high ratio of defective unit, you'll have a hard time coming up with a meaningful value for your second formula as the numbers will always be switching and you don't know your final cost objective. Jun 1 '16 at 10:50
• I see; so even if I know the min and max of the cycles (can't have less than 1 worker, can't have more than 10), the result would not be a good indicator of how the resources are allocated. I am struggling to get some meaningful data, so the player can make a choice for a change, before finishing a batch. Jun 2 '16 at 3:14

When x% of your products are defective, the cost and time of the sellable ones is multiplied by 100 / (100 - x). Example: 75% of your products are defective, so you need to pay for the production of four products (100 / 25) for each one you can sell. It also will take four times as long to produce n non-defective products.