HOMEWORK 9, PROBLEM 1

You are interested in estimating the difference in mean home insurance costs between rural (R) and urban (U) areas in your state. You draw a sample of 24 communities, 12 rural and 12 urban, and record the price of home insurance for comparable homes in each community. These are the results:
   Community    Cost     Rural/Urban
      1      1037.1926        R
      2       854.9644        R
      3      1077.8903        R
      4       979.5815        R
      5      1087.6967        R
      6      1130.5576        R
      7       791.5984        R
      8       839.5995        R
      9      1366.3680        R
     10      1084.1956        R
     11      1051.8420        R
     12      1096.6825        R
     13       910.6944        U
     14      1337.9442        U
     15      1124.6848        U
     16      1257.4362        U
     17       884.2373        U
     18       976.7531        U
     19      1158.1457        U
     20      1225.0387        U
     21      1081.0166        U
     22      1300.6662        U
     23      1038.8292        U
     24       638.7010        U

1) Assuming you have no initial (prior) information, compute the posterior probability density of the difference in mean insurance cost for rural an urban communities.


2) Compute the posterior probability that the difference is greater than zero.


3) Suppose now that additional data are available about home insurance prices in 8 other states. Data consist of mean insurance prices for urban and rural communities. Describe how you would use this information to construct an informative prior distribution. Compute a new posterior distribution using the prior distribution you constructed. Compare the results with what you obtained in 1).


    State 	    Mean Rural Mean Urban
	1            1008.8863  1110.4267
        2             706.4740  1140.6411
        3            1202.2712   976.8444
        4            1291.4842  1196.7039
        5             862.4730   987.9373
        6             686.0438   917.4043
        7            1236.7910  1218.4957
        8            1135.3646  1255.9486
4) Discuss strengths and limitations of using information from other states in estimating the difference in mean insurance cost for rural an urban communities in your state.