Python Programming
Write a python code find the maximum of a function. One of them is visual using graphics, another one is analytical by differentiating the function.
INSTRUCTIONS TO CANDIDATES
ANSWER ALL QUESTIONS
Question 1:
Download the file from the following web location (URL:) Load the file into your working environment (a jupyter notebook) and answer the following questions with reference to this file.
- How many columns of data does the file have,
- How many rows of data does it have ?
- Evaluate the mean and variance for each column.
- plot the first column again the column before last,
- using as label for the x-axis: "Time (sec)"
- and label for the y-axis: "pressure (MPa)",
- and as title: "Pressure at First Sensor".
Question 2:
- Sample 100 points from a normal distribution with parameters ?=1
and ?2=9
- , using the scipy.stats package.
- Plot the pdf of these samples.
- Fit a normal distribution to these samples and print the parameters of the fit.
- Fit a beta distribution to these samples and print the parameters of the fit.
- For the beta distribution in question 4., evaluate the mean and variance using the mean() and var() methods in scipy.stats.
- Repeat questions 1-6 above using 10,000 samples (instead of 100 samples).
- Comment on the results of your calculations.
Question 3:
- Retrieve the 30 samples of the modulus of elasticity that we obtained by taking secants of the three stress-strain curves, and plot the probability density function of these 30 samples using the gaussianMixture function we have been using in class; use two bandwidth or scale parameters equal to 0.5 and 1.5, on the same plot. There will be marks for clarity of the plots: labels on x and y axes, title and legend.
- Using a beta distribution to describe this modulus, evaluate the maximum likelikhood estimate of the parameters of this distribution. Write a python code to do that. There are many ways to find the maximum of a function. One of them is visual using graphics, another one is analytical by differentiating the function, and a third is numerical using an optimization package from python). Any one of these methods is acceptable as part of your answer.
Related Questions
. The fundamental operations of create, read, update, and delete (CRUD) in either Python or Java
CS 340 Milestone One Guidelines and Rubric
Overview: For this assignment, you will implement the fundamental operations of create, read, update,
. Develop a program to emulate a purchase transaction at a retail store. This program will have two classes, a LineItem class and a Transaction class
Retail Transaction Programming Project
Project Requirements:
Develop a program to emulate a purchase transaction at a retail store. This
. The following program contains five errors. Identify the errors and fix them
7COM1028
Secure Systems Programming
Referral Coursework: Secure
. Accepts the following from a user: Item Name Item Quantity Item Price Allows the user to create a file to store the sales receipt contents
Create a GUI program that:Accepts the following from a user:Item NameItem QuantityItem PriceAllows the user to create a file to store the sales receip
. The final project will encompass developing a web service using a software stack and implementing an industry-standard interface. Regardless of whether you choose to pursue application development goals as a pure developer or as a software engineer
CS 340 Final Project Guidelines and Rubric
Overview The final project will encompass developing a web service using a software stack and impleme