国产人妻人伦精品_欧美一区二区三区图_亚洲欧洲久久_日韩美女av在线免费观看

合肥生活安徽新聞合肥交通合肥房產生活服務合肥教育合肥招聘合肥旅游文化藝術合肥美食合肥地圖合肥社保合肥醫院企業服務合肥法律

代寫COMPSCI369、代做Python編程設計

時間:2024-05-10  來源:合肥網hfw.cc  作者:hfw.cc 我要糾錯



COMPSCI369 - S1 2024
Assignment 3
Due date: See Canvas
Instructions
This assignment is worth 7.5% of the final grade. It is marked out of 75 points.
Provide a solution as a Python notebook and html with output. Your solution should include well
documented code with the calls to reproduce your results.
Include markdown cells with explanation of the results for each question.
Submit the ipynb and html to Canvas:
• the .ipynb file with outputs from the executed code
• a .html version of the notebook with all outputs of executed code showing. (To get this
format, export from the notebook viewer or use nbconvert.)
Within the notebook, set the random seed to some integer of your choosing (using random.seed)
so that the marker can recreate the same output that you get. You can reset the seed before each
question if you like.
Question 1: Simulating random variables and exploring relationships between distributions (20 Points)
(a) Using the inversion sampling technique described in Section 9.2 of the workbook, write a method rand exp that takes a rate parameter λ as input and
produces as output an exponentially distributed random variable with rate parameter λ. Use random.random() to generate uniform random numbers. (4
marks)
(b) Demonstrate your rand exp is correct by comparing the mean and variance
of the output to theoretical values, and also by comparing the output of your
method to a library method. (4 marks)
(c) Use rand exp to write a method rand poiss that takes a parameter λ as input
and produces as output a Poisson distributed random variable with parameter
λ. (4 marks)
(d) Use rand exp to write a method rand gamma that takes an integer parameter
k and rate parameter θ as input and produces as output a gamma distributed
random variable with parameters k and θ. (4 marks)
(e) Explain why your rand gamma method lacks the generality you would typically
want for simulating gamma distributed random variables. (4 marks)
1
Question 2: Simulating outbreaks (55 Points)
A standard model in epidemiology is the SIR model of infectious disease spread. It
has a population of N hosts being divided into 3 compartments, so is known as a
compartmental model:
• the S compartment of those who are susceptible to the disease
• the I compartment of those who are infectious with the disease
• the R compartment of those who are recovered from the disease and now immune (or, more generally, those who are removed from the epidemic through
recovery with immunity, or isolation, or death, etc).
We assume that S + I + R = N.
The model can be deterministic or stochastic. We consider the stochastic version
here. Times between all events are exponentially distributed with the following rates
which depend on the current state of the outbreak, assumed to be (S, I, R):
• the rate of transmissions is βSI/N and the new state is (S − 1, I + 1, R), and
• the rate of recoveries is γI and the new state is (S, I − 1, R + 1).
You can use any functions from the random module that you like for this question.
Probably the only one you need is random.expovariate.
(a) At what point will the epidemic finish? (2 marks)
(b) Write method sim SIR that takes as inputs N, I0, β, γ and produces as output
a list of the event times and the number susceptible, infected and recovered at
each time point. All outbreaks start at time t = 0 with S0 = N −I0. (8 marks)
(c) Run a simulation with N = 1000, I0 = 10, β = 3, γ = 2 and plot the number
infected through time. (4 marks)
(d) Run an experiment and report the results to approximate the probability that
a large outbreak occurs using the same parameters as above but with only one
initial infected. What has usually happened if there is no large outbreak? (6
marks)
(e) The reproduction number R0 = β/γ of the epidemic is the mean number of
transmissions by a single infected in an otherwise susceptible population (Note
there is a bit of a notation clash: we are not referring to the number of recovered
individuals at time 0 in this case.) Using the same parameters as in part (c)
but allowing β to vary, select five values of R0 above and below 1 to explore
whether or not you get an outbreak. Report and explain your results. (6
marks)
(f) Suppose now that the infectious period is fixed, so that hosts are infectious
for exactly 1 time unit. Is the process still Markov? How would you go about
writing code to simulate such an epidemic? (You do not have to actually write
the code here.) (4 marks)
2
(g) Another common model breaks the infectious period up into m sub-periods,
I1, I2, . . . , Im so is an SI1I2 . . . ImR model. Assuming the amount of time each
individual spends in compartment Ij
is exponential with rate γ, what is the
distribution of the total time spent in I1 to Im? (4 marks)
(h) Drawing on what you know about infections, explain why neither a fixed length
nor an exponential distributed infectious period is a great model and why the
m sub-period model may be preferable. What computational advantage does
this formalism have that makes it easier to work with than some arbitrary
distribution for the infection period? (6 marks)
(i) Consider another compartmental model where there is no immunity to an infection so individuals recover straight back into a susceptible state and can get
infected again. This is know as birth death or SIS process. If we look at only
the type of events and ignore the waiting times between them, this process can
be described as a simple Markov chain. If the population size were fixed at
N = 5, and using transition rates (S, I) → (S − 1, I + 1) at rate βSI/N and
(S, I) → (S + 1, I − 1) at rate γI, write down the transition matrix for the
chain. (5 marks)
(j) Implement an SIS process which takes inputs N, I0, β, γ, t, where t is the number
of iterations (i.e., infection or recovery events) the simulation runs for. (6
marks)
(k) Run a simulation study using the SIS simulator with N = 1000, I0 = 10, β =
3, γ = 2 to determine the long term behaviour of this process. Discuss your
results. (4 marks)

