필터 지우기
필터 지우기

Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

Which way to calculate mean is correct?

조회 수: 1 (최근 30일)
aaron Harvey
aaron Harvey 2016년 3월 9일
마감: MATLAB Answer Bot 2021년 8월 20일
its late and my head hurts, and im sure ill kick myself in the morning for asking this. Say i have the following data:
counts area density
10 5 2
12 3 4
where 'counts' and 'area' are measured and are the two rows are valid replicates. density=counts/area
is the best single measure of density the mean of 2 and 4 , or does it make sense to calculate a total area 8 and a total counts 22 for a density of 22/8???

답변 (1개)

Walter Roberson
Walter Roberson 2016년 3월 9일
Or even sum(counts .* area) ./ sum(counts)
It depends on what is being represented. If it is a histogram type count, 10 occurrences of area 5, then you need to do the calculation the way I show above. But for some other things, sum(counts) / sum(area) would be appropriate. The mean of the densities is not likely to be correct.

이 질문은 마감되었습니다.

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by