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

合肥生活安徽新聞合肥交通合肥房產(chǎn)生活服務(wù)合肥教育合肥招聘合肥旅游文化藝術(shù)合肥美食合肥地圖合肥社保合肥醫(yī)院企業(yè)服務(wù)合肥法律

代寫COMPSCI369、代做Python編程設(shè)計(jì)

時(shí)間:2024-05-10  來(lái)源:合肥網(wǎng)hfw.cc  作者:hfw.cc 我要糾錯(cuò)



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)

請(qǐng)加QQ:99515681  郵箱:99515681@qq.com   WX:codinghelp














 

掃一掃在手機(jī)打開(kāi)當(dāng)前頁(yè)
  • 上一篇:菲律賓碧瑤到務(wù)宿多久 宿務(wù)的景點(diǎn)有什么
  • 下一篇:代寫CPT204、代做Java編程設(shè)計(jì)
  • 無(wú)相關(guān)信息
    合肥生活資訊

    合肥圖文信息
    流體仿真外包多少錢_專業(yè)CFD分析代做_友商科技CAE仿真
    流體仿真外包多少錢_專業(yè)CFD分析代做_友商科
    CAE仿真分析代做公司 CFD流體仿真服務(wù) 管路流場(chǎng)仿真外包
    CAE仿真分析代做公司 CFD流體仿真服務(wù) 管路
    流體CFD仿真分析_代做咨詢服務(wù)_Fluent 仿真技術(shù)服務(wù)
    流體CFD仿真分析_代做咨詢服務(wù)_Fluent 仿真
    結(jié)構(gòu)仿真分析服務(wù)_CAE代做咨詢外包_剛強(qiáng)度疲勞振動(dòng)
    結(jié)構(gòu)仿真分析服務(wù)_CAE代做咨詢外包_剛強(qiáng)度疲
    流體cfd仿真分析服務(wù) 7類仿真分析代做服務(wù)40個(gè)行業(yè)
    流體cfd仿真分析服務(wù) 7類仿真分析代做服務(wù)4
    超全面的拼多多電商運(yùn)營(yíng)技巧,多多開(kāi)團(tuán)助手,多多出評(píng)軟件徽y1698861
    超全面的拼多多電商運(yùn)營(yíng)技巧,多多開(kāi)團(tuán)助手
    CAE有限元仿真分析團(tuán)隊(duì),2026仿真代做咨詢服務(wù)平臺(tái)
    CAE有限元仿真分析團(tuán)隊(duì),2026仿真代做咨詢服
    釘釘簽到打卡位置修改神器,2026怎么修改定位在范圍內(nèi)
    釘釘簽到打卡位置修改神器,2026怎么修改定
  • 短信驗(yàn)證碼 豆包網(wǎng)頁(yè)版入口 破天一劍 目錄網(wǎng) 排行網(wǎng)

    關(guān)于我們 | 打賞支持 | 廣告服務(wù) | 聯(lián)系我們 | 網(wǎng)站地圖 | 免責(zé)聲明 | 幫助中心 | 友情鏈接 |

    Copyright © 2025 hfw.cc Inc. All Rights Reserved. 合肥網(wǎng) 版權(quán)所有
    ICP備06013414號(hào)-3 公安備 42010502001045

    国产人妻人伦精品_欧美一区二区三区图_亚洲欧洲久久_日韩美女av在线免费观看
    99久久激情视频| 国产欧美一区二区三区视频| 美日韩免费视频| 日本一区二区不卡高清更新| 亚洲精品一区国产精品| 精品乱色一区二区中文字幕| 国产成人精品一区二区在线| 91精品国产91久久久久久不卡| 国产欧美精品aaaaaa片| 国产综合久久久久| 日本高清视频一区| 日韩国产欧美亚洲| 欧美在线一级va免费观看| 日韩欧美亚洲天堂| 欧美亚洲在线视频| 国产午夜大地久久| 国产精品一区二区电影| 国产有码在线一区二区视频 | 日本婷婷久久久久久久久一区二区| 欧美激情国产精品| 亚洲综合日韩中文字幕v在线| 亚洲影视中文字幕| 日本三级久久久| 欧美丰满熟妇xxxxx| 国产精品一区二区不卡视频| 久久久久久国产精品mv| 久久精品视频一| 综合一区中文字幕| 午夜啪啪免费视频| 日韩免费av一区二区| 蜜桃久久精品乱码一区二区| 成人久久久久久久| 久久国产色av免费观看| 欧美极品欧美精品欧美| 99在线视频首页| 国产精品欧美久久久| 午夜精品理论片| 国产日韩一区二区在线观看| 久久福利电影| 亚洲人成人77777线观看| 狠狠爱一区二区三区| 国产精国产精品| 欧美激情亚洲综合一区| 欧美日韩一区二区三区电影| 国产女主播自拍| 久久综合伊人77777蜜臀| 亚洲第一精品区| 国产九色porny| 国产精品国产一区二区| 日本免费成人网| 国产精品91免费在线| 欧美激情综合色综合啪啪五月| 欧美国产日韩在线播放| 久草热视频在线观看| 亚洲国产精品综合| 91九色国产视频| 亚洲影院污污.| 波多野结衣成人在线| 最新av网址在线观看| 黄色一级一级片| 国产精品欧美激情在线观看| 日韩精品欧美专区| 久久精品福利视频| 欧美极品jizzhd欧美| 国产精品区一区| 精品视频第一区| 欧美激情亚洲综合一区| 成人动漫在线视频| 亚洲精品蜜桃久久久久久| 久久婷婷国产精品| 青草热久免费精品视频| 久久久99久久精品女同性| 欧美日韩免费精品| 国产精品国色综合久久| 国产一区二区在线免费视频| 久色乳综合思思在线视频| 成人免费xxxxx在线观看| 污污污污污污www网站免费| 日韩在线视频观看| 美日韩精品免费| 一区二区不卡视频| 色老头一区二区三区在线观看| 欧美日韩激情四射| 亚洲国产精品女人| 国产精品美女无圣光视频| 国产精品亚洲综合| 欧美亚洲色图视频| 中文字幕一区二区三区四区五区| 久久久久一本一区二区青青蜜月| 欧美一区二视频在线免费观看| 九九精品在线播放| 日韩中文字在线| 国产精品99久久久久久白浆小说| 免费看黄色a级片| 日韩一二区视频| 亚洲高清123| 影音先锋欧美在线| 欧美激情视频网址| 久久综合伊人77777蜜臀| 7777在线视频| 成人短视频在线观看免费| 美日韩精品免费| 好吊色欧美一区二区三区视频| 日日噜噜噜噜夜夜爽亚洲精品| 精品久久久三级| 久久综合久久美利坚合众国| 国产成人精彩在线视频九色| www.av一区视频| 超碰97人人人人人蜜桃| 国产美女精彩久久| 国产乱码精品一区二区三区日韩精品| 激情视频综合网| 黄色片免费在线观看视频| 好吊色欧美一区二区三区四区| 欧美激情亚洲天堂| 精品午夜一区二区| 国产欧美一区二区白浆黑人| 国产一区视频免费观看| 国产女人精品视频| 成人免费视频91| 国产精品羞羞答答| 成人精品一二区| 国产高清视频一区三区| 国产成人精品网站| 国产精品女主播视频| 在线视频一区观看| 日日碰狠狠丁香久燥| 青春草在线视频免费观看| 蜜臀av性久久久久蜜臀av| 成人精品久久久| 久久久久免费视频| 久久香蕉频线观| 午夜精品久久久久久久99黑人 | 国产在线一区二区三区欧美| 国产日韩欧美综合| 国产成人在线一区二区| 国产精品露脸自拍| 亚洲不卡中文字幕无码| 欧美日韩一区二区三区在线观看免| 精品视频导航| 久久久久久久久久久91| 国产精品高清在线| 亚洲日本精品国产第一区| 欧美日韩大片一区二区三区| 福利视频一区二区三区四区| 久久久久久久久久久免费| 在线视频不卡一区二区三区| 人妻内射一区二区在线视频| 国产日韩三区| 色噜噜亚洲精品中文字幕| 一卡二卡3卡四卡高清精品视频| 人妻无码一区二区三区四区| 操人视频欧美| 九九久久国产精品| 91精品成人久久| 国产精品久久九九| 免费日韩中文字幕| 久久精品国产成人| 日本国产一区二区三区| 超碰97在线播放| 在线亚洲美日韩| 国产伦精品一区二区三区视频免费 | 欧洲成人免费视频| 国产成人a亚洲精v品无码| 亚洲a在线播放| 91精品国产沙发| 亚洲图片在线观看| 97久久国产精品| 亚洲一区二区三区在线免费观看| 国产美女久久久| 一本久道久久综合狠狠爱亚洲精品| 国产一区亚洲二区三区| 国产精品久久久久9999小说 | 久久草.com| 青草青草久热精品视频在线观看 | 日韩女优在线播放| 国产精品视频播放| 国产日韩欧美中文| 亚洲综合欧美日韩| 国产成人精品免费看在线播放| 亚洲.欧美.日本.国产综合在线| 国产大尺度在线观看| 欧美与黑人午夜性猛交久久久| 国产精品久久久av久久久| av动漫在线看| 日本一区二区免费高清视频| 国产精品久久久久久亚洲影视| 国产奶头好大揉着好爽视频| 亚洲视频电影| 久久久国产精彩视频美女艺术照福利| 黄色污污在线观看| 亚洲图片都市激情| 日韩视频免费在线观看| 国产欧美韩日| 欧美一二三区| 中文字幕综合在线观看| 久久久久久久久久亚洲| 国产伦精品一区二区三| 欧美最猛性xxxxx(亚洲精品)| 欧美激情视频在线免费观看 欧美视频免费一 |