Skip to content

Commit b6b04bc

Browse files
authored
Merge pull request #8 from virtual-labs/dev
Formatting fixes
2 parents bb47df1 + 3fad2d3 commit b6b04bc

File tree

4 files changed

+67
-67
lines changed

4 files changed

+67
-67
lines changed

experiment/posttest.json

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@
1111
"e": "None"
1212
},
1313
"explanations": {
14-
"a": "Incorrect answer. The channel models we consider in this lab are all memoryless channels, i.e., noise in each transmitted symbol is independent of noise in other symbols.",
15-
"b": "Correct Answer! The probability that $i$ bits are erased is $P(i)=\\binom{n}{i}0.3^i\\times 0.7^{n-i}$. If $i<j$, $P(i)>P(j)$.",
16-
"c": "Incorrect answer. There are no bit flips possible in the $BEC$ channel model.",
17-
"d": "Incorrect answer. There is no guarantee that exactly $0.3n$ bits will be erased, simply because the probability of each bit getting erased is $0.3$.",
18-
"e": "Well, one of them is the correct answer."
14+
"a": "Incorrect. The channel models we consider in this lab are all memoryless channels, i.e., noise in each transmitted symbol is independent of noise in other symbols.",
15+
"b": "Correct. The probability that $i$ bits are erased is $P(i)=\\binom{n}{i}0.3^i\\times 0.7^{n-i}$. If $i<j$, $P(i)>P(j)$.",
16+
"c": "Incorrect. There are no bit flips possible in the $BEC$ channel model.",
17+
"d": "Incorrect. There is no guarantee that exactly $0.3n$ bits will be erased, simply because the probability of each bit getting erased is $0.3$.",
18+
"e": "Incorrect. Well, one of them is the correct answer."
1919
},
2020
"correctAnswer": "b",
2121
"difficulty": "beginner"
@@ -32,7 +32,7 @@
3232
"a": "Incorrect. There is a non-zero probability that this event can happen.",
3333
"b": "Incorrect. Observe that the question is giving exactly which of the bits are getting flipped.",
3434
"c": "Incorrect. Observe that the question is giving exactly which of the bits are getting flipped, and calculate the probability carefully. ",
35-
"d": "Correct! We know that each bit is flipped with probability $0.9$, and any bit is not flipped with probability $0.1$, We have the answer $0.9^{n/2}\\times 0.1^{n/2}$ as the right option. Note that there is no binomial coefficient here, as the question specifies exactly which positions are getting flipped."
35+
"d": "Correct. We know that each bit is flipped with probability $0.9$, and any bit is not flipped with probability $0.1$, We have the answer $0.9^{n/2}\\times 0.1^{n/2}$ as the right option. Note that there is no binomial coefficient here, as the question specifies exactly which positions are getting flipped."
3636
},
3737
"correctAnswer": "d",
3838
"difficulty": "beginner"
@@ -46,10 +46,10 @@
4646
"d": "All three are equally probable"
4747
},
4848
"explanations": {
49-
"a": "Wrong answer. Note that the bit flip probability is $0.3$. Thus, fewer bit errors occur with higher probability than larger number of bit errors.",
50-
"b": "Wrong answer. Note that the bit flip probability is $0.3$. Thus, fewer bit errors occur with higher probability than larger number of bit errors.",
51-
"c": "Correct answer! Vectors (1) and (3) are two bit flips away from the input vector, whereas (2) is just a single bit flip away. Thus, the probabilities of getting either (1) (or (3)) from the given input sequence is $0.3^2\\times 0.7^2$, whereas (2) occurs with probability $0.3\\times 0.7^3$, given that the input sequence is $(0,1,0,1)$",
52-
"d": "Wrong answer. Note that the bit flip probability is $0.3$. Thus, fewer bit errors occur with higher probability than larger number of bit errors."
49+
"a": "Incorrect. Note that the bit flip probability is $0.3$. Thus, fewer bit errors occur with higher probability than larger number of bit errors.",
50+
"b": "Incorrect. Note that the bit flip probability is $0.3$. Thus, fewer bit errors occur with higher probability than larger number of bit errors.",
51+
"c": "Correct. Vectors (1) and (3) are two bit flips away from the input vector, whereas (2) is just a single bit flip away. Thus, the probabilities of getting either (1) (or (3)) from the given input sequence is $0.3^2\\times 0.7^2$, whereas (2) occurs with probability $0.3\\times 0.7^3$, given that the input sequence is $(0,1,0,1)$",
52+
"d": "Incorrect. Note that the bit flip probability is $0.3$. Thus, fewer bit errors occur with higher probability than larger number of bit errors."
5353
},
5454
"correctAnswer": "c",
5555
"difficulty": "intermediate"
@@ -63,13 +63,13 @@
6363
"d": "We cannot answer this question."
6464
},
6565
"explanations": {
66-
"a": "Note that we have to compare the two probabilities $p(\\boldsymbol{y_1}|\\boldsymbol{x})$ and $p(\\boldsymbol{y_2}|\\boldsymbol{x})$, and find out which one is higher. By the expression of $p(\\boldsymbol{y_i}|\\boldsymbol{x})$, we have to find which value among $\\sum_{j=1}^3(y_{i,j}-x_j)^2$ for $i=1,2$ is smallest. Now, $\\sum_{j=1}^3(y_{1,j}-x_j)^2=0.3^2+0.1^2+0.3^2=0.19$ and $\\sum_{j=1}^3(y_{2,j}-x_j)^2=0.4^2+0.2^2+0.1^2=0.21$. Hence, $\\boldsymbol{y_1}$ is the more probable output sequence, given that the input was $(+1,-1,-1)$.",
66+
"a": "Correct. Note that we have to compare the two probabilities $p(\\boldsymbol{y_1}|\\boldsymbol{x})$ and $p(\\boldsymbol{y_2}|\\boldsymbol{x})$, and find out which one is higher. By the expression of $p(\\boldsymbol{y_i}|\\boldsymbol{x})$, we have to find which value among $\\sum_{j=1}^3(y_{i,j}-x_j)^2$ for $i=1,2$ is smallest. Now, $\\sum_{j=1}^3(y_{1,j}-x_j)^2=0.3^2+0.1^2+0.3^2=0.19$ and $\\sum_{j=1}^3(y_{2,j}-x_j)^2=0.4^2+0.2^2+0.1^2=0.21$. Hence, $\\boldsymbol{y_1}$ is the more probable output sequence, given that the input was $(+1,-1,-1)$.",
6767
"b": "Incorrect. Note that we have to compare the two probabilities $p(\\boldsymbol{y_1}|\\boldsymbol{x})$ and $p(\\boldsymbol{y_2}|\\boldsymbol{x})$, and find out which one is higher. Use the Gaussian distribution to compute these values.",
68-
"c": "Incorrect option. One of the two is more probable than the other. Use the Gaussian distribution to answer this question.",
69-
"d": "Wrong option. We can indeed compute relevant probabilities and answer this question."
68+
"c": "Incorrect. One of the two is more probable than the other. Use the Gaussian distribution to answer this question.",
69+
"d": "Incorrect. We can indeed compute relevant probabilities and answer this question."
7070
},
7171
"correctAnswer": "a",
7272
"difficulty": "intermediate"
7373
}
7474
]
75-
}
75+
}