請加QQ:99515681  郵箱:99515681@qq.com   WX:codinghelp














 

掃一掃在手機打開當前頁
  • 上一篇:菲律賓碧瑤到務宿多久 宿務的景點有什么
  • 下一篇:代寫CPT204、代做Java編程設計
  • 無相關信息
    合肥生活資訊

    合肥圖文信息
    流體仿真外包多少錢_專業CFD分析代做_友商科技CAE仿真
    流體仿真外包多少錢_專業CFD分析代做_友商科
    CAE仿真分析代做公司 CFD流體仿真服務 管路流場仿真外包
    CAE仿真分析代做公司 CFD流體仿真服務 管路
    流體CFD仿真分析_代做咨詢服務_Fluent 仿真技術服務
    流體CFD仿真分析_代做咨詢服務_Fluent 仿真
    結構仿真分析服務_CAE代做咨詢外包_剛強度疲勞振動
    結構仿真分析服務_CAE代做咨詢外包_剛強度疲
    流體cfd仿真分析服務 7類仿真分析代做服務40個行業
    流體cfd仿真分析服務 7類仿真分析代做服務4
    超全面的拼多多電商運營技巧,多多開團助手,多多出評軟件徽y1698861
    超全面的拼多多電商運營技巧,多多開團助手
    CAE有限元仿真分析團隊,2026仿真代做咨詢服務平臺
    CAE有限元仿真分析團隊,2026仿真代做咨詢服
    釘釘簽到打卡位置修改神器,2026怎么修改定位在范圍內
    釘釘簽到打卡位置修改神器,2026怎么修改定
  • 短信驗證碼 寵物飼養 十大衛浴品牌排行 suno 豆包網頁版入口 wps 目錄網 排行網

    關于我們 | 打賞支持 | 廣告服務 | 聯系我們 | 網站地圖 | 免責聲明 | 幫助中心 | 友情鏈接 |

    Copyright © 2025 hfw.cc Inc. All Rights Reserved. 合肥網 版權所有
    ICP備06013414號-3 公安備 42010502001045

    国产人妻人伦精品_欧美一区二区三区图_亚洲欧洲久久_日韩美女av在线免费观看
    欧美主播一区二区三区美女 久久精品人 | 国产精品网站大全| 色综合久久88色综合天天提莫| 国产乱子夫妻xx黑人xyx真爽| 国产精品第三页| 精品一区二区三区无码视频 | 成人免费观看a| 欧美精品免费在线| 麻豆中文字幕在线观看| 久艹视频在线免费观看| 日本中文字幕久久看| 国产盗摄xxxx视频xxx69| 午夜精品久久久99热福利| 91九色对白| 亚洲国产精品综合| 国产精品一区久久| 一区二区三区电影| 国产精品一区在线免费观看| 国产aaa精品| 粉嫩av一区二区三区免费观看| 欧美麻豆久久久久久中文| 国模极品一区二区三区| 国产精品第12页| 国产一区二区三区高清| 欧美精品一二区| 国产精品一区二区三区毛片淫片 | 国产在线精品一区二区三区| 国产精品青青草| 麻豆一区二区三区在线观看 | 日本三级中国三级99人妇网站 | 久久6精品影院| 国产日韩中文字幕| 宅男在线精品国产免费观看| 99视频在线免费观看| 日韩一区二区三区资源| 久久久久久久久国产| 激情欧美一区二区三区中文字幕| 久久亚洲精品网站| www国产亚洲精品| 日韩中文在线字幕| 久久精品国产电影| 国产一区视频免费观看| 中文字幕av久久| 国产经品一区二区| 青青青青草视频| 国产精品久久久av| 成人毛片100部免费看| 午夜精品久久久久久久无码| 深夜福利91大全| 国产日本欧美一区二区三区| 亚洲在线观看视频| 精品国产一区二区三区久久久| 国内精品久久久久久久果冻传媒| 精品中文字幕在线观看| 久久久这里只有精品视频| 欧美日韩不卡在线视频| 欧美激情亚洲视频| 色噜噜国产精品视频一区二区 | 日韩中文字幕第一页| 国产又黄又爽免费视频| 亚洲一区二区精品在线观看| 久久久久久久久国产| 国产视频999| 日本免费一级视频| 久久成人这里只有精品| 久久久com| 国产欧美日本在线| 热99精品里视频精品| 国产aⅴ精品一区二区三区黄| 国产v片免费观看| 国产精自产拍久久久久久蜜| 日本精品一区二区三区在线| 国产精品视频一| 国产高清www| 国产精品一区二区三区久久久 | 日韩av电影免费播放| 精品国产乱码久久久久久郑州公司| 91看片淫黄大片91| 免费久久久一本精品久久区| 日本一区二区在线免费播放| 欧美激情在线一区| 久久久精品一区二区| 久久综合给合久久狠狠色| 精品欧美一区二区久久久伦 | 亚洲一区二区三区精品动漫| 国产精品国语对白| 国产成人精品av| 成人在线免费观看一区| 极品粉嫩国产18尤物| 日本一区二区三区www| 欧美激情视频在线| 国产精品久久久久久一区二区 | 亚洲欧洲一区二区在线观看| www.日韩av.com| 久久亚洲一区二区| 国产精品夜色7777狼人| 国内精品视频一区二区三区| 青青青国产在线视频| 午夜精品一区二区三区在线观看| 欧美精品手机在线| 国产精品久久久久久久久久久久午夜片| 久久久av水蜜桃| 91精品在线观看视频| 国产女人水真多18毛片18精品| 欧美亚洲一级片| 青青久久av北条麻妃海外网| 日本视频精品一区| 日本亚洲导航| 亚洲影视九九影院在线观看| 欧美激情小视频| 国产99久久九九精品无码| 国产精品成人一区二区三区| 国产精品美女久久久久久免费| 国产成人精品视频在线观看| 久久久精品视频在线观看| 国产不卡在线观看| 国产va免费精品高清在线| 久久久久se| 视频直播国产精品| 日韩在线观看精品| 国产精品入口免费视| 国产精品久久国产三级国电话系列| 国产精品人成电影在线观看| 国产成人精品亚洲精品| 国产成人精品一区| 国产精品三区在线| 国产精品成人观看视频免费| 欧美xxxx做受欧美.88| 精品伦精品一区二区三区视频| 久久成人亚洲精品| 一区二区三区四区国产| 亚洲激情一区二区三区| 日本欧美一级片| 热久久这里只有精品| 欧美性猛交久久久乱大交小说| 欧美日韩另类丝袜其他| 蜜臀精品一区二区| 国产精品一区二区三区毛片淫片| 成人精品视频久久久久| 7777精品久久久大香线蕉小说| 久久久亚洲影院你懂的| 国产成人短视频| 久久天天躁狠狠躁老女人| 久久伊人精品一区二区三区| 久久久久久91| 欧美一区二区三区免费视| 欧美最猛性xxxx| 国产尤物99| 97国产在线视频| 久久成人福利视频| 国产精品美女久久久久久免费| 九九综合九九综合| 午夜精品一区二区三区四区| 日本aa在线观看| 国产在线精品一区免费香蕉| 99视频日韩| 精品国内亚洲在观看18黄| 欧美激情中文网| 日韩精品欧美专区| 国产欧美精品在线| 久久精品国产sm调教网站演员| 国产精品久久久久久久9999| 亚洲一区二区三区在线观看视频 | 99中文视频在线| 久草热视频在线观看| 国产精品久久久久久久久久三级 | 国产精品视频久久久| 欧美精品videofree1080p| 视频一区二区在线观看| 精品欧美日韩| 91精品国产777在线观看| 久久久www成人免费精品| 亚洲精品在线视频观看| 韩国一区二区av| 久久伦理网站| 国产精品九九久久久久久久| 日韩av免费在线| 国产噜噜噜噜久久久久久久久 | 人妻少妇精品久久| 国产精品亚洲自拍| 久久久精品日本| 午夜免费久久久久| 国产日韩在线亚洲字幕中文| 国产成人jvid在线播放| 欧美精品在线极品| 欧美在线视频一区二区三区| 国产精品一区二区三区久久| 日韩中文字幕视频在线| 亚洲一区二区精品在线观看| 国精产品一区一区三区视频| 色吧影院999| 欧美一区二区视频在线| 国产麻豆一区二区三区在线观看| 国产成人拍精品视频午夜网站| 亚洲国产日韩美| 国产精品揄拍500视频| 国产精品久久久久久久免费大片 | 青草成人免费视频| 91精品国产高清自在线看超| 国产精品成人品|