Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Consider the Moran process described in Problem 4 of Problem Set 1. Of interest is whether the the color that eventually dominates has to do

Consider the Moran process described in Problem 4 of Problem Set 1. Of interest is whether the the color that eventually dominates has to do with the color that is gravitated toward when the urn moves out of balance for the first time. (a) Modify your function from Problem Set 1 to MoranProc <- function(n=20){ urn <- rep(c("blue","red"),each=n/2) ...... } where the input n represents the population size. Different from Problem Set 1, the process should keep running until one of the two colors dominates and the other color is eliminated. Note that technically the input n should be an even number, but in case of odd numbers, the rep() function automatically rounds n/2 down to the nearest integer. Instead of returning the sample path, the function should output a single-element logical element, TRUE indicating the color it first gravitates toward is the same as the color that eventually dominates, and FALSE indicating otherwise. (b) For n = 5, 10, 20, run MoranProc(n) 1000 times and calculate the proportion of TRUEs. Briefly comment on the results.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts

Authors: David Kroenke, David Auer, Scott Vandenberg, Robert Yoder

9th Edition

0135188148, 978-0135188149, 9781642087611

More Books

Students also viewed these Databases questions