Question: this r programming i want the full code and answer please 53 - ## Question 2 [2 pts] 54 55 Write a R code that

this r programming i want the full code and answer please  this r programming i want the full code and answer please
53 - ## Question 2 [2 pts] 54 55 Write a R
code that creates the truth table of the logical function 56 57
$$!(a I b)$$ >> !(alb) 58 59 (This formula means not(a or

53 - ## Question 2 [2 pts] 54 55 Write a R code that creates the truth table of the logical function 56 57 $$!(a I b)$$ >> !(alb) 58 59 (This formula means not(a or b), where a and b are logical variables that can takes 2 values. T or F). I 60 61 - "*'{r} 62 a=NA # replace NA by a vector of 4 logical values 63 b=NA # replace NA by a vector of 4 logical values lan R Markdown CA AIA ARAMA 1 Run A 61 {r} 62 =NA # replace NA by a vector of 4 logical values 63 b=NA # replace NA by a vector of 4 logical values 64 M-NA # replace NA by a column bind of a, b and your logical function 65 # now add a line of code to print M: 66 - 67 I 68 69 - ## Question 3 [5 pts] 70 71 The probability density function of a gamma distribution with 72 shape parameter k and scale parameter theta is the function given by the following formula: 73 74 $$ y=f(xlk, \theta)=\frac{\Gamma(k)}{\theta-k}x^{k-1}^{-x\theta}$$ A r(k) 1.1 - 1 Nur 74 $$ y=f(xlk, \theta)=\frac{\Gamma(k)}{\thetak}x^{k-1}e^{-x\theta}$$ y=f(xk, ) = ok 75 Write a R code to calculate this function for X-3 when kis 2 and theta is 2. 76 Use the variable name y to store the result of your computation and print y. 77 78 You will need to use the exponential function and the gamma function, which are both available in R. 79 80 For example Se138 and $\gamma(5)$ can be calculated like this in R: 81 82 - *{r} I 83 exn(3) R Markdown GO1 Question 2 12 ntsl NUE 84 .. gamma(5) 85 86 87 88 - {r} 89 X-3 90 k2 91 theta-2 92 y=NA # replace this by the correct formula using correct functions 93 y # print the y value Z 94 - 95 96 To check that your calculation is right, you can execute this cell of code and you should find the same result as y: 97 98 99 {r} dgamma(x,k, scale-theta)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!