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
antiseptic1488 [7]
3 years ago
10

Each of k jars contains m white and n black balls. A ball is randomly chosen from jar 1 and transferred to jar 2, then a ball is

randomly chosen from jar 2 and transferred to jar 3, etc. Finally, a ball is randomly chosen from jar k. Show that the probability that the last ball is white is the same as the probability that the first ball is white, i.e. , it is m/(m + n) .
Write a short Python program for problem 22. Provide indented code and comments explaining your solution.
Computers and Technology
1 answer:
Elodia [21]3 years ago
3 0

Answer:

#initial probability of getting a white ball

init_prob_white=15/25

#initial probability of getting a black ball

init_prob_black=10/25

#probability of getting a white ball given

#that we transferred a white ball in previous

#step is 16/26 which we represent by pww

pww=16/26

#probability of getting a white ball given

#that we transferred a black ball in previous

#step is 15/26 which we represent by pwb

pwb=15/26

#similarly

pbb=11/26;

pbw=10/26;

#The below two functions are recursive which calculate

#total probability right from the start

#The formula they use are

# Prob(W_k)=Prob(W_k-1)*Prob(W_k | W_k-1)+

# Prob(B_k-1)*Prob(W_k | B_k-1)

def pw(n):

if n==1:

return init_prob_white;

else:

return (((pww)*pw(n-1))+((pwb)*pb(n-1)))

def pb(n):

if n==1:

return 10/25;

else:

return (((pbb)*pb(n-1))+ ((pbw)*pw(n-1)))

#for k=5

k=5

x=pw(k)

print("After "+str(k)+" transfers probability="+str(x))

Explanation:

You might be interested in
Mary is writing an article about the software development life cycle. She wants to place a flowchart besides the text. Which men
vichka [17]
The answer to this question is that Mary should choose insert image . Then, in the wrap text Mary should choose “top and bottom” to add it below the text she wrote. Using the option Top and bottom - text appears at the top and bottom of the image.
4 0
3 years ago
Read 2 more answers
25 points select 3 options!!!!!!!!!!!!!!!!!!!!!!!!!
Veronika [31]

Answer: don't know sorry

Explanation:

5 0
2 years ago
Read 2 more answers
________ are viruses that masquerade as useful programs or files. hydras spyware programs worms adware programs trojan horses
Harrizon [31]
Trojan horse is the correct answer
5 0
3 years ago
Use the following data definitions data myBytes BYTE 10h,20h,30h,40h myWords WORD 3 DUP(?),2000h myString BYTE "ABCDE" What will
Elena-2011 [213]

Answer:

<em>Given Data:</em>

<em>myBytes BYTE 10h, 20h, 30h, 40h </em>

<em>myWords WORD 3 DUP(?), 2000h </em>

<em>myString BYTE "ABCDE"</em>

<em />

Based on the data that we are given we can conclude that:

(a).     a. EAX = 1

         b. EAX = 4

         c. EAX = 4

         d. EAX = 2

         e. EAX = 4

         f. EAX = 8

         g. EAX = 5

8 0
3 years ago
Which components are involved with input? Output? Processing? Storage?
VMariaS [17]

Answer: Output

input keyboard mouse joystick graphics tablet trackball touchpad touchscreen microphone sensor      

Processing     processor (CPU) processor (GPU) memory motherboard

Output printer monitor touchscreen plotter speakers headphones motor data projector

Explanation:

5 0
3 years ago
Read 2 more answers
Other questions:
  • The ________ utility automatically creates duplicates of your libraries, desktops, contacts, and favorites to another storage lo
    7·1 answer
  • Pls Help Me!!!!!!!!!!! It won’t work when I connect to ITunes!
    12·1 answer
  • Insert a function in cell g5 to calculate the first student's monthly payment, using appropriate relative and absolute cell refe
    13·1 answer
  • Which heat transfer can be described as currents of warm air rising and cool air falling
    12·1 answer
  • AJ created a list, and he needs all of the numbers to be in order. Which Python function will allow him to organize his list num
    5·2 answers
  • Which tab on the Ribbon contains the command to print a publication?
    10·1 answer
  • You need to pay an Internet Service Provider (ISP) for services rendered. Which payment technology would you use?
    10·1 answer
  • 2
    6·1 answer
  • Digital communication and production chapter 17
    6·1 answer
  • 2. The On and Off states are represented by _____________ class 7 number system​
    7·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!