Question

Please use SAS programming. Do not use an array. Please provide the code, answer, and explanation....

Please use SAS programming. Do not use an array. Please provide the code, answer, and explanation.

Find answers to the following questions by simulation using SAS (use rand('uniform') to generate random numbers). You must provide a final answer once you have observed the output from SAS and give reasons for your answers. That is if there is convergence, why and what is the final answer. However, if there is divergence, why.

2. A one unit stick is broken randomly into two pieces.

a) Find the expected value of (the short piece divided by the long piece).

b) Find expected value of (the long piece divided by the short piece).

Homework Answers

Answer #1

(a)

for (trails=0 ; trails<10000000; trails++) (L=rand(); // break the stick anywhere between 0 and 1 if (L>1/2) sum+=L; else sum+=1-L; // select the long piece)

print trails '' ''sum '' '' sum/trails;

10000000 7.50006 e +006

0.750006

(b)

for (trails=0 ; trails<10000000; trails++) (S=rand(); // break the stick anywhere between 0 and 1 if (S<1/2) sum+=S; else sum+=1-0.750006; // select the short piece)

print trails '' ''sum '' '' sum/trails;

10000000 2.50006 e +004

0.250004

ANSWERED PLEASE RATE ME POSITIVE THANKS

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Please answer the 3 questions, please provide brief explanation. Urgent, thanks. 31. Why does metabolic rate...
Please answer the 3 questions, please provide brief explanation. Urgent, thanks. 31. Why does metabolic rate in endotherms change in a much more linear fashion than ectotherms? A. evolution in endotherms favors enantiostasis, while evolution in endotherms does not B. endotherms are better at homeophasic adaptation of membranes, while ectotherms are better at homeoviscous adaptation of membranes C. endotherms use counter current exchange for thermoregulation, while ectotherms use bidirectional exchange for thermoregulation D. metabolic rate in ectotherms is physiologically regulated,...
Please answer the 3 questions, please provide brief explanation. Urgent, thanks. 12. Multiple-Choice with only one...
Please answer the 3 questions, please provide brief explanation. Urgent, thanks. 12. Multiple-Choice with only one correct answer What means would be used to reduce oxygen uptake when an oxygen regulator experiences a temporary hyperoxic condition? A. increase hemoglobin and red blood cell levels B. increase ventilation and circulation rate C. increase myoglobin in the blood D. decrease ventilation and circulation rate E. mutate its hemoglobin so it has a higher P50 13. Multiple-Answer with 2 correct answers What combination...
This assignment is discussion only.  For each question, provide an answer and a brief justification or explanation...
This assignment is discussion only.  For each question, provide an answer and a brief justification or explanation of your answer. Base your answers ONLY on the information provided in the question. The accounting firm Price-Waterhouse Coopers provides tax and consulting services.  Kroger is one of the largest grocery chains in the US. Assume that neither firm is substantially affected by the business cycle and that both firms are profitable.  Which of these two companies do you think has greater debt capacity (please explain)?...
Please do it in Python Write the simplest program that will demonstrate iteration vs recursion using...
Please do it in Python Write the simplest program that will demonstrate iteration vs recursion using the following guidelines - Write two primary helper functions - one iterative (IsArrayPrimeIter) and one recursive (IsArrayPrimeRecur) - each of which Take the array and its size as input params and return a bool. Print out a message "Entering <function_name>" as the first statement of each function. Perform the code to test whether every element of the array is a Prime number. Print out...
Please answer all, Thank you. 1. A firework is designed so that when it is fired...
Please answer all, Thank you. 1. A firework is designed so that when it is fired directly upwards, it explodes and splits into three equal-massed parts at its peak. Someone launches the firework directly upwards and measures the locations of two of the pieces of the firework. They find that one piece landed 2 meters to the left and another piece landed two meters in front of them. Where did the third piece of land? 2. A Newton's cradle is...
Can someone please provide the solutions. No explanation needed, just the answers so I can double...
Can someone please provide the solutions. No explanation needed, just the answers so I can double check my work.      2.   Firms with tangible long-term assets and less predictable cash flows, such as auto manufacturers and steel companies, whose sales vary with changes in economic conditions, tend to use a. a more nearly equal mix of long-term debt and shareholders’ equity financing. b. a greater amount of long-term debt [80%] than shareholders’ equity financing [20%]. c. a smaller amount of...
Note please do not write on a piece of paper, it is hard to read it....
Note please do not write on a piece of paper, it is hard to read it. PART 1: The following table shows the number of marriages in a given State broken down by age groups and gender:                                                             AGE at the time of the marriage Less than 20 20-24 25-34 35-44 45 + Total Male 505 7,760 27,072 10,950 12,173 Female 1,252 11,405 27,632 9,651 10,352 Totals Use the table to answer questions (1) to (11). Use the information in...
Do all the following problems. I. Choose the best answer for each multiple choice. Please use...
Do all the following problems. I. Choose the best answer for each multiple choice. Please use CAPITAL letters to indicate your answer and write neatly. (30 points) 1. ____ 4.____ 7. ____ 10.____ 13. ____ 2. ____ 5.____ 8. ____ 11.____ 14. ____ 3. ____ 6.____ 9. ____ 12.____ 15. ____ Whenever the population standard deviation is unknown and the population has a normal or near-normal distribution, which distribution is used in developing an interval estimation? A. standard distribution B....
Please do not attempt to solve if you can not answer all!!! THE ENERGY BAR INDUSTRY...
Please do not attempt to solve if you can not answer all!!! THE ENERGY BAR INDUSTRY In 1986, PowerBar, a firm in Berkeley, California, single-handedly created the energy bar category. Positioned as an athletic energy food, it was distributed at bike shops and events that usually involved running or biking. The target segment was the athlete who needed an efficient, effective energy source. Six years later, seeking to provide an alternative to the sticky, dry nature of the PowerBar, a...
urgent please provide 3 multiple choice questions with correct answers. Since the early days of Google,...
urgent please provide 3 multiple choice questions with correct answers. Since the early days of Google, people throughout the company have ques- tioned the value of managers. That skepticism stems from a highly techno- cratic culture. As one software engineer, Eric Flatt, puts it, “We are a company built by engi- neers for engineers.” And most engineers, not just those at Google, want to spend their time designing and debugging, not communicating with bosses or supervising other workers’ progress. In...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT