Finding average from uniformly distributed values

62 Views Asked by At

Let's say, I am sending network packets at the rate of 450 packets per second.

The size of these packets is uniformly distributed between 100 to 500 bytes.

I want to know what's the average packet size / per second?

I tried to solve it:

Since its uniformly distributed, so the average of size is (100 + 500)/2 = 300.

So, the answer is simply 300 bytes?

1

There are 1 best solutions below

2
On BEST ANSWER

Let's add a bit of formalism here. Let $X$ (a random variable) be the size of the packet. We know that $X \text{~} \text{Unif}(100,500)$. Thus the expected size of a packet is $$\mathrm{E}(X)=\int_{100}^{500} {\frac{1}{500-100}x}\mathrm{d}x=300.$$ Then, the time it takes to send the average packet is $$\frac{300 \text{ bytes}}{450 \text{ bytes per second}}=2/3 \text{ second}$$