Created
May 12, 2019 11:44
-
-
Save bivoje/08e39f8be88ba0b153f52eedff739c87 to your computer and use it in GitHub Desktop.
Problem solved for Exercise 5.4.13 of "Probability and Statistical Inference 9th Ed"
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(* Probability and Statistical Inference 9th *) | |
(* Exercise 5.4.13 *) | |
(* h1 == f *) | |
h1[x_] := (x+1)/6 | |
(* adopted result of excercise 5.4.9. *) | |
lift[f_, n_] := Sum[f[x] f[#1-x], {x, Max[#1-n, 0], Min[n, #1]}] & | |
(* a,b) h2 == W1 == W2 *) | |
h2 := lift[h1, 2] | |
Map[h2,Range[0, 2 2]] | |
(* c) h4 == W *) | |
h4 := lift[h2, 4] | |
Map[h4,Range[0, 2 4]] | |
(* d) h8 == Y *) | |
h8 := lift[h4, 8] | |
Map[h8,Range[0, 2 8]] | |
(* e) they are all skewed *) | |
BarChart[Map[h1,Range[0, 2 1]]] | |
BarChart[Map[h2,Range[0, 2 2]]] | |
BarChart[Map[h4,Range[0, 2 4]]] | |
BarChart[Map[h8,Range[0, 2 8]]] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment