Question

In: Statistics and Probability

Use R programming to resolve this; can you please provide details on the code? A) Create...

Use R programming to resolve this; can you please provide details on the code?

A) Create a dataframe – comparativeGenomeSize with the following vectors:

> organism<-c("Human","Mouse","Fruit Fly", "Roundworm","Yeast")

> genomeSizeBP<-c(3000000000,3000000000,135600000,97000000,12100000)

> estGeneCount<-c(30000,30000,13061,19099,6034)

B) Print the organism and estGeneCount for Human and fruitfly.(1)

C) Add a column to this data frame calculating base pairs per gene. To do this, write a function “genedensity” that takes as arguments the genomesizeBP and estimatedGeneCount information, and calculates from this the estimated bp per gene. (3)

Let X be normally distributed with mean 24 and variance 16 b) Calculate the following probabilities: (2)
– P(X ≤ 20)

– P(X > 29.5)

Write a while loop that prints out standard random normal numbers (use rnorm()) (1)
Using next adapt the loop from the last exercise so that it doesn’t print negative numbers. (2)

Solutions

Expert Solution

(A) & (B)

> organism<-c("Human","Mouse","Fruit Fly", "Roundworm","Yeast")

> genomeSizeBP<-c(3000000000,3000000000,135600000,97000000,12100000)

> estGeneCount<-c(30000,30000,13061,19099,6034)

>comparativeGenomeSize<-data.frame(organism=organism,genomeSizeBP=genomeSizeBP, estGeneCount=estGeneCount)

>comparativeGenomeSize

(C)

> #function geneDensity simply calculates bp per gene

> geneDensity<-function(bp,genes){ + bp/genes}

> #pass data frame columns to function geneDensity

> #storing results in variable bpPerGene

> bpPerGene<-geneDensity(comparativeGenomeSize$genomeSizeBP, + comparativeGenomeSize$estGeneCount)

> #result of function computation

> bpPerGene

(2)

  


Related Solutions

Does anyone know the code to use in R programming to create a scatter plot?
Does anyone know the code to use in R programming to create a scatter plot?
Does anyone know the code to use in R programming to create a box plot?
Does anyone know the code to use in R programming to create a box plot?
use r programming, details on the codes please. Consider an urn with 10 balls inside, 7...
use r programming, details on the codes please. Consider an urn with 10 balls inside, 7 of which are red and 3 of which are green. Select 3 balls successively from the urn. Let A = {1 st ball is red}, B = {2 nd ball is red}, and C = {3 rd ball is red}. Then P(all 3 balls are red) = P(A ∩ B ∩ C)      a) Calculate the Probability with R? (1)      b) Also, what is the...
PLEASE USE R PROGRAMMING TO SOLVE THIS AND PASTE A COPYABLE CODE Photoresist is a light-sensitive...
PLEASE USE R PROGRAMMING TO SOLVE THIS AND PASTE A COPYABLE CODE Photoresist is a light-sensitive material applied to semiconductor wafers so that the circuit pattern can be imaged on to the wafer. After application, the coated wafers are baked to remove the solvent in the photoresist mixture and to harden the resist. Here are measurements of photoresist thickness (in kA) for eight wafers baked at two different temperatures. We want to see whether different temperatures make difference. The data...
Use R programming language to answer and please so show the code as well. A paper...
Use R programming language to answer and please so show the code as well. A paper manufacturer studied the effect of three vat pressures on the strength of one of its products. Three batches of cellulose were selected at random from the inventory. The company made two production runs for each pressure setting from each batch. As a result, each batch produced a total of six production runs. The data follow. Perform the appropriate analysis. Table is below Batch Pressure...
Please answer everything in R programming language. Show the code to me as well. Thank You...
Please answer everything in R programming language. Show the code to me as well. Thank You 1. Problem Open dataset stat500. Package: faraway. Use R (a) Calculate the correlation matrix. 10. (b) Plot total vs hw, to see how strong the relationship. (c) Build a simple linear regression: total regressed against midterm. Print model output. (d) Calculate directly the coefficients as in (3) (e) Calculate the Residual standard error s, as in (4). (f) Calculate the standard error of beta_1,...
Please provide R-code for the following question: The second argument to `split` can be a list...
Please provide R-code for the following question: The second argument to `split` can be a list of factors. The result is that all interactions (possible combinations) are used for the groups. In the `ToothGrowth` data set, growth (`len`) is measured for two types of supplements (`supp`) and three doses (`dose`). Split this `len` value into 6 groups.
(Use R Programming to Code) Use the Monte Carol simulation to estimate the probability that all...
(Use R Programming to Code) Use the Monte Carol simulation to estimate the probability that all six faces appear exactly once in six tosses of fair dice.
5. Use either R or Excel for the following. Provide the formulas or code that you...
5. Use either R or Excel for the following. Provide the formulas or code that you are using. Let x1 be a random variable that is N(100, 225). Let x2 be a random variable that is U(50,150) and let x3 be a random variable that is U(500,1500). Set Y = (X1)(X2)/ (X3) a) Use R to create 500 random numbers of each type (X1, X2, X3 and Y). b) Estimate P(0.1 < Y < 0.25) c) Estimate E(Y) and the...
can you please create the code program in PYTHON for me. i want to create array...
can you please create the code program in PYTHON for me. i want to create array matrix Nx1 (N is multiple of 4 and start from 16), and matrix has the value of elements like this: if N = 16, matrix is [ 4 4 4 4 -4 -4 -4 -4 4 4 4 4 -4 -4 -4 -4] if N = 64, matrix is [8 8 8 8 8 8 8 8 -8 -8 -8 -8 -8 -8 -8...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT