Question

What are the lowest and highest possible values returned by the following R command? > prod(rbinom(2,...

What are the lowest and highest possible values returned by the following R command?

> prod(rbinom(2, 3, 0.4))
0 0
Add a comment Improve this question Transcribed image text
Answer #1

rbinom(2, 3, 0.4) will return 2 numbers, each between 0 to 3, both inclusive.
prod() will return the product of these numbers.

The result will be highest when both numbers returned by rbinom(2, 3, 0.4) are highest, i.e, 3. So, the highest possible value will be 3*3 = 9.

The result will be lowest when both numbers returned by rbinom(2, 3, 0.4) are lowest, i.e, 0. So, the lowest possible value will be 0*0 = 0.

Add a comment
Know the answer?
Add Answer to:
What are the lowest and highest possible values returned by the following R command? > prod(rbinom(2,...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT