0

How do I calculate the following example:

Range of prices in whatever currency like: (0, 10), (10, 20), (20, 30)

There are numbers of products underneath each range: So I have something like 100 of some kind of product under price range of (0, 10). 150 of some other product under the price range of (10, 20). and 80 of another product in the price range of (20, 30).

Important thing is that the product under each price range can be any price within that range. How do I calculate the average price of all the products within the given ranges without knowing all the prices?

What can help me solve this? I search all of google but I do not know what I am looking for? Please, I am not good with math. If this is not good question for this site, tell me what to look for and what knowledge I need to search google for.

  • Pretend the price of your product is midway between it's range? – saldukoo Oct 24 '16 at 21:54
  • @saldukoo No. My products can be any price within the given ranges. – عمر جاويش Oct 24 '16 at 21:55
  • Yes indeed. But if you want an approximation you can assume that your prices are are uniformly distributed over the given range. – saldukoo Oct 24 '16 at 22:05
  • @saldukoo What if I wanted to calculate the average price of a number of products, and the price is within a range. The prices can be any where within that range and is not uniformly distributed over the range, how would I calculate in that case? – عمر جاويش Oct 24 '16 at 22:15
  • @saldukoo If I were to approximate it, and the prices of the products within a range could be within the list of (0,1,2,3,4,5,6,7,8,9,10) for example. how would i calculate the price of the products that were in that certain range/list? – عمر جاويش Oct 24 '16 at 22:33

1 Answers1

0

Suppose there are $n$ products.

For each product, there is a minimum price $p_i$ and a maximum price $q_i$ and the number of that product $f_i$.

Then the mean price of all products lies between a lower bound $\bar p$ and an upper bound $\bar q$, where

$$\bar p=\frac{\Sigma p_if_i}{\Sigma f_i}$$

and $$\bar q=\frac{\Sigma q_if_i}{\Sigma f_i}$$

You have:

$f_1=100$, $p_1=0$, $q_1=10$.

$f_2=150$, $p_2=10$, $q_2=20$.

$f_3=80$, $p_3=20$, $q_3=30$.

$$\bar p=\frac{0 \times 100+ 10 \times 150 + 20 \times 80}{100+150+80}=\frac{3100}{330} \approx 9.39$$

$$\bar q=\frac{10 \times 100+ 20 \times 150 + 30 \times 80}{100+150+80}=\frac{6400}{330} \approx 19.39$$

tomi
  • 9,594