Write python or java or c programs to simulate the problems and display the output in a graphical form, with the following simplifications:
5) The triangle has one corner at the origin, one at (1,0), and one at (x,1), repeating the program for x = 0, 1/2, 1.
Problem 5. Consider a triangle and a point chosen within the triangle according to the uniform probability law. Let X be the distance from the point to the base of the triangle. Given the height of the triangle, find the CDF and the PDF of X.
5) The triangle has one corner at the origin, one at (1,0), and one at (x,1), repeating the program for x = 0, 1/2, 1.
ans:-
In python we can plot all three triangle with following code:
import matplotlib.pyplot as plt
plt.plot([0,1,0,0], [0,0,1,0])
plt.plot([0,1,0.5,0],[0,0,1,0])
plt.plot([0,1,1,0],[0,0,1,0])
plt.show()
5. Consider a triangle and a point chosen within the triangle according to the uniform probability law. Let X be the distance from the point to the base of the triangle. Given the height of the triangle, find the CDF and the PDF of X.
ans:-

![f (x) = 1 (n- for XE [o, n] for 24 [o,h] i fu (x) 20 So fx (x)= {1 - Chypre xe [o h] o u¢ [o, h] Thus the CDF of x is : P(x2x](http://img.homeworklib.com/questions/efe1ca40-bf4d-11ea-8f6f-294a5c8e09ae.png?x-oss-process=image/resize,w_560)
If u have any doubt please ask me.
Write python or java or c programs to simulate the problems and display the output in...
Problem 6. Calamity Jane goes to the bank to make a withdrawal, and is equally likely to find 0 or 1 customers ahead of her. The service time of the customer ahead, if present, is exponentially distributed with parameter lambda. What is the CDF of Jane's waiting time? Write programs java or python to simulate the problems 6 and display the output in a graphical form, with the following simplifications: Repeat the program with lambda = 1, 10, 30, 60
Write short programs to simulate problem 16 and 22. For problem 22, use k=5, m=10, n=5. In Python Problem 16 We are given three coins: one has heads in both faces, the second has tails in both faces, and the third has a head in one face and a tail in the other. We choose a coin at random, toss it, and the result is heads. What is the probability that the opposite face is tails? Problem 22 Each of...
Please write the answer to all & uploading problems including this one on the paper and upload the answer in one pdf file after you finish and submit this final 19 points) Let ü - (.:-( Recall that each vector correspond to a point in R' (a). (3 points) Show that the triangle with vertices o, u, jis a equilateral triangle (ie, a triangle with equal-length sides). What is the length of the three sides? (Hint: the third side can...
PYTHON:please display code in python
Part 1: Determining the Values for a Sine
Function
Write a Python program that displays and describes the equation
for plotting the sine function, then prompts the user for the
values A, B, C and D to be used in the calculation. Your program
should then compute and display the values for Amplitude, Range,
Frequency, Phase and Offset.
Example input/output for part 1:
Part 2: Displaying a Vertical Plot Header
A vertical plot of the...
Problem 5 . This question considers uniform random points on the unit disc x2+92 〈 1 (a) A point (X, Y) is uniformly chosen in the unit disc. Find the CDF and PDF of its distance from the origin R X2 +Y2 (b) Compute the expected distance from the origin. (c) Determine the marginal PDF of X and Y (d) Are X and Y independent? (Justify your claims) e) One way to generate uniform random points on this disc is...
Choose 3 of 5 Problems to Solve
Need Soon as possible
Choose 3 of5 Problems to Solve (20 Point/Each) Problem l: Triangle Printing Program: Write an application that prints a right triangle with 1 to 8 rows. Prompt the user to enter an odd number in the range of 1 to 8 to specify the number of rows in the diamond. Add a validation loop to ensure the user does not enter an even number or a number outside the...
I have to use java programs using netbeans. this
course is introduction to java programming so i have to write it in
a simple way using till chapter 6 (arrays) you can use (loops ,
methods , arrays)
You will implement a menu-based system for Hangman Game. Hangman is a popular game that allows one player to choose a word and another player to guess it one letter at a time. Implement your system to perform the following tasks: Design...
JAVA problem: Upgrade and extend the previous programs Draw.java and DrawCanvas.java used in the class to maintain a list of shapes drawn as follows: Replace and upgrade all the AWT components used in the programs to the corresponding Swing components, including Frame, Button, Label, Choice, and Panel. Add a JList to the left of the canvas to record and display the list of shapes that have been drawn on the canvas. Each entry in the list should contain the name...
You need not run Python programs on a computer in solving the following problems. Place your answers into separate "text" files using the names indicated on each problem. Please create your text files using the same text editor that you use for your .py files. Answer submitted in another file format such as .doc, .pages, .rtf, or.pdf will lose least one point per problem! [1] 3 points Use file math.txt What is the precise output from the following code? bar...
Write a Python program that generate randomly a magic square of 3 x 3 elements. For example: 4 3 8 9 5 1 2 7 6 = Matrix1 Matrix 1 above is an example of magic square. The rows total, the columns total, and the diagonal totals are all 15. Your program should randomly generate a 3x3 matrix. Check if it is a magic square. If it is a magic square, then print some information and quit. If the...