experiment/pretest.json

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@
1111
"e": "None"
1212
},
1313
"explanations": {
14-
"a": "Incorrect Answer. There are indeed $\\binom{10}{4}$ ways to switch on exactly $4$ of the $10$ lights. However, there may be an error in calculating the probability of achieving one of these configurations. Please review the approach to ascertain where the discrepancy lies.",
15-
"b": "Correct Answer! Indeed, there are $\\binom{10}{4}$ ways to switch on exactly $4$ of the $10$ lights, each possible way is obtained with probability $p^4(1-p)^6$.",
16-
"c": "Incorrect answer. In this analysis, initially consider the number of ways to select the possible configurations with four lights on and the remaining six lights off. Subsequently, compute the probability of each specific configuration. This calculation must also factor in the configurations for the lights that remain off.",
17-
"d": "Incorrect answer. In this analysis, initially consider the number of ways to select the possible configurations with four lights on and the remaining six lights off. Subsequently, compute the probability of each specific configuration. This calculation must also factor in the configurations for the lights that remain off.",
18-
"e": "Well, One of the provided responses accurately addresses the question."
14+
"a": "Incorrect. There are indeed $\\binom{10}{4}$ ways to switch on exactly $4$ of the $10$ lights. However, there may be an error in calculating the probability of achieving one of these configurations. Please review the approach to ascertain where the discrepancy lies.",
15+
"b": "Correct. Indeed, there are $\\binom{10}{4}$ ways to switch on exactly $4$ of the $10$ lights, each possible way is obtained with probability $p^4(1-p)^6$.",
16+
"c": "Incorrect. In this analysis, initially consider the number of ways to select the possible configurations with four lights on and the remaining six lights off. Subsequently, compute the probability of each specific configuration. This calculation must also factor in the configurations for the lights that remain off.",
17+
"d": "Incorrect. In this analysis, initially consider the number of ways to select the possible configurations with four lights on and the remaining six lights off. Subsequently, compute the probability of each specific configuration. This calculation must also factor in the configurations for the lights that remain off.",
18+
"e": "Incorrect. Well, One of the provided responses accurately addresses the question."
1919
},
2020
"correctAnswer": "b",
2121
"difficulty": "beginner"
@@ -29,10 +29,10 @@
2929
"d": "0.28"
3030
},
3131
"explanations": {
32-
"a": "Incorrect answer. Try using the total probability rule, i.e., $p_Y(y)=\\sum_{x\\in\\mathcal{X}}p_{Y|X}(y|x)p_X(x)$.",
33-
"b": "Correct answer! $p_Y(5)$ is calculated as follows: $p_Y(5)=p_{Y|X}(5|0)p_X(0)+p_{Y|X}(5|a)p_X(a)=p_{Y|X}(5|0)p_X(0)+(1-p_{Y|X}(b|a)-p_{Y|X}(c|a))p_X(a)=0.1\\times 0.3+(1-0.2-0.4)\\times(1-0.3)=0.03+0.28=0.31$.",
34-
"c": "Incorrect answer. Try using the total probability rule, i.e., $p_Y(y)=\\sum_{x\\in\\mathcal{X}}p_{Y|X}(y|x)p_X(x)$.",
35-
"d": "Incorrect answer. Try using the total probability rule, i.e., $p_Y(y)=\\sum_{x\\in\\mathcal{X}}p_{Y|X}(y|x)p_X(x)$."
32+
"a": "Incorrect. Try using the total probability rule, i.e., $p_Y(y)=\\sum_{x\\in\\mathcal{X}}p_{Y|X}(y|x)p_X(x)$.",
33+
"b": "Correct. $p_Y(5)$ is calculated as follows: $p_Y(5)=p_{Y|X}(5|0)p_X(0)+p_{Y|X}(5|a)p_X(a)=p_{Y|X}(5|0)p_X(0)+(1-p_{Y|X}(b|a)-p_{Y|X}(c|a))p_X(a)=0.1\\times 0.3+(1-0.2-0.4)\\times(1-0.3)=0.03+0.28=0.31$.",
34+
"c": "Incorrect. Try using the total probability rule, i.e., $p_Y(y)=\\sum_{x\\in\\mathcal{X}}p_{Y|X}(y|x)p_X(x)$.",
35+
"d": "Incorrect. Try using the total probability rule, i.e., $p_Y(y)=\\sum_{x\\in\\mathcal{X}}p_{Y|X}(y|x)p_X(x)$."
3636
},
3737
"correctAnswer": "b",
3838
"difficulty": "intermediate"
@@ -46,10 +46,10 @@
4646
"d": "$p_X(0)=0.3,\\hspace{0.2cm} p_X(1)=0.6$."
4747
},
4848
"explanations": {
49-
"a": "Incorrect answer. This option is a valid Binomial distribution, not a Bernoulli distribution.",
50-
"b": "Incorrect answer. A Bernoulli random variable takes only two values.",
51-
"c": "Correct answer! A Bernoulli random variable takes two possible values (often represented as $0$ or $1$), and the probabilities should sum to $1$.",
52-
"d": "Incorrect answer! A Bernoulli random variable does take only two possible values (often represented as $0$ or $1$. However their probabilities should sum to $1$."
49+
"a": "Incorrect. This option is a valid Binomial distribution, not a Bernoulli distribution.",
50+
"b": "Incorrect. A Bernoulli random variable takes only two values.",
51+
"c": "Correct. A Bernoulli random variable takes two possible values (often represented as $0$ or $1$), and the probabilities should sum to $1$.",
52+
"d": "Incorrect. A Bernoulli random variable does take only two possible values (often represented as $0$ or $1$. However their probabilities should sum to $1$."
5353
},
5454
"correctAnswer": "c",
5555
"difficulty": "beginner"
@@ -63,10 +63,10 @@
6363
"d": "$\\frac{1}{\\sqrt{10\\pi}}e^{-\\frac{|x-5|}{10}}$"
6464
},
6565
"explanations": {
66-
"a": "Incorrect answer. A Gaussian random variable has the distribution $\\frac{1}{\\sigma\\sqrt{2\\pi}}e^{-\\frac{(x-\\mu)^2}{2\\sigma^2}}$, where the variance is $\\sigma^2$ and the mean is $\\mu$.",
67-
"b": "Incorrect answer. A Gaussian random variable has the distribution $\\frac{1}{\\sigma\\sqrt{2\\pi}}e^{-\\frac{(x-\\mu)^2}{2\\sigma^2}}$, where the variance is $\\sigma^2$ and the mean is $\\mu$.",
68-
"c": "Correct answer!",
69-
"d": "Incorrect answer. A Gaussian random variable has the distribution $\\frac{1}{\\sigma\\sqrt{2\\pi}}e^{-\\frac{(x-\\mu)^2}{2\\sigma^2}}$, where the variance is $\\sigma^2$ and the mean is $\\mu$."
66+
"a": "Incorrect. A Gaussian random variable has the distribution $\\frac{1}{\\sigma\\sqrt{2\\pi}}e^{-\\frac{(x-\\mu)^2}{2\\sigma^2}}$, where the variance is $\\sigma^2$ and the mean is $\\mu$.",
67+
"b": "Incorrect. A Gaussian random variable has the distribution $\\frac{1}{\\sigma\\sqrt{2\\pi}}e^{-\\frac{(x-\\mu)^2}{2\\sigma^2}}$, where the variance is $\\sigma^2$ and the mean is $\\mu$.",
68+
"c": "Correct.",
69+
"d": "Incorrect. A Gaussian random variable has the distribution $\\frac{1}{\\sigma\\sqrt{2\\pi}}e^{-\\frac{(x-\\mu)^2}{2\\sigma^2}}$, where the variance is $\\sigma^2$ and the mean is $\\mu$."
7070
},
7171
"correctAnswer": "c",
7272
"difficulty": "beginner"
@@ -80,13 +80,13 @@
8080
"d": "$\\frac{1}{(4\\pi)^2}e^{-\\frac{\\sum_{i=1}^4(x_i-8)^2}{4}}$."
8181
},
8282
"explanations": {
83-
"a": "Correct answer!",
84-
"b": "Incorrect answer. The random variables are independent, so their joint probability density function is the product of their individual probability density functions, i.e., $p_{\\boldsymbol X}(x_1,x_2,x_3,x_4)=\\prod_{i=1}^4 p_{X_i}(x_i)$. Now, each $p_{X_i}(x_i)$ is a Gaussian probability distribution function with mean=$2$ and variance = $4$. Use this to arrive at the right answer.",
85-
"c": "Incorrect answer. The random variables are independent, so their joint probability density function is the product of their individual probability density functions, i.e., $p_{\\boldsymbol X}(x_1,x_2,x_3,x_4)=\\prod_{i=1}^4 p_{X_i}(x_i)$. Now, each $p_{X_i}(x_i)$ is a Gaussian probability distribution function with mean=$2$ and variance = $4$. Use this to arrive at the right answer.",
86-
"d": "Incorrect answer. The random variables are independent, so their joint probability density function is the product of their individual probability density functions, i.e., $p_{\\boldsymbol X}(x_1,x_2,x_3,x_4)=\\prod_{i=1}^4 p_{X_i}(x_i)$. Now, each $p_{X_i}(x_i)$ is a Gaussian probability distribution function with mean=$2$ and variance = $4$. Use this to arrive at the right answer."
83+
"a": "Correct.",
84+
"b": "Incorrect. The random variables are independent, so their joint probability density function is the product of their individual probability density functions, i.e., $p_{\\boldsymbol X}(x_1,x_2,x_3,x_4)=\\prod_{i=1}^4 p_{X_i}(x_i)$. Now, each $p_{X_i}(x_i)$ is a Gaussian probability distribution function with mean=$2$ and variance = $4$. Use this to arrive at the right answer.",
85+
"c": "Incorrect. The random variables are independent, so their joint probability density function is the product of their individual probability density functions, i.e., $p_{\\boldsymbol X}(x_1,x_2,x_3,x_4)=\\prod_{i=1}^4 p_{X_i}(x_i)$. Now, each $p_{X_i}(x_i)$ is a Gaussian probability distribution function with mean=$2$ and variance = $4$. Use this to arrive at the right answer.",
86+
"d": "Incorrect. The random variables are independent, so their joint probability density function is the product of their individual probability density functions, i.e., $p_{\\boldsymbol X}(x_1,x_2,x_3,x_4)=\\prod_{i=1}^4 p_{X_i}(x_i)$. Now, each $p_{X_i}(x_i)$ is a Gaussian probability distribution function with mean=$2$ and variance = $4$. Use this to arrive at the right answer."
8787
},
8888
"correctAnswer": "a",
8989
"difficulty": "intermediate"
9090
}
9191
]
92-
}
92+
}

experiment/references.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,2 @@
1-
# References
2-
31
1. Moon, Todd K. Error correction coding: mathematical methods and algorithms. John Wiley & Sons, 2020. (A nice textbook for coding theory, starting from basics of communication systems till codes used in practice today)
4-
2. MacWilliams, Florence Jessie, and Neil James Alexander Sloane. The theory of error-correcting codes. Vol. 16. Elsevier, 1977. (A classic text for linear block codes)
2+
2. MacWilliams, Florence Jessie, and Neil James Alexander Sloane. The theory of error-correcting codes. Vol. 16. Elsevier, 1977. (A classic text for linear block codes)

0 commit comments

Comments
 (0)