0 views

Skip to first unread message

Jul 6, 2021, 3:03:36 AM7/6/21

to IU Computing in Molecular Biology

Hi everybody

I’ve got several questions about the makeup exam, and I think it will be fair that I share the answers with all of you.

Question 1.1 has three parts

- take one by one the elements of
`sizes`

and assign to an auxiliary variable, let’s call it`s`

- create a random binomial vector, with
`n=10000`

or more, fixed probability`prob`

and a single size`s`

- calculate the mean of this random binomial vector, and store it in a new vector, let’s say
`avg`

The function `calc_average`

should return the vector `avg`

. If done correctly, the vectors `size`

and `avg`

should have the same length. This can be done with a `for`

loop or using `sapply`

.

In Question 1.2, please remember to show only the `coefficients`

of the linear model

In Question 1.3 we do four parts

- Take one by one the elements of
`probs`

and assign to an auxiliary variable, let’s call it`p`

- Get the vector
`avg`

using`calc_average(p, sizes)`

- make a linear model of
`avg ~ sizes`

and evaluate its`coefficients`

- store the second coefficient in a vector called
`all_avg`

If done correctly, the vectors `probs`

and `all_avg`

should have the same length. This can be done with a `for`

loop or using `sapply`

.

Question 2 is more or less the same idea. Be careful with the details.

Question 3 is plain English. No need to write detailed plans. Just explain the resulting formula.

Please ask me any question you may have. Good luck. Take care. Enjoy.

Reply all

Reply to author

Forward

0 new messages

Search

Clear search

Close search

Google apps

Main menu