概率问题的Matlab编程 [英] Matlab Programming for Probability Question

查看:106
本文介绍了概率问题的Matlab编程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个问题陈述概率,我必须用R编程语言或Matlab显示解决方案...任何帮助对我都非常有益,因为我无法找到正确的代码来显示解决方案..请帮助



有两个硬币。一个是公平的;另一个是双头的。你随机选择一个硬币并扔掉它。



(a)硬币落在头上的几率是多少?



(b)硬币是双头的概率是多少,因为它落在了头上?



(c)硬币的概率是多少 - 鉴于它落在Tails上?给出一个正式的证据,而不是直觉。



(d)你将要再次投掷硬币。第二次投球的可能性是多少?



假设第一次投掷落地头?



如果我得到解决方案,我将非常感激.. !!

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..!!

推荐答案

我们不做你的作业:这是有原因的。它就是为了让你思考你被告知的事情,并试着理解它。它也在那里,以便您的导师可以识别您身体虚弱的区域,并将更多的注意力集中在补救措施上。



亲自尝试,你可能会发现它不是和你想的一样困难!



首先要弄清楚如何在没有计算机的情况下完成它,然后考虑如何将其转换为代码。
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.


有关R的问题,请参阅 http://www.r-project.org/ [ ^ ]。
For questions about R see http://www.r-project.org/[^].


这篇关于概率问题的Matlab编程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