Construction management, price and uncertainty analysis. The intent of the code is to use the Python sampling methods to estimate the uncertainty in the project pricing. Assume a project cost includes the price of material, labour cost, property cost, construction data, and anything else you want to include. However, we know the price, labour cost, construction and other factors will change during construction period. Let's assume that each of the parameters follow the normal distribution with a constant standard deviation (i.e., 10% of the mean) Input(suggest input) (1) Factor that impact the total construction cost (2) Assume input for each factor values (including mean value and standard deviation) Minimum output: (1) Statistic property of the potential total cost (2) What is the probability the cost will exceed 10% or 20% of the expected value (based on the mean) Please use a function in the code (Define a function) for the factors that impact total construction cost so to input different values.

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

For the following code can you change the factors that impact the total construction cost section into a function(define a function). Where the mean  can be entered through by asking for the inputs of the mean value for each of the factors. (i.e., "Please enter the mean value for material", "Please enter the mean value for labour".. etc.). Follwoing this the standard deviation of the factors is calculated and this is all done in a function. 

Construction management, price and uncertainty analysis. The intent of the code is to use the
Python sampling methods to estimate the uncertainty in the project pricing. Assume a project cost
includes the price of material, labour cost, property cost, construction data, and anything else you
want to include. However, we know the price, labour cost, construction and other factors will
change during construction period. Let's assume that each of the parameters follow the normal
distribution with a constant standard deviation (i.e., 10% of the mean)
Input(suggest input)
(1) Factor that impact the total construction cost
(2) Assume input for each factor values (including mean value and standard deviation)
Minimum output:
(1) Statistic property of the potential total cost
(2) What is the probability the cost will exceed 10% or 20% of the expected value (based on the
mean)
Please use a function in the code (Define a function) for the factors that impact total construction
cost so to input different values.
Transcribed Image Text:Construction management, price and uncertainty analysis. The intent of the code is to use the Python sampling methods to estimate the uncertainty in the project pricing. Assume a project cost includes the price of material, labour cost, property cost, construction data, and anything else you want to include. However, we know the price, labour cost, construction and other factors will change during construction period. Let's assume that each of the parameters follow the normal distribution with a constant standard deviation (i.e., 10% of the mean) Input(suggest input) (1) Factor that impact the total construction cost (2) Assume input for each factor values (including mean value and standard deviation) Minimum output: (1) Statistic property of the potential total cost (2) What is the probability the cost will exceed 10% or 20% of the expected value (based on the mean) Please use a function in the code (Define a function) for the factors that impact total construction cost so to input different values.
import numpy as np
#Defne the factors that impact the total construction cost
factors =["material", "labour", "property", "construction "]
#Define the mean and standard deviation of each factor
means =[100,50,50,10]
stds = [10,5,5,1]
#Sample the values of each factor
samples
=
np.random.normal (means,stds, size=(100, len(factors)))
#Calculate the total cost for each sample
total_costs-np. sum(samples, axis=1)
#Print the statistical properties of the total cost
print("mean:", np.mean(total_costs))
print("standard deviation:",np.std(total_costs))
#Calculate the probability that the total cost will exceed 10% and 20% of the expected value
prob_10=np.mean(total_costs>1.1*np.mean(total_costs))
prob_20=np.mean(total_costs>1.2*np.mean(total_costs))
#Print the probabilities
print("probability of exceeding 10%:", prob_10)
print("probability of exceeding 20% : ", prob_20)
Transcribed Image Text:import numpy as np #Defne the factors that impact the total construction cost factors =["material", "labour", "property", "construction "] #Define the mean and standard deviation of each factor means =[100,50,50,10] stds = [10,5,5,1] #Sample the values of each factor samples = np.random.normal (means,stds, size=(100, len(factors))) #Calculate the total cost for each sample total_costs-np. sum(samples, axis=1) #Print the statistical properties of the total cost print("mean:", np.mean(total_costs)) print("standard deviation:",np.std(total_costs)) #Calculate the probability that the total cost will exceed 10% and 20% of the expected value prob_10=np.mean(total_costs>1.1*np.mean(total_costs)) prob_20=np.mean(total_costs>1.2*np.mean(total_costs)) #Print the probabilities print("probability of exceeding 10%:", prob_10) print("probability of exceeding 20% : ", prob_20)
Expert Solution
steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Follow-up Questions
Read through expert solutions to related follow-up questions below.
Follow-up Question

Can you change the factors into a function 

 

Solution
Bartleby Expert
SEE SOLUTION
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY