1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Mumz [18]
2 years ago
7

Suppose you are given a bag containing n unbiased coins. You are told that n − 1 of these coins are normal, with heads on one si

de and tails on the other, whereas one coin is a fake, with heads on both sides. . Suppose you reach into the bag, pick out a coin at random, flip it, and get a head. What is the (conditional) probability that the coin you chose is the fake coin?. Suppose you continue flipping the coin for a total of k times after picking it and see k heads. Now what is the conditional probability that you picked the fake coin? . Suppose you wanted to decide whether the chosen coin was fake by flipping it k times. The decision procedure returns fake if all k flips come up heads; otherwise it returns normal. What is the (unconditional) probability that this procedure makes an error?
Computers and Technology
1 answer:
Charra [1.4K]2 years ago
4 0

Answer:

a) [2/n+1]

b) 2ᵏ/[2ᵏ + (n-1)]

Explanation:

(n-1) coins are fair and only 1 is a fake coin with two heads.

This means there are a total of n coins in the bag.

Let the probability of getting a head be P(h)

Probability of picking a fake coin = P(f) = (1/n)

Probability of getting head on a fake coin = P(h|f) = 1

Probability of picking a fake coin and getting a head = P(f n h) = (1/n) × 1 = (1/n)

Probability of picking the right (original) coin = P(r) = (n-1)/n

Probability of getting a head on the right coin = P(h|r) = (1/2)

Probability of picking a real coin and getting a head = P(h n r) = [(n-1)/n] × (1/2) = [(n-1)/2n]

a) The required conditional probability is the probability that the coin is fake, given that it turns up head

P(f|h) = P(f n h)/P(h)

P(f n h) = (1/n)

But, we do not have P(h). We can obtain it through the relation,

P(h) = P(h n r) + P(h n f)

= P(r) P(h|r) + P(f) P(h|f)

= {[(n-1)/n] × [1/2] + [1/n] [1]

= [(n-1)/2n] + [1/n]

= (n+1)/2n

P(f|h) = P(f n h)/P(h)

= (1/n) ÷ [(n+1)/2n] = [2/n+1]

b) The second required probability

Probability that it's a fake coin, given that we get k heads.

P(f|k heads) = P(f n k heads) ÷ P(k heads)

P(f n k heads) = (1/n) × 1ᵏ = (1/n)

But, we do not have P(k heads). We can obtain it through the relation,

P(k heads) = P(r n k heads) + P(f n k heads)

P(r n k heads) = [(n-1)/n] × [1/2)ᵏ

= [(n-1)/2ᵏn]

P(f n k heads) = (1/n)

P(k heads) = P(r n k heads) + P(f n k heads)

= [(n-1)/2ᵏn] + [1/n]

P(f|k heads) = P(f n k heads) ÷ P(k heads)

= [1/n] ÷ {[(n-1)/2ᵏn] + [1/n]}

On simplifying,

We obtain

P(f|k heads) = 2ᵏ/[2ᵏ + (n-1)]

Note that, Bayes rule is the guiding principle in all the conditional probability evaluations we have done above.

Hope this Helps!!!

You might be interested in
Why can videos be streamed from the cloud to a computer with no loss in
mezya [45]
I think the answer is B
3 0
2 years ago
Read 2 more answers
Elizabeth works for a local restaurant at the end of her shift she read she’s required to write in the time that she arrived in
gavmur [86]
B - because you should always be honest when it comes to working your hours and getting paid the right amount.
5 0
3 years ago
Create a program in c/c++ which accepts user input of a decimal number in the range of 1 -100. Each binary bit of this number wi
kirill115 [55]

Answer:

// here is code in C++.

#include <bits/stdc++.h>

using namespace std;

void switch_fun(int input)

{

//array to store binary of input number

   int bin[7];

   // convert the number into binary

   for(int i=0; input>0; i++)

       {

           bin[i]=input%2;

           input= input/2;

       }

   // print the switch number and their status

   cout<<"Switch number:\t 1\t 2\t 3\t 4\t 5\t 6\t 7 \n";

   cout<<"status:      ";

   for(int j=6;j>=0;j--)

   {

   // if bit is 1 print "ON" else print "OFF"

       if(bin[j]==1)

           cout<<"\t ON";

       else

           cout<<"\t OFF";

   }

}

int main()

{

   int n;

   cout<<"enter the number between 1-100 only:");

   // read a number in decimal

   cin>>n

   // validate the input

   while(n<1 ||n>100)

   {

     cout<<"wrong input!! Input must be in between 1-100:"<<endl;

     cout<<"enter the number again :";

     cin>>n;

   }

// call the function with input parameter

  switch_fun(n);

return 0;

}

Explanation:

Read a decimal number from user. If the number is not between 1 to 100 the it will again ask user to enter the number until the input is in between 1-100.Then it will call the fun() with parameter n. First it will convert the decimal to binary array of size 7.Then print the status of switch.If bit is 1 then print "ON" else it will print "OFF".

Output:

enter the number between 1-100 only:-5

wrong input!! Input must be in between 1-100:

enter the number again :125

wrong input!! Input must be in between 1-100:

enter the number again :45

Switch number:   1       2       3       4       5       6       7

Status:          OFF     ON      OFF     ON      ON      OFF     ON

8 0
3 years ago
Scripting languages are unique computer languages with a specialized function. explain what scripting languages do, and how this
yarga [219]

Scripting languages are unique computer languages because they automate task that could be done by human operator and are easy to use.

<h3>What is a scripting language?</h3>

Scripting languages are programming languages that is interpreted.

They are programming languages that automates the task that will originally be performed by a human operator.

Scripting languages are used to give instruction to other software to run accordingly to how you want it.

The scripting language is different form other language base on the fact that its interpreted . This means the code are translated to machine code when it is run.

The major advantage of scripting languages is that it is human readable and understandable.

Examples of scripting languages are Python and JavaScript.

learn more on scripting here: brainly.com/question/12763341

#SPJ1

3 0
1 year ago
List 2 advantages Cryptocurrency have over regular bank transactions
ratelena [41]

Answer:

low transaction fees and speedier processing

Explanation:

5 0
2 years ago
Read 2 more answers
Other questions:
  • In which situation will file compression be required to complete the task
    15·1 answer
  • Software as a Service (SaaS) refers to the use of computing resources, including software and data storage, on the Internet rath
    13·1 answer
  • A lamp outside a front door comes on automatically when it is dark, and when someone stands on the doormat outside the front doo
    7·1 answer
  • Explain why an IT department and a user support group may disagree about the responsibility for the development of end-user appl
    8·1 answer
  • In a study on software license infringement, those from United States were significantly more permissive than those from the Net
    15·1 answer
  • Ann wants to save her presentation so she can work on it later. Which device on her computer can store this data long term?
    15·2 answers
  • PLEASE HELP I HAVE A TEST RIGHT NOW!!!
    13·1 answer
  • Red + blue =<br>Red + green =<br>Magenta - blue =<br>Yellow - green =<br>Cyan - blue =​
    9·1 answer
  • El botón de layout se usa para <br>​
    8·1 answer
  • How do you initiate a sprite’s actions in a scene?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!