Answered step by step
Verified Expert Solution
Question
1 Approved Answer
PROGRAMING IN RSTUDIO Data Summarization and Manipulation. In this question you will perform basic data manipulation. To do so, first generate a data. frame containing
PROGRAMING IN RSTUDIO
Data Summarization and Manipulation. In this question you will perform basic data manipulation. To do so, first generate a data. frame containing 50 rows and 3 columns. The columns will be called "Normal", "Poisson" and "Binomial". The values for the columns will be randomly generated (check the R help on rnorm, rpois and rbinom) using the following parameterization Normal: mean-1, standard deviation-3 Poison: mean-3 . Binomial: probability of success - 0.6 Each of the following questions requires only one line of R code (a) How many Normal values are less than 0? (b) Replace the row of Normal values, with the log of each value (c) Replace any NaN values of the Normal column with 0. (d) What is the index of the largest value in the Poisson column? (e) Create a table of the values in the Poisson column (f) Create a contingency table of values that counts, such that for each value in the Binomial column, the number of Poisson values that appears. For example, 0 1 2 3 4 5 6 7 0 27 1 4 4 0 1 2 0 1 0 0 5 1 31 0 1 where each of the two rows correspond to the Binomial 0/1 output, and for each value, the column indicates the number of times a particular Poisson number appeared jointly with it. Hence, the value 27 represents the number of times that the Binomial column value was a 0 when the Poisson column was also 0 (vour numbers will obviously varvStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started