R Markdown

4.1

PMF_generative_process_researcher_claim <- function(k){
  probability_value <- ((10**k)*(exp(-10)))/factorial(k)
  return(probability_value)
}
PMF_generative_process_researcher_claim(100)
## [1] 4.864649e-63

Including Plots

4.2

x<-seq(6,14)
prob <- 0
for (a in x) {
  prob <- prob+PMF_generative_process_researcher_claim(a)
}
prob
## [1] 0.8494556

4.3 set of whole numbers

4.4

x<-seq(0,20)
prob <- c()
for (a in x) {
  prob <- c(prob,PMF_generative_process_researcher_claim(a))
}
y<-prob
plot(x,y)  

4.5 According to the researchers claim the average number of infections should be 10. Greater than 10 people were infected for the past 10 days. So it is unlikely that the true mean is 10, as our sample mean seems to be greater. Also, the probability of 20 or more infections in a day is practically 0. Yet on most days there were 20 or more infections. The researchers model thus seems inaccurate.

4.6

Generative_process_researcher_claim <- function(n=1){
infection_rate <- rpois(n,10)
return(infection_rate)
}  
Generative_process_researcher_claim(5)
## [1] 9 5 7 8 8
Generative_process_researcher_claim(5)
## [1]  9 10 12 11 10

No, the values are not same, because the function randomly samples 5 values from a poisson distribution each time.