# Consider the setting of example 12.18, where we assume that all grades are observed but none of…

### STUCK with your assignment? When is it due? Hire our professional essay experts who are available online 24/7 for an essay paper written to a high standard at a reasonable price.

Order a Similar Paper Order a Different Paper

Consider the setting of example 12.18, where we assume that all grades are observed but none of the Ij or D_{k} variables are observed. Show how you would use the set of collapsed samples generated in this example to compute the expected value of the number of smart students (i^{1}) who got a grade of a C (g^{3}) in an easy class (d^{0}).

Example 12.18

Consider the Markov network defined by the Bayesian network of example 12.11, reduced over the evidence G = g. This Markov network is a bipartite graph, where we have two sets of variables I, D such that the only edges in the network are of the form I_{j}, D_{k}. Let φ_{j,k}(I_{j} , D_{k}) be the factor associated with each such edge. (For simplicity of notation, we assume that there is a factor for every such edge; the factors corresponding to grades that were not in the model will be vacuous.) We can now apply collapsed Gibbs sampling, selecting to sample the variables D and maintain a distribution over I; this choice will (in most cases) be better, since there are usually more students than courses, and it is generally better to sample in a lower-dimensional space. Thus, our Markov chain needs to be able to sample D_{k} from P_{Φ}(D_{k} | d_{−k}):

The expression in the numerator, and each term in the sum in the denominator, is the probability of a full assignment to D. This type of expression can be computed as the partition function of the reduced Markov network that we obtain by setting D = d:

Each of the factors in the product is a singleton over an individual I_{j}. Thus, we can compute the partition function or marginals of this distribution in linear time. In particular, we can easily compute the Gibbs transition probability. Using the same analysis, we can easily compute an expression for P_{Φ}[d](I) in closed form, as a product of individual factors over the I_{j}’s. Thus, we can also easily compute expectations of any function over these variables, such as the expected value of the number of smart students who got a grade of a C in an easy class.

### Everyone needs a little help with academic work from time to time. Hire the best essay writing professionals working for us today!

Get a 15% discount for your first order

Order a Similar Paper Order a Different Paper