I have some data from gas emission samples, part of the data was sampled in a region with a characteristic A and elsewhere with characteristic B. However, each region corresponds to a different percentage of total area. I want to calculate the central value (average or median) of unbalanced with different weights data with the following characteristics: - I have 35 observations in total, with 15 observations in group A and 20 in group B. - The 20 observations of group B show average much higher (aprox. 40x higher) than group A. - Group A corresponds to 58% and group B to 42% of my study area. I used ponderate average to calculate overall average data: ((Average Group A * 0.58) + (0.42 * Average Group B)) / 2. Am i right doing this? And how can i calculate those overall median? Thanks for your attention.