加勒比久久综合,国产精品伦一区二区,66精品视频在线观看,一区二区电影

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

代寫(xiě)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)有什么
  • 下一篇:代寫(xiě)CPT204、代做Java編程設(shè)計(jì)
  • 無(wú)相關(guān)信息
    合肥生活資訊

    合肥圖文信息
    2025年10月份更新拼多多改銷助手小象助手多多出評(píng)軟件
    2025年10月份更新拼多多改銷助手小象助手多
    有限元分析 CAE仿真分析服務(wù)-企業(yè)/產(chǎn)品研發(fā)/客戶要求/設(shè)計(jì)優(yōu)化
    有限元分析 CAE仿真分析服務(wù)-企業(yè)/產(chǎn)品研發(fā)
    急尋熱仿真分析?代做熱仿真服務(wù)+熱設(shè)計(jì)優(yōu)化
    急尋熱仿真分析?代做熱仿真服務(wù)+熱設(shè)計(jì)優(yōu)化
    出評(píng) 開(kāi)團(tuán)工具
    出評(píng) 開(kāi)團(tuán)工具
    挖掘機(jī)濾芯提升發(fā)動(dòng)機(jī)性能
    挖掘機(jī)濾芯提升發(fā)動(dòng)機(jī)性能
    海信羅馬假日洗衣機(jī)亮相AWE  復(fù)古美學(xué)與現(xiàn)代科技完美結(jié)合
    海信羅馬假日洗衣機(jī)亮相AWE 復(fù)古美學(xué)與現(xiàn)代
    合肥機(jī)場(chǎng)巴士4號(hào)線
    合肥機(jī)場(chǎng)巴士4號(hào)線
    合肥機(jī)場(chǎng)巴士3號(hào)線
    合肥機(jī)場(chǎng)巴士3號(hào)線
  • 短信驗(yàn)證碼 目錄網(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

    欧美丰满日韩| 99久精品视频在线观看视频| 日韩理论电影大全| 美女视频亚洲色图| 成人自拍视频| 日韩中文影院| 99热这里只有精品8| 国产日韩欧美中文在线| 日韩国产欧美视频| 日韩夫妻性生活xx| 99在线观看免费视频精品观看| 日本一区二区乱| 欧美日韩中文| 亚洲精品乱码日韩| 97视频热人人精品免费| 欧美福利视频| 国产精品对白久久久久粗| 国产精品一区二区精品视频观看| 日本美女久久| 成人三级高清视频在线看| 91久久久精品国产| 精品视频99| 日本亚洲免费观看| 99国内精品久久久久| 久久精品国产成人一区二区三区 | 中文无码日韩欧| 欧美黄色一区| 亚洲高清网站| se01亚洲视频| 三级电影一区| 爽好久久久欧美精品| 羞羞色午夜精品一区二区三区| 97久久综合精品久久久综合| 国产麻豆精品久久| 在线观看一区| 麻豆精品在线看| 欧美极品在线| 久久久久伊人| 日韩欧美一区二区三区免费观看| av中文字幕在线观看第一页 | 北条麻妃在线一区二区免费播放| 国产精品一线天粉嫩av| 中文字幕免费一区二区三区| 麻豆91精品91久久久的内涵| 四虎精品一区二区免费| 91精品国产66| 日韩免费在线电影| 国产亚洲人成a在线v网站| 欧美精品资源| 国产精品xxx| 国产精品一卡| 日韩高清在线不卡| 日本不卡视频在线| 久久香蕉精品香蕉| 国产精品18| 欧美区一区二区| 亚洲精品动态| 天堂精品在线视频| 91精品国产自产精品男人的天堂| 视频精品国内| 色婷婷精品视频| 亚洲午夜极品| aa级大片欧美三级| 日本一区二区在线看| 国产不卡123| 91久久久久久白丝白浆欲热蜜臀| 欧美亚洲综合视频| 日韩黄色免费电影| 国内自拍一区| 日韩电影免费在线看| 一区二区三区自拍视频| 欧美sss在线视频| 精品日韩毛片| 久久xxxx精品视频| 麻豆国产在线| 精品亚洲a∨| 永久亚洲成a人片777777| 亚洲国产合集| 岛国精品一区| 91高清一区| 蜜桃av噜噜一区二区三区小说| 日韩中文字幕高清在线观看| 男人天堂久久| 欧美视频三区| 日本不卡高清| av不卡在线看| 日韩理论片av| 欧美日韩18| 亚洲2区在线| 国产综合色产| а√在线中文在线新版| 欧美一区视频| 日韩精品免费一区二区夜夜嗨| 禁断一区二区三区在线| 亚洲深夜激情| 日本电影久久久| 国产成人三级| 999视频精品| 国产精品传媒精东影业在线| 狠狠久久伊人中文字幕| 国产在线日韩精品| 久久影视一区| а√天堂8资源中文在线| 一区二区动漫| 麻豆一区在线| 亚洲经典在线| 日韩久久一区| 伊人久久大香线蕉av超碰| 欧美不卡高清| 深夜成人在线| 国产精品视频一区二区三区四蜜臂| 国产精品三p一区二区| av不卡在线看| 国产精品亚洲欧美| 亚洲综合影院| 美女黄色成人网| 亚洲区国产区| 精品国产一区二区三区不卡蜜臂 | 国产探花一区在线观看| 国产综合欧美| 日韩精品一区二区三区av| 国产一区二区精品福利地址| 波多野结衣在线播放一区| 成人午夜一级| 操欧美女人视频| 91一区二区| 婷婷精品在线观看| 黄色av成人| 六月丁香婷婷久久| 欧美日韩在线播放视频| 日韩在线中文| 日韩精品一区二区三区中文在线| 国产视频一区三区| 亚洲精品美女91| 亚洲天堂久久| 免费永久网站黄欧美| 牛牛精品成人免费视频| 日韩在线中文| julia中文字幕一区二区99在线| 免费成人在线观看视频| 国产欧美精品久久| 免费日韩av片| 亚洲一区导航| 亚洲综合不卡| 国产精品最新| 日韩1区2区| 久久天堂久久| 日韩国产欧美一区二区| 中文字幕一区日韩精品| 日韩精品永久网址| 精品理论电影在线| 精品国产黄a∨片高清在线| 久久裸体视频| 日韩精品亚洲专区| 黑人一区二区| 综合干狼人综合首页| 日韩中文字幕不卡| 日本三级亚洲精品| 日韩激情在线| 久久久精品性| 欧美亚洲自偷自偷| 91成人精品| 国产一区二区三区站长工具| 成人激情视频| 青草国产精品| 日本成人在线不卡视频| aa国产精品| 日本成人精品| 国产69精品久久| **女人18毛片一区二区| 国产麻豆精品| 亚洲性色av| 九九久久电影| 亚洲人成亚洲精品| 91p九色成人| 一本色道久久综合| 久久久国产精品入口麻豆 | 亚洲精品影视| 国产高潮在线| 伊人久久大香线蕉av不卡| 欧美激情精品久久久六区热门| 香蕉国产精品偷在线观看不卡| 亚洲成aⅴ人片久久青草影院| 手机在线观看av| 亚洲精品一区二区妖精| 国产一区国产二区国产三区| 日韩欧美1区| 亚洲精品成人| 伊人久久大香线蕉av超碰| 久久中文精品| 日韩成人激情| 亚洲一级高清| 日韩国产在线不卡视频| 免费一区视频| 高清毛片在线观看| 欧美裸体在线版观看完整版| 色综合综合色| 国产精品久久777777毛茸茸| 成人激情电影在线| 婷婷另类小说|