Question

In: Math

4.3. Referring to the previous problem, again suppose that a uniform prior is placed on the...

4.3. Referring to the previous problem, again suppose that a uniform prior is placed on the proportion π, and that from a random sample of 327 voters, 131 support the sales tax. Also suppose that the newspaper plans on taking a new survey of 20 voters. Let y∗ denote the number in this new sample who support the sales tax.

  1. Find the posterior predictive probability that y∗ = 8.

  2. Find the95% posterior predictive interval for y∗.Do this by finding the predictive probabilities for each of the possible values of y∗ and ordering them from largest probability to smallest. Then add the most probable values of y∗ into your probability set one at a time until the total probability exceeds 0.95 for the first time.

Solutions

Expert Solution

library(LearnBayes)
n <- 20
s = 131
f = 327-131

#assuming uniform prior
alpha = 1
beta = 1

#a
pbetap( c(alpha+ s, f + beta ), n, 8)

#b
prob <- pbetap( c(alpha+ s, f + beta ), n, 0:n)

#theoretical probability
probTable <-as.data.frame( cbind(0:n, prob))
probTable <- probTable[order(-probTable$prob),]
probTable$Cumsum = cumsum(probTable$prob)
i <- (which(probTable$Cumsum >= 0.95) ) [1]
Interval <- probTable$V1[1:i]
Interval

   

Please rate

Please look below in comments for help in other questions


Related Solutions

Referring to the Cranberry Company of the previous problem: a. Calculate the DOL when sales are...
Referring to the Cranberry Company of the previous problem: a. Calculate the DOL when sales are 20%, 30% and 40% above breakeven. b. Suppose automated equipment is added which increases fixed costs by $20,000 per month. How much will total variable cost have to decrease to keep the breakeven point the same? c. Calculate the DOL at the same output levels used in part a. d. Comment on the differences in DOL with and without the additional equipment. Previous problem...
Referring back to the scenario in the previous few questions, suppose the app company wanted to...
Referring back to the scenario in the previous few questions, suppose the app company wanted to make a 99% confidence interval for the true satisfaction rate with a margin of error of 2%. How big a sample would they need to take? 4147.36 3382 3381.42 4148
**SHOW ALL WORK IN EXCEL QM** Problem-5: In the previous problem suppose the sale of football...
**SHOW ALL WORK IN EXCEL QM** Problem-5: In the previous problem suppose the sale of football programs described by the probability distribution only applies to days when the weather is good. When poor weather occurs on the day of a football game, the crowd that attends the game is only half of capacity. When this occurs, the sales of programs decreases, and the total sales are given in the following table: Number (in 100s) of Programs Sold Probability 12 0.25...
Referring to Problem 2 above, suppose the HTML file references ten very small objects on the...
Referring to Problem 2 above, suppose the HTML file references ten very small objects on the same server. Neglecting transmission time, how much time elapses with a. Non-persistent HTTP with no parallel TCP connections? b. Non-persistent HTTP with the browser configured for 3 parallel connections? c. Persistent HTTP? (Assume that pipelining is used.)
In the previous problem, suppose the most recent dividend was $4 and the dividend growth rate...
In the previous problem, suppose the most recent dividend was $4 and the dividend growth rate is 6 percent. Assume that the overall cost of debt is the weighted average of that implied by the two outstanding debt issues. Both bonds make semiannual payments. The tax rate is 35 percent. What is the company’s WACC? Please show work and calculations, thank you! (THIS IS THE PREVIOUS PROBLEM-BELOW) Filer Manufacturing has 8.2 million shares of common stock outstanding. The current share...
#5b. Suppose that the two masses in the previous problem remains separated by a distance d...
#5b. Suppose that the two masses in the previous problem remains separated by a distance d meters, but the second mass is replaced by a mass that is 8.0 times smaller than the one it replaces. In terms of F, the original force on each of the masses, what is the magnitude of the force on the first mass now?   Give your answer in the form "(a.bcd)F" N. #5a. The magnitude of the gravitational force that a point mass exerts...
Referring to your food tracker for the previous 24 hours: List the percentages of your calories...
Referring to your food tracker for the previous 24 hours: List the percentages of your calories that came from fat, protein, and carbohydrates. List the sources of dietary fats that you consumed recently. Are they are "good" fats or "bad" fats? What impact might these good and bad fats might have on your body? What food contributed the most protein? Is this food a complete protein or an incomplete protein? What food contributed the most carbohydrates? Is this food a...
   A flat coil of wire is placed in a uniform magnetic field that is in the...
   A flat coil of wire is placed in a uniform magnetic field that is in the y direction. (i) The magnetic flux through the coil is maximum if the coil is (a) in the xy plane(b) in either the xy or the yz plane (c) in the xz plane (d) in any orientation, because it is constant. (ii) For what orientation is the flux zero? Choose from the same possibilities.
Referring to your make believe business that were used to answer the previous the Sarbanes-Oxley Act...
Referring to your make believe business that were used to answer the previous the Sarbanes-Oxley Act emphasizes how important Internal Controls are and the penalties that can be imposed on a company for not following good internal control practices. Please answer the following questions regarding Internal Controls discussions, which collection method would you adopt for your business and why? How do you determine what amount of receivable would be uncollectible? How often would that amount be adjusted? Who should make...
Question 10a. Consider again the file MyNotes.txt from the previous questions. Assuming that users who are...
Question 10a. Consider again the file MyNotes.txt from the previous questions. Assuming that users who are neither Bob nor members of the personnel group should have no access to the file, which octal code would you use with chmod to set the permissions on the file for all users? Select one: a. 665 b. 664 c. 110 d. o+0 e. 660 f. 770 g. o-0 h. 550 i. o=7 j. 764 k. 655 l. o=0 m. 755 n. 760 Part...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT