Question

02 RA-2. E Question Help Use the accompanying Political Poll Appleto explore the compresents a voler The probably long ahead
0 0
Add a comment Improve this question Transcribed image text
Answer #1
x=sample(c("H","T"),500,replace=TRUE,prob=c(0.5,0.5)) count=0 for (i in 1:500){ if(x[i]=="H") count=count+1 } count

I have solved the problem using R

Number of heads obatained is 258

here is the R code,

> x=sample(c("H","T"),500,replace=TRUE,prob=c(0.5,0.5))
> count=0
> for (i in 1:500){
+ if(x[i]=="H") count=count+1
+ }
> count
[1] 258
>

first step is to generte sample

in second step we count number of heads.

since it is done by random number that is it is a random sample.

you may obatain different results.

Add a comment
Know the answer?
Add Answer to:
02 RA-2. E Question Help Use the accompanying Political Poll Appleto explore the compresents a voler...
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
  • Using the book, write another paragraph or two: write 170 words: Q: Compare the assumptions of...

    Using the book, write another paragraph or two: write 170 words: Q: Compare the assumptions of physician-centered and collaborative communication. How is the caregiver’s role different in each model? How is the patient’s role different? Answer: Physical-centered communication involves the specialists taking control of the conversation. They decide on the topics of discussion and when to end the process. The patient responds to the issues raised by the caregiver and acts accordingly. On the other hand, Collaborative communication involves a...

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