probability4
typed answers with explanation either in doc or in pdf.
strict due. by midnight 10/01in MST
for Q5, you will need to use R program http://www.r-project.org.
I also need coding (detail procedure you operate )of it.
you may use this for Q5.
# hmwk5_r.txt
# p is probability of heads
p=0.25;
for (n in 1:20) {
# seq is used to record the flips
seq=as.character();
# flip until we get H
count1<-0;
got_head<-0;
while (got_head==0) {
count1<-count1+1;
flip<-rbinom(1,1,p);
if (flip==0) seq=paste(seq,"T");
if (flip==1) seq=paste(seq,"H");
if (flip==1) got_head<-1;
}
# now flip until we get T
count2<-0;
got_tail<-0;
while (got_tail==0) {
count2<-count2+1;
flip<-rbinom(1,1,p);
if (flip==0) seq=paste(seq,"T");
if (flip==1) seq=paste(seq,"H");
if (flip==0) got_tail<-1;
}
cat(sprintf("%s: X is %d+%d=%d \n",seq,count1,count2,count1+count2));
}
13 years ago
15
Answer(1)![blurred-text]()
![]()
Purchase the answer to view it

NOT RATED
- prob4ans.doc
- new.doc
Bids(1)
other Questions(10)
- Bus 508 Assignment 2: Competitive Strategies
- NURS-4010-15/NURS-4011 Walden University
- Help
- Accounting
- CIS 205 complete course step by step guidance for students A+ graded.zip
- Albatross Anchor Unit 6 Project Questions (Original Paper)
- Accounting Multiple Questions and Keys
- Question 4.3( for homework helper 1234 only)
- international Business
- must be done before friday