Kruschke chapter 2.

1.

Consider the example of the manufactured bouncy balls that are manufactured in four discrete sizes: diameters of 1.0, 2.0, 3.0, and 4.0 (assume units are cm). The manufacturing process is quite imprecise (‘noisy’), however. Assume the noise follows a Normal distribution with mean=0 and variance s2=1. You sample 3 balls of diameter 1.77, 2.23, and 2.7 that were manufactured to be of the same diameter. The prior probability of the balls being from a given diameter are equal. What is the probability of the ball diameter being 1.0, 2.0, 3.0, and 4.0. Show your work. (refer to K2.1.1 pages 20-21 for more details).

See figure below which illustrates my thinking. Note that actual credibility is not assigned in the bottom image because these results are expected relationships.

The upper graph shows the prior credibilities for the four candidate means and normal distributions, located at values 1,2,3,4. In the posterior distribution, bayesian reallocation of credibility indicates that the mean of 2 is most credible because the three balls (diameters 1.77, 2.3, and 2.7) all fall within 1 standard deviation of the mean, or 68% of the data for ball size 2. Following this, ball size 3 is the next most credible, with two balls (diameters 2.3 and 2.7) falling within 1 standard deviation. After this, ball size one is the next most credible with one ball (diameters 1.77) falling within 1 standard deviation. Lastly, ball size 4 is least credible

Here is a picture supporting this reasoning Figure 1, supporting material for question one

2.

Explain why the ‘cloud’ of credible regression lines in the left side panel of Figure 2.5 (K2.3, page 26) have the characteristic shape that they do, e.g., narrow range in center of plot but broader towards edges?

From Kruschke: The left panel in figure 2.5 shows a random smattering of credible regression lines from the posterior distribution. Each line plots the equation (see below) for credible combinations of \(\beta_1\) (slope) and \(\beta_0\) (intercept). The bundle of lines show a range of credible possibilities, given the data, instead of plotting only a single “best” line.

The characteristic shape is formed because the linear regression lines pass through the mean values (“narrow range”) then spread more broadly toward the edges due to different credible values for \(\beta_1\) (slope) and \(\beta_0\) (intercept). The slope and intercept are interdependent.

3.

Kruschke Exercise 2.1

Model A

\(p(x)=1/4\)

Model B

\(p(x)=x/10\)

Model C

\(p(x)=12/(25x)\)

Model A is unbiased because there is equal probability (one out of four; 1/4) that x will be rolled. Model B is biased towards higher numbers rolled, for example the \(p\) that a “1” will be rolled is 10% (1/10) but that a “4” will be rolled is 40% (4/10). Conversely, Model C biases toward the lower numbers (see maths).

# Model B maths
1/10
## [1] 0.1
4/10
## [1] 0.4
# Model C maths
12/(25*1)
## [1] 0.48
12/(25*2)
## [1] 0.24
12/(25*3)
## [1] 0.16
12/(25*4)
## [1] 0.12

4.

Kruschke Exercise 2.2

During the first iteration where each number on the die is rolled equally (25 times), we now change the credibilty of our models so that A is the most credible. Models B and C are less credible but to the same degree.

During the second scenario where 1 is rolled most (48 times) and each successive number occurs fewer and fewer times, we then change the credibility so that that Model C becomes more credible. Model B is the least credible (data are opposite of Model’s prediction) and Model A is marginally more credible than B - but Model C still reigns king.