Docsity

Error-Correcting Codes and Truncated Normal Distribution, Assignments of Probability and Statistics

Toggle sidebar
bg1
STAT/ELEC 331 HW 6
Problems in addition to those from the book
1. Error-Correcting Codes
Consider a binary symmetric channel (BSC) and suppose we wish to transmit 4 information
bits. In this problem we will consider the so-called Hamming (7,4) code, which consists of
the codewords
0000000 0100101 1000011 1100110
0001111 0101010 1001100 1101001
0010110 0110011 1010101 1110000
0011001 0111100 1011010 1111111
Each of the 16 possible configurations of information bits is mapped to one of these codewords.
The first four bits of a codeword correspond to the information bits. The codeword is then
transmitted over the BSC, and decoding is based on the notion of Hamming distance.
The Hamming distance between two binary sequences is defined to be the number of bits
where the two sequences differ. For example, if ddenotes Hamming distance, then
d(011010001,010011011) = 3.
The codewords comprising the Hamming (7,4) code satisfy the following property: For any
7 bit sequence z, there is a unique codeword xksuch that d(z,xk)≤1. That is, there is a
unique codeword whose Hamming distance from zis at most 1. You do not need to prove
this, but it would be good to convince yourself.
This suggests the following decoding strategy: if a sequence zis received, let b
xdenote the
closest codeword (in terms of hamming distance). The decoder guesses that the transmitted
information bits are the first four bits of b
x.
a. If p= 0.1 (the parameter characterizing the BSC), what is the probability of error for
the Hamming (7,4) code? I will get you started:
P(b
x6=x) = 1 −P(b
x=x)
= 1 −
16
X
k=1
P({b
x=xk} ∩ {x=xk})
= 1 −
16
X
k=1
P(b
x=xk|x=xk)P(x=xk).
This is simply an application of the law of total probability. Here xdenotes the trans-
mitted sequence and b
xthe decoded sequence. Assume that all 16 configurations of
information bits are equally likely.
b. If the Hamming (7,4) code is useful, it should have a lower probability of error than if
we did no channel coding. Verify this for p= 0.1.
c. Consider the repitition code where each information bit is transmitted 3 times. What is
the probability of error assuming p=.1 and n= 4 information bits are encoded?
pf2

Partial preview of the text

Download Error-Correcting Codes and Truncated Normal Distribution and more Assignments Probability and Statistics in PDF only on Docsity!

STAT/ELEC 331 HW 6

Problems in addition to those from the book

  1. Error-Correcting Codes

Consider a binary symmetric channel (BSC) and suppose we wish to transmit 4 information bits. In this problem we will consider the so-called Hamming (7,4) code, which consists of the codewords

0000000 0100101 1000011 1100110 0001111 0101010 1001100 1101001 0010110 0110011 1010101 1110000 0011001 0111100 1011010 1111111

Each of the 16 possible configurations of information bits is mapped to one of these codewords. The first four bits of a codeword correspond to the information bits. The codeword is then transmitted over the BSC, and decoding is based on the notion of Hamming distance. The Hamming distance between two binary sequences is defined to be the number of bits where the two sequences differ. For example, if d denotes Hamming distance, then d(011010001, 010011011) = 3. The codewords comprising the Hamming (7,4) code satisfy the following property: For any 7 bit sequence z, there is a unique codeword xk^ such that d(z, xk) ≤ 1. That is, there is a unique codeword whose Hamming distance from z is at most 1. You do not need to prove this, but it would be good to convince yourself. This suggests the following decoding strategy: if a sequence z is received, let ̂x denote the closest codeword (in terms of hamming distance). The decoder guesses that the transmitted information bits are the first four bits of ̂x.

a. If p = 0.1 (the parameter characterizing the BSC), what is the probability of error for the Hamming (7,4) code? I will get you started:

P(̂x 6 = x) = 1 − P(̂x = x)

= 1 −

∑^16

k=

P({̂x = xk} ∩ {x = xk})

∑^16

k=

P(̂x = xk^ | x = xk)P(x = xk).

This is simply an application of the law of total probability. Here x denotes the trans- mitted sequence and x̂ the decoded sequence. Assume that all 16 configurations of information bits are equally likely. b. If the Hamming (7,4) code is useful, it should have a lower probability of error than if we did no channel coding. Verify this for p = 0.1. c. Consider the repitition code where each information bit is transmitted 3 times. What is the probability of error assuming p = .1 and n = 4 information bits are encoded?

d. Even though the answer in c is smaller than the answer in a, why might the Hamming (7,4) code be preferable to the triple-repitition code in practice?

  1. Truncated Normal

Suppose X ∼ N (0, σ^2 ) and let fX denote the pdf of X. Let γ > 0 and consider the continuous random variable Y whose pdf is

fY (y) =

0 if y < −γ CfX (y) if −γ ≤ y ≤ γ 0 if y > γ

where C is such that fY integrates to 1. Y is called a truncated normal random variable. Such RVs are useful for modeling data with normal characteristics but a bounded range.

a. Express C in terms of Φ, the cdf of a standard normal. b. Sketch the pdfs of X and Y on the same graph. On a separate graph, sketch the cdfs of X and Y. Label your graphs clearly. For this problem take σ^2 = 1 and γ = 1.

Optional: 2 points extra credit – Do not use a calculator or computer.

c. Determine the variance of Y as a function of γ and σ^2. Express the result as σ^2 times a factor between zero and one. d. Fix σ^2 > 0. Using L’Hopital’s rule if necessary, determine the limits of var(Y ) as γ → ∞ and γ → 0. Do your results make sense?