楼主: 631410425
2693 1

[作业] 【R语言】几个入门习题求助大佬! [推广有奖]

  • 0关注
  • 0粉丝

学前班

60%

还不是VIP/贵宾

-

威望
0
论坛币
0 个
通用积分
0
学术水平
0 点
热心指数
0 点
信用等级
0 点
经验
20 点
帖子
1
精华
0
在线时间
2 小时
注册时间
2018-4-22
最后登录
2019-5-10

楼主
631410425 发表于 2018-4-22 14:30:29 |AI写论文
10论坛币
3.1编写一个函数,它将生成并返回一个随机样本大小为n,有两个参数指数分布Exp(λη)任意n,λ,η。(参见示例2.3和2.6)。生成一个大样本Exp(λη)和比较的样本分位数理论分位数。 QQ图片20180422142836.png QQ图片20180422142833.png

3.14 Generate 200 random observations from the 3-dimensional multivariate nor-

mal distribution having mean vector μ = (0,1,2) and covariance matrix

Σ =

[1.0 0.5 0.5]

[−0.5 1.0 0.5]

[0.5 0.5 1.0]

using the Choleski factorization method. Use the R pairs plot to graph an

array of scatter plots for each pair of variables. For each pair of variables,

96 Statistical Computing with R

(visually) check that the location and correlation approximately agree with

the theoretical parameters of the corresponding bivariate normal distribution.

3.15 Write a function that will standardize a multivariate normal sample for arbi-

trary n and d. That is, transform the sample so that the sample mean vector

is zero and sample covariance is the identity matrix. To check your results,

generate multivariate normal samples and print the sample mean vector and

covariance matrix before and after stand=ardization.


关键词:习题求助 R语言 Multivariate distribution observations

沙发
qoiqpwqr 发表于 2018-4-22 22:24:58
第一个题可以去看看rexp这个函数

第二个问题Cholesky分解用chol函数
已有 1 人评分论坛币 收起 理由
cheetahfly + 10 热心帮助其他会员

总评分: 论坛币 + 10   查看全部评分

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

本版微信群
加好友,备注cda
拉您进交流群
GMT+8, 2026-1-2 04:50