Question
MATLAB

Sequences: Coin 1: HHTHT Coin 2: THTTT Coin 3: HHHHH Coin 4: THTTHTHTHT Coin 5: HHTHHHHHTH Coin 6: TTTTTTTTTT .Coin 7: THTTHTTHHTHTHTTHTHTTTHTTHT Coin 8: HHTHHHHTHHHTHHHTHHHHHTHH H H Coin 9: HHHHHHHHHHHHHHH HH HHHHHHHHH
(b) (5 points) To model peoples responses to this experiment, compare the following hypotheses h: fair coin, P(Headsj H) -0.5. In this case, the probability of a sequence given Hi only depends on the length of the sequence, H + T, because heads and tails are equally likely: H2: weighted coin, P(Heads|θ,H2) requires marginalizing over the unknown coin weight 6: 6; P(θ|H2)-Uniform (0,1). Computing P (DI . 0 Later in the course, we will solve this integral analytically. For now, compute a discrete approximation to the integral by a Riemann sum using the midpoint rule: PCD[H2)s> P(D1%)p@n). where 6n-(2n-1)/2N , and P(%) :-1/N. Use N-I00 for this problem. To test between these hypotheses, use the log posterior odds ratio: P(H2ID) log P(Hal D) = P(DIH2)P(H2) P(D|H1) (H1) log Compute the log posterior odds ratio for each of the above coin flip sequences, assuming P(H)/P(H)-1. Using the MATLAB function bar, plot the average human judgments from both conditions against the model log posterior odds for all coin flip sequences. How well does the model capture peoples judgments in each condition? Are there any systematic differences between people and the model? Submit your code along with your results. (e) (4 points) One reason why the model might deviate from a participants judgments is th equal priors: P(HyP(Hh) - 1. What is the effect of varying P(H) on the log posterior odds? Explain why this effect occurs. Can you draw any conclusions about which values of P(Hi) fit your participants judgments best in each condition? Submit your code along with your results. Try out other assumptions for P(H) (remember that P(Hhy-1-P)
Notes: B)
Find likelihood for each sequence 1-9 for each hypothesis.
First hypothesis with the fair coin (theta value = 0.5): what is the probability that we can get each sequence, 1 through 9.
Second hypothesis with weighted coin(don’t know theta value): what is likelihood of getting sequence 1 through 9. Using equation to find all possible hundred theta values. For each theta value we need to compute likelihood.
Then we sum them up across all possible theta values. Then we get likelihood under the second hypothesis
0 0
Add a comment Improve this question Transcribed image text
Know the answer?
Add Answer to:
MATLAB Notes: B) Find likelihood for each sequence 1-9 for each hypothesis. First hypothesis with the...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • 1. Use the MATLAB command freqz to calculate the DTFT of System 1, to find its frequency response...

    1. Use the MATLAB command freqz to calculate the DTFT of System 1, to find its frequency response 0.25r[n] + 0.25r|n -2]. H(). For this exercise, System 1 has a different difference equation yn] Find H1 (w) for- aK π, with frequency steps of Δα-π/100. 2. Plot both the magnitude |H1(2)| and the phase LH1(w) vs w, for-π < ώ < π. Use abs and angle commands to obtain magnitude and phase. Label and title both plots and include in...

  • In this problem, we will model the likelihood of a particular client of a financial firm defaulting on his or her loans based on previous transactions. There are only two outcomes, "Yes" or &...

    In this problem, we will model the likelihood of a particular client of a financial firm defaulting on his or her loans based on previous transactions. There are only two outcomes, "Yes" or "No", depending on whether the client eventually defaults or not. It is believed that the client's current balance is a good predictor for this outcome, so that the more money is spent without paying, the more likely it is for that person to default. For each x,...

  • 1. Find the next two numbers in each sequence. A) 3,1,2,-1,3,4, B) 16, 24, 36, 54,...

    1. Find the next two numbers in each sequence. A) 3,1,2,-1,3,4, B) 16, 24, 36, 54, 81, 2. Find a recursion formula for the sequences listed above. A) 4 B) . 3. Determine tz. 14, and ts for the recursion formulas listed below. A) 11 = 1, tz=3, th=2 19-1-317-2- B) t1 = 4, ty=3, tz=2, n =(19-3 + 1n-2)X In-1

  • Find B. (1 point) Suppose that you are to conduct the following hypothesis test: 0 H...

    Find B. (1 point) Suppose that you are to conduct the following hypothesis test: 0 H 510 H1: μ 510 Но Assume that you know that σ = 80, n = 42, x = 493.2, and take α = 0.01 . Draw the sampling distribution, and use it to determine each of the following: A. The value of the standardized test statistic: 1.36 Note: For the next part, your answer should use interval notation. An answer of the form (-00,...

  • gretl: model 1 File Edit Tests Save Graphs Analysis LaTeX Question 5 In your first year...

    gretl: model 1 File Edit Tests Save Graphs Analysis LaTeX Question 5 In your first year microeconomics course you learned about differentiated products. As an econometrics student differentiated products are interesting because they are prime candidates for hedonic price modelling. As mentioned in class, a hedonic price model is a regression model that relates the price of a differentiated product (a residential house in this case) to its characteristics. For this assignment you will construct a simple hedonic model for...

  • photos for each question are all in a row (1 point) In the following questions, use...

    photos for each question are all in a row (1 point) In the following questions, use the normal distribution to find a confidence interval for a difference in proportions pu - P2 given the relevant sample results. Give the best point estimate for p. - P2, the margin of error, and the confidence interval. Assume the results come from random samples. Give your answers to 4 decimal places. 300. Use 1. A 80% interval for pı - P2 given that...

  • explaim the mechanisms amd toxological effects if type 1 diabetes in this article Exposure to arsenic...

    explaim the mechanisms amd toxological effects if type 1 diabetes in this article Exposure to arsenic in drinking water is associated with increased prevalence of diabetes. We previously reported an association of diabetes and urinary concentration of dimethylarsinite (DMAS"), a toxic product of arsenic methylation by arsenic (+ 3 oxidation state) methyltransferase (AS3MT). Here we examine associations between AS3MT polymorphism, arsenic metabolism and diabetes. Fasting blood glucose, oral glucose tolerance and self-reported diagnoses were used to identify diabetic individuals. Inorganic...

  • Please read the article bellow and discuss the shift in the company's approach to genetic analysis....

    Please read the article bellow and discuss the shift in the company's approach to genetic analysis. Please also discuss what you think about personal genomic companies' approaches to research. Feel free to compare 23andMe's polices on research with another company's. Did you think the FDA was right in prohibiting 23andMe from providing health information? These are some sample talking points to get you thinking about the ethics of genetic research in the context of Big Data. You don't have to...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT