# Homework Help: Shannon's :calculating simple uncertainty

1. Dec 18, 2007

### Calmstorm

1. The problem statement, all variables and given/known data

If I were to use a two-tone image e.g. fax, and were to transmit it line-by-line, where the the individual pixels which make up the line were independent of each other, how would I measure the uncertainty at the transmitter? Also what would the length of the the transmited sequence be if the image was a square NxN image?

3. The attempt at a solution

I think the uncertainty is H(X)= - W{ Pilog(Pi) } -B{Qj log (Qj)}
where:
W=number of white pixels in the sequence
Pi=probability of a white pixel.
B=number of black pixels in seqence
Qj=probability of a black pixel.

2. Dec 18, 2007

### EnumaElish

How did you come up with the formula "H(X)= - W{ Pilog(Pi) } -B{Qj log (Qj)}"?

3. Dec 18, 2007

### Calmstorm

re: shannon's uncertainty

well the general formula of shannon's uncertainty is:

H(x)= -pi log(base 2) pi summed over all i, since I have 2 outcomes i.e a black or white pixel i have used Pi=probab. of white and Qj=probab. of black

also sorry about the cross-posting, it wont happen again.