Click here to Skip to main content
15,886,664 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have a problem statement of probability for which i have to display the solution in R programming language or Matlab... Any help will be very beneficial for me as i am unable to find the correct code to display the solution.. Please help

There are two coins. One is fair; the other is two-headed. You randomly choose a coin and toss it.

(a) What is the probability the coin lands Heads?

(b) What is the probability the coin is two-headed given that it landed Heads?

(c) What is the probability the coin is two-headed given that it landed Tails? Give a formal proof, not intuition.

(d) You are about to toss the coin a second time. What is the probability that the second toss lands Heads

given that the first toss landed Heads?

I will be very thankful if i get the solution..!!
Posted
Comments
Richard MacCutchan 30-Aug-14 6:51am    
These are mathematics questions, not programming.
Gurpreet Singh Punj 30-Aug-14 6:56am    
I want to solve this by R... I want to know that how to solve this using R or Matlab solutions will also be beneficial

We do not do your homework: it is set for a reason. It is there so that you think about what you have been told, and try to understand it. It is also there so that your tutor can identify areas where you are weak, and focus more attention on remedial action.

Try it yourself, you may find it is not as difficult as you think!

Start by working out how you would do it without a computer, and then think about how to translate that into code.
 
Share this answer
 
Comments
Gurpreet Singh Punj 30-Aug-14 6:44am    
I am very new to R langauge.. I am just trying to learn R language on my own. I just tried to find a solution to this question but i don;t know how to display it by using Matlab or R.. If you help me for this solution then i can continue trying as i know the solution for this question in mathematics.. thanks in advance sir..!!
For questions about R see http://www.r-project.org/[^].
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900