APEX Daily Pulse — 2026-11-18
Mean dBm Is Not Mean Power
[✅ Verified] Pillar: Sensing and collection
[❓ Unverified] Estimated duration: 3–5 minutes
Reactivation target: Preserve physical meaning when an RF summary combines power readings across time.
Prerequisites
- Python 3.12+ with its standard math module.
- A Bash-compatible terminal on owned equipment.
- Synthetic readings only. No RF transmission, hardware, privileges, or network access.
Actions
- 1. Predict the mean power for equal-duration readings of −30 dBm and −90 dBm. Decide whether −60 dBm represents their arithmetic mean power.
- 2. Run the complete fixture. Convert each dBm reading to milliwatts before averaging:
python3 - <<'PY'
import math
def mean_power_dbm(intervals: list[tuple[float, float]]) -> float:
"""Average interval powers in milliwatts, weighted by seconds."""
if not intervals or any(
not math.isfinite(dbm)
or not math.isfinite(seconds)
or seconds <= 0
for dbm, seconds in intervals
):
raise ValueError("require finite readings and positive durations")
total_seconds = math.fsum(seconds for _, seconds in intervals)
mean_mw = math.fsum(
10 ** (dbm / 10) * seconds
for dbm, seconds in intervals
) / total_seconds
return 10 * math.log10(mean_mw)
equal_duration = [(-30.0, 1.0), (-90.0, 1.0)]
short_burst = [(-30.0, 1.0), (-90.0, 9.0)]
log_mean = math.fsum(dbm for dbm, _ in equal_duration) / 2
power_mean = mean_power_dbm(equal_duration)
short_burst_mean = mean_power_dbm(short_burst)
passed = (
log_mean == -60.0
and math.isclose(power_mean, -33.0103, abs_tol=0.001)
and math.isclose(short_burst_mean, -40.0, abs_tol=0.001)
)
print(f"arithmetic_mean_of_dbm={log_mean:.2f}")
print(f"equal_duration_mean_power_dbm={power_mean:.2f}")
print(f"difference_db={power_mean - log_mean:.2f}")
print(f"ten_percent_burst_mean_power_dbm={short_burst_mean:.2f}")
print(f"drill_passed={passed}")
raise SystemExit(0 if passed else 1)
PY
- 3. Compare the equal-duration result with the direct dBm average. The difference is approximately 27 dB.
- 4. Inspect the second case. The strong interval now occupies one second out of ten, not one out of two. Its reduced duty cycle must reduce mean power even though the two displayed levels are unchanged.
Observable signal
[❓ Unverified] Expected output; this fixture was not executed in this run:
arithmetic_mean_of_dbm=-60.00
equal_duration_mean_power_dbm=-33.01
difference_db=26.99
ten_percent_burst_mean_power_dbm=-40.00
drill_passed=True
[✅ Verified] Mechanism: dBm is logarithmic. Convert with mW = 10^(dBm/10), average linear power with duration weights, then convert back with dBm = 10·log10(mW). Directly averaging dBm gives the logarithm of a geometric mean, not the arithmetic mean power.
Success condition
The equal-duration mean power is approximately −33.01 dBm. Reducing the strong interval to 10% duty cycle gives approximately −40.00 dBm. Every assertion passes.
Failure signature
[✅ Verified] A summary labels −60 dBm as the arithmetic mean power of these equal-duration intervals. It has averaged logarithmic values and substantially understated physical mean power.
Python unavailable: POSIX awk alternative
printf '%s\n' '-30 1' '-90 1' |
awk '
{
dbm_sum += $1
energy_mw_seconds += (10 ^ ($1 / 10)) * $2
seconds += $2
count++
}
END {
if (count == 0 || seconds <= 0) exit 1
mean_dbm = 10 * log(energy_mw_seconds / seconds) / log(10)
printf "arithmetic_mean_of_dbm=%.2f\n", dbm_sum / count
printf "mean_power_dbm=%.2f\n", mean_dbm
error = mean_dbm + 33.0103
if (error < 0) error = -error
exit(error < 0.001 ? 0 : 1)
}'
[❓ Unverified] Expected alternative values: -60.00 and -33.01.
Boundary check
[✅ Verified] Hidden assumption: each reading represents power over its stated interval, with consistent bandwidth and calibration. Sparse sweep points, peak-hold values, or undocumented detector outputs do not automatically satisfy that contract. Correct arithmetic cannot restore missing time coverage.
[✅ Verified] A dB-domain mean can be useful when that statistic is deliberately intended. Label it accordingly. For physical mean power, retain interval duration and average in linear units. Do not confuse either statistic with peak power or occupancy.
Adaptation question
Which APEX RF summaries average dBm values without recording the detector mode, measurement bandwidth, and time weighting?