785 1

[统计软件] 求帮忙用R绘制两个图 [推广有奖]

  • 0关注
  • 0粉丝

已卖:3份资源

高中生

22%

还不是VIP/贵宾

-

威望
0
论坛币
1000 个
通用积分
3.4994
学术水平
0 点
热心指数
0 点
信用等级
0 点
经验
330 点
帖子
12
精华
0
在线时间
36 小时
注册时间
2017-11-2
最后登录
2019-12-6

楼主
不知为不知123 发表于 2017-12-15 14:51:42 |AI写论文
200论坛币

Exercise 2 (9'):

Replicate Figure 12-12 on page 269 of the textbook by simulation. You are not allowed to draw directly from binomial distribution, such as using rbinom() in R. Note that your plot won't be exactly the same as in the textbook.

Hint: 60 trials, 8 tosses each trial, as draws are independent, can make 60*8 uniform draws once at each value of p (p=0,0.05,...,0.95,1)then compare the draw with given p and set a value of 1 if the draw is larger than p.


这个已经有了matlab代码了,请帮忙换成r代码并画成图https://zhidao.baidu.com/question/1239334600587971259.html
2.Exercise 3: (16')

(1) Replicate Figure 12-13 on page 274 of the textbook by simulation using the same parameter values (N=1000, k=100,s=50). Note that your plot won't be exactly the same as in the textbook.

(2) Drop the simplifed assumption that every token in the urn has the same probability of being drawn at each turn. Assume two types of users: frequent and infrequent (20% vs. 80%). Fix k=100 at each turn, draw 50 from a fixed group of 200 tokens and draw 50 from another fixed group of 800 tokens. Repeat the process for 31 turns and make the plot as Figure 12-13. What are the differences between the two plots? Please explain.

练习3:(16'

1)通过仿真使用相同的参数值(N = 1000k = 100s = 50)复制教科书第274页的图12-13。请注意,你的情节将不会在教科书中完全一样。

2)放弃简单的假设,即每一个瓮中的标记在每一个回合中都具有相同的概率。假设两种类型的用户:频繁和不频繁(20%对80%)。每回合修正k = 100,从一个固定的200个标记组中抽取50个,并从另一个固定的800个标记组抽取50个。重复这个过程31圈,如图12-13所示。这两个地块有什么区别?请解释。

112.jpg (91.23 KB)

112.jpg

沙发
不知为不知123 发表于 2017-12-15 14:52:07
可设置论坛币我来下载,ddl为1.13日晚11点

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
jg-xs1
拉您进交流群
GMT+8, 2026-1-8 00:56