R语言代做编程辅导和解答:Lab Activities – MAT 500

Complete the following exercises using the code discussed during computer lab. Save your work in an R script as well as a Word document containing the necessary output and comments. 

Be sure to use notes in the script to justify any computations. If you have any questions, do not hesitate to ask

LE PHUONG撰写

1 Probability Distributions

  1. Generate four vectors with binomial random numbers of sample sizes of 10, 100, 1000, and 10000 using n = 50, p = 0.4, and seed 5. Find the mean and standard deviation of each of these vectors and compare them to the theoretical mean and standard deviation. What do you see as n increases?
×

现在提到了代写服务,肯定很多人都不会觉得陌生,就算是国内也是有着专业代写作业的服务行业的,能够为有需求的学生提供很多的帮助,不过其实代写机构在国外会更获得学生的支持,这是因为国外的学校对于平时的作业要求比较严格,为了获得更高的分数顺利毕业,不少留学生就会让代写机构帮忙完成作业,比较常见的作业代写类型,就是计算机专业了,因为对于留学生来说这个技术对于Machine Learning或者AI的代码编程要求更高,所以找代写机构完成作业会简单轻松很多,那么代写机构的水平,要怎么选择才会比较高?

1、代写机构正规专业

不论是在什么情况下,选择正规合法经营的机构肯定是首要的操作,这也是为了避免自己在找机构的时候,出现上当受骗的现象,造成自己的经济出现损失,带来的影响还是非常大的,所以需要注意很多细节才可以,所以在这样的情况下,代写机构的选择,也要选择在经营方面属于正规合法的类型,这样才可以保证服务进行的时候,不会出现各种问题,也可以减少损失的出现,而且正规合法也是代写机构的合格基础。

2、代写机构编程能力

作业的难度相信很多人都很熟悉,特别是对于AI深度学习或者是人工神经网络这种算法来说,因为要对SVM、Design Tree、线性回归以及编程有很高的要求,可以说作业的完成要求非常高,因此才会带动代写机构的发展,找专业的代写机构,一般都是会有专业的人员帮忙进行作业的完成,因为这类型的作业对专业要求比较高,因此代写机构也要具备专业能力才可以,否则很容易导致作业的完成出现问题,出现低分的评价。

3、代写机构收费情况

现在有非常多的留学生,都很在意作业的完成度,为了保证作业可以顺利的被完成,要进行的相关操作可是非常多的,代写机构也是因为如此才会延伸出来的,在现在发展也很迅速,现在选择代写机构的时候,一定要重视收费情况的合理性,因为代写作业还是比较费精力的,而且对于专业能力要求也高,所以价格方面一般会收取几千元至万元左右的价格,但是比较简单的也只需要几百元价格。

4、代写机构完成速度

大部分人都很在意代写机构的专业能力,也会很关心要具备什么能力,才可以展现出稳定的代写能力,其实专业的代写机构,对于作业完成度、作业完成时间、作业专业性等方面,都是要有一定的能力的,特别是在完成的时间上,一定要做到可以根据客户规定的时间内完成的操作,才可以作为合格专业的代写机构存在,大众在选择的时候,也可以重视完成时间这一点来。

现在找专业的CS代写机构帮忙完成作业的代写,完全不是奇怪的事情了,而且专业性越强的作业,需要代写机构帮忙的几率就会越高,代写就发展很好,需求量还是非常高的,这也可以很好的说明了,这个专业的难度以及专业性要求,才可以增加代写机构的存在。



Generate the same four vectors as in the previous exercise. Print out four histograms to graphically represent the data. What distribution do the histograms appear to be approaching as n increases

  1. Generate a vector of 1000 random numbers from a χ 2 distribution with 8 degrees of freedom using seed 100. Find the five number summary, mean, and standard deviation. Represent the vector graphically using a probability histogram with pdf overlayed on the same graph. Assess the normality of the sample data
  2. . Clearly the sample data from the F distribution generated earlier in this chapter was not normal. To assess the fit of a random variable to the proper distribution, one uses a Quantile Quantile plot. Using seed 1, generate 300 random numbers from an F distribution with 5 and 10 degrees of freedom. Create a QQ plot by finding the theoretical sample quantiles of F as well as the sample quantiles of the random data. Plot these vectors to see if the random number generator is indeed providing sample data from an F distribution. Hint: This problem requires the use of the quantile() function to find the sample quantiles of a data set.
  3. Find the following probabilities: (a) P(B = 5) where B ∼ Binom(12, 0.6) (b) P(B ≥ 5) where B ∼ Binom(12, 0.6) (c) P(Z < 1.12) where Z ∼ N(0, 1) (d) P(6.5 < X) where X ∼ N(7, 4) (e) P(−1021 < t < −664) where t ∼ t(1) (f) P(t > 1.96) where t ∼ t(500)

Find the following quantiles: (a) 30th quantile for Z ∼ N(0, 1) (b) 30th quantile for X ∼ N(7, 4) (c) 95th quantile for t ∼ t(1


python岭回归、Lasso、随机森林、XGBoost、Keras神经网络、kmeans聚类链家租房数据地理可视化分析

阅读文章


  1. (d) 95th quantile for t ∼ t(500) (e) Q1, Q2, and Q3 for F(5, 10).

2 Representing Categorical Data

A rehabilitation study for cocaine users included administering two drugs and a placebo to determine effectiveness. There were 24 subjects in each group. Fourteen of the users given Desipramine relapsed, 18 of the uses given Lithium relapsed and 20 of the placebo group relapsed. Create two tables, one containing the counts and the other containing the marginal distributions for each drug. Print the tables and represent the data graphically. Use a bar graph with bars for both outcomes as well as two pie charts, one for each outcome.


随时关注您喜欢的主题


3 Exploratory Data Analysis

  1. Using the ‘datasets’ library in R, save the mtcars data set as cars matrix. Find the summary statistics of the mpg column, as well as a boxplot. Create a boxplot of the mpg column by the cylinder column. The output should have three plots on the same set of axis. Summarize the boxplot in words.
  2. Refer to the previous exercise. Check the normality of the mpg column. Perform pairwise hypothesis tests to determine if the average mpg differs depending on the number of cylinders. Use both methods discussed in this section. Based on the normality assessment, which testing method should be used

Day 1a Lab Activities – 解答

Probability Distributions

1. 

Sample Sizeµσs
10203.464120.53.6591
100203.464120.243.5337
1000203.464119.9943.4912
10000203.464120.02533.4795

 As n increases, the standard deviation approaches the true standard deviation.  The mean also approaches the true mean, but this happens with a much smaller sample size than what is needed for the standard deviation.

2.  The histograms appear to be approaching a normal distribution with mean 20.

image.png

3.     Min. 1st Qu.  Median    Mean 3rd Qu.    Max.                St. Dev

         0.7603  4.8880  7.4250  7.9070 10.1300 26.2100     3.942555

image.png

The normal quantile plot is not linear, therefore, the data is not normal.

4.  The random numbers appear to be an F distribution with the exception of the 7 largest numbers.

image.png

5.     a) 0.1009024

        b)  0.8417877

        c)  0.8686431

        d)  0.5497382

        e)  0.0001676192

        f)  0.02527539

6.  a)  -0.5244005

        b)  4.902398

        c)  6.313752

        d)  1.647907

        e)  0.5291417, 0.9319332, 1.5853233

image.png

Representing Categorical Data

  1.                Count Data

                 Desipramine  Lithium Placebo          

                 Yes          14      18        20

                 No           10               6            4

                         Marginal Distributions  

                  Desipramine Lithium   Placebo

                 Yes   0.5833333    0.75         0.8333333

                 No    0.4166667    0.25        0.1666667

image.png

关于分析师

在此对LE PHUONG对本文所作的贡献表示诚挚感谢,她在山东大学完成了计算机科学与技术专业的硕士学位,专注数据分析、数据可视化、数据采集等。擅长Python、SQL、C/C++、HTML、CSS、VSCode、Linux、Jupyter Notebook。

 
QQ在线咨询
售前咨询热线
15121130882
售后咨询热线
0571-63341498

关注有关新文章的微信公众号


永远不要错过任何见解。当新文章发表时,我们会通过微信公众号向您推送。

技术干货

最新洞察

This will close in 0 seconds