Questions
In a region, 12% of the adult population are smokers, 0.8% are smokers with emphysema, and...

In a region, 12% of the adult population are smokers, 0.8% are smokers with emphysema, and 0.2% are non-smokers with emphysema.

a. What is the probability that a person selected at random has emphysema?

b. Given that the selected person is a smoker, what is the probability that the person has emphysema?

c. Given that the selected person is not a smoker, what is the probability that this person has emphysema?

In: Statistics and Probability

Only securities A.B.C with the following characteristics exist in the market. 1.Securities A: E (R) =...

Only securities A.B.C with the following characteristics exist in the market.

1.Securities A: E (R) = 10% / Standard deviation = 12.0%
2.Securities B: E (R) = 6% / Standard deviation = 6.0%
3.Securities C: E (R) = 4% / Standard deviation = 0.0%

Suppose that the correlation coefficient between the returns of Securities A and B is 0.5.

(a) When constructing a portfolio with securities A and B, change the composition ratio to (1.0, 0), (0.7, 0.3), (0.5, 0.5), (0.3, 0.7), (0.1, 0) and expect How do returns and standard deviations change?

(b) Use only Securities A and B. We want to achieve an expected return of 8%. What is the minimum risk faced at this time?

(c) When constructing a portfolio with securities A, B, and C, what is the composition ratio of a portfolio with an expected return of 8% and a minimum risk? At this time, what is the composition ratio between risky assets A and B?

(d) What is the compositional ratio of the portfolio with the expected return of 6% and the minimum risk when constructing the portfolio with securities A, B, and C? At this time, does the composition ratio between risky assets A and B differ from that in (c)?

In: Finance

? A. B. C. D. E. 1.The amount of charge on a capacitor in an electric...

? A. B. C. D. E. 1.The amount of charge on a capacitor in an electric circuit decreases by 30% each second.

   ?    A    B    C    D    E      2. Polluted water is passed through a series of filters. Each filter removes all but 30% of the remaining impurities from the water.

   ?    A    B    C    D    E      3. In 1950, the population of a town was 3000 people. Over the course of the next 50 years, the town grew at a rate of 10% per decade.

   ?    A    B    C    D    E      4. The percent of a lake's surface covered by algae, initially at 35%, was halved each year since the passage of anti-pollution laws.

   ?    A    B    C    D    E      5. In 1950, the population of a town was 3000 people. Over the course of the next 50 years, the town grew at a rate of 250 people per year.


A. ?(?)=?(0.3)?f(x)=B(0.3)x

B. ?(?)=?(2)−?f(x)=A(2)−x

C. ?(?)=?0+??f(x)=P0+rx

D. ?(?)=?(0.7)?f(x)=B(0.7)x

E. ?(?)=?0(1+?)?f(x)=P0(1+r)x

In: Electrical Engineering

Use the data in the file andy.dta consisting of data on hamburger franchises in 75 cities...

Use the data in the file andy.dta consisting of data on hamburger franchises in 75 cities from Big Andy's Burger Barn.

Set up the model

ln(Si)=b1 + b2ln(Ai) + ei,

where

Si = Monthly sales revenue ($1000s) for the i-th firm

Ai = Expenditure on advertising ($1000s) for the i-th firm

(a) Interpret the estimates of slope and intercept.

(b) How well did the model fit to the data? Use any tests and measures presented in class.

(c) Perform any test for heteroscedasticity in your data.

sales price advert
73.2 5.69 1.3
71.8 6.49 2.9
62.4 5.63 0.8
67.4 6.22 0.7
89.3 5.02 1.5
70.3 6.41 1.3
73.2 5.85 1.8
86.1 5.41 2.4
81 6.24 0.7
76.4 6.2 3
76.6 5.48 2.8
82.2 6.14 2.7
82.1 5.37 2.8
68.6 6.45 2.8
76.5 5.35 2.3
80.3 5.22 1.7
70.7 5.89 1.5
75 5.21 0.8
73.7 6 2.9
71.2 6.37 0.5
84.7 5.33 2.1
73.6 5.23 0.8
73.7 5.88 1.1
78.1 6.24 1.9
75.7 5.59 2.1
74.4 6.22 1.3
68.7 6.41 1.1
83.9 4.96 1.1
86.1 4.83 2.9
73.7 6.35 1.4
75.7 6.47 2.5
78.8 5.69 3
73.7 5.56 1
80.2 6.41 3.1
69.9 5.54 0.5
69.1 6.47 2.7
83.8 4.94 0.9
84.3 6.16 1.5
66 5.93 2.8
84.3 5.2 2.3
79.5 5.62 1.2
80.2 5.28 3.1
67.6 5.46 1
86.5 5.11 2.5
87.6 5.04 2.1
84.2 5.08 2.8
75.2 5.86 3.1
84.7 4.89 3.1
73.7 5.68 0.9
81.2 5.83 1.8
69 6.33 3.1
69.7 6.47 1.9
78.1 5.7 0.7
88 5.22 1.6
80.4 5.05 2.9
79.7 5.76 2.3
73.2 6.25 1.7
85.9 5.34 1.8
83.3 4.98 0.6
73.6 6.39 3.1
79.2 6.22 1.2
88.1 5.1 2.1
64.5 6.49 0.5
84.1 4.86 2.9
91.2 5.1 1.6
71.8 5.98 1.5
80.6 5.02 2
73.1 5.08 1.3
81 5.23 1.1
73.7 6.02 2.2
82.2 5.73 1.7
74.2 5.11 0.7
75.4 5.71 0.7
81.3 5.45 2
75 6.05 2.2

In: Math

For this portion of the lab, you will reuse the program you wrote before. That means...

For this portion of the lab, you will reuse the program you wrote before.

That means you will open the lab you wrote in the previous assignment and change it. You should NOT start from scratch. Also, all the requirements/prohibitions from the previous lab MUST also be included /omitted from this lab.

Redesign the solution in the following manner:
1. Create a menu and ask the user which of the following conversions they wish to perform:
a. Miles to kilometers

b. Gallons to liters

c. Pounds to kilograms

d. Inches to centimeters

e. Fahrenheit to Celsius

2. Your program must raise an exception if the user chooses any item not on the menu presented. Along with raising an exception, write the code to handle this exception.
3. Once the user has chosen a menu item the program should:

a. Ask the user for a value to convert. Refer to the input validations in Lab 4. Your program must raise and exception, and handle the exception, if an input errors occurs.

b. Perform the conversion and write the original value, the original unit, the converted value, and the converted unit to an output file named conversions.txt.

c. Repeat steps a and b 10 times (in a loop).

I have written this code before. I already have added step number 1: the menu. Please add in the code the other requirements: step 2, and step 3 a. b. and c. Thank you!

#Conversions.py

def MilesToKm(Miles):
Km = Miles * 1.6
print(f"Miles: {format(Miles,'.2f')}, kilometers: {format(Km,'.2f')}")
def FahToCel(Fahrenheit):
Celsius = (Fahrenheit - 32) * 5 / 9
print(f"farehnheit: {format(Fahrenheit,'.2f')}, celsius: {format(Celsius,'.2f')}")
def GalToLit(Gallons):
Liters = Gallons * 3.9
print(f"gallons: {format(Gallons,'.2f')}, liters: {format(Liters,'.2f')}")
def PoundsToKg(Pounds):
Kg = Pounds * 3.45
print(f"pounds: {format(Pounds,'.2f')}, kilograms: {format(Kg,'.2f')}")
def InchesToCm(Inches):
Cm = Inches * 2.54
print(f"inches: {format(Inches,'.2f')}, centimeters: {format(Cm,'.2f')}")

#Main.py

#Import the package
from Conversions import *
#Create main function to give choice of conversion
def main():
#Intialize the string
string = '''
1: Convert miles to km
2: Convert fahrenheit to celsius
3: Convert gallons to liters
4: Convert pounds to kg
5: Convert inches to cm'''
#Initialize the tupels
metric_name = ('miles','fahrenheit','gallons','pounds','inches')
convert_name = ('km','celsius','liters','kg','cm')
#Print the string
print(string)
#Get the input
choice = int(input('Which of the given conversions would you like to perform? Enter your choice from 1 to 5: '))
#Set count as "3"
count = 3
#Initialize the boolean variable
flag = True
#Execte the "while" loop
while(flag):
#Get the input
input_value = float(input("Enter how much {0} would you like to convert into {1}: "
.format(metric_name[choice-1] , convert_name[choice-1])))
#Check for the negative inputs
if input_value < 0:
#Decrement count by "1"
count -= 1
#Print the invalid message
print('Invalid input! You have',count,'chance(s) to enter a valid input')
#Otherwise
else:
#Check for the choice "1"
if choice == 1:
#Call the function
MilesToKm(input_value)
#Check for the choice "2"
if choice ==2:
#Check whether the input is greater than or equal to "1000"
if input_value >= 1000:
#Decrment the count "1"
count -= 1
#Print the message
print('Invalid input! You have',
count,'chance(s) to enter a valid input')
#Otherwise
else:
#Call the function
FahToCel(input_value)
#Check for the choice "3"
if choice == 3:
#Call the function
GalToLit(input_value)
#Check for the choice "4"
if choice == 4:
#Call the function
PoundsToKg(input_value)
#Check for the choice "5"
if choice == 5:
#Call the function
InchesToCm(input_value)
#Checck whether the count is "0"
if count == 0:
#Set boolean value as "False"
flag = False
#Call the function
main()

In: Computer Science

The following data includes the year, make, model, mileage (in thousands of miles) and asking price...

The following data includes the year, make, model, mileage (in thousands of miles) and asking price (in US dollars) for each of 13 used Honda Odyssey minivans. The data was collected from the Web site of the Seattle P-I on April 25, 2005.

year make model mileage price
2004 Honda Odyssey EXL   20 26900
2004 Honda Odyssey EX 21 23000
2002 Honda Odyssey 33 17500
2002 Honda Odyssey 41 18999
2001 Honda Odyssey EX 43 17200
2001 Honda Odyssey EX 67 18995
2000 Honda Odyssey LX 46 13900
2000 Honda Odyssey EX 72 15250
2000 Honda Odyssey EX 82 13200
2000 Honda Odyssey 99 11000
1999 Honda Odyssey 71 13900
1998 Honda Odyssey 85 8350
1995 Honda Odyssey EX 100 5800



Compute the correlation between age (in years) and mileage for these minivans. (Assume the correlation conditions have been satisfied and round your answer to the nearest 0.001.)

In: Statistics and Probability

1-The mean speed of vehicles along a stretch of highway is 75 miles per hour with...

1-The mean speed of vehicles along a stretch of highway is 75 miles per hour with a standard deviation of 3.8 miles per hour. Your current speed along this stretch of highway is 62 miles per hour. What is the z-score for your speed?

z- score =_______ (Round to two decimal places)

2- For a statistics test the mean is 63 and the standard deviation is 7.0, and for a biology test the mean is 23 and the standard deviation is 3.9. A student gets a 60 on the statistics test and a 22 on the biology test, on which of the two tests the student perform better?

Group of answer choices

Biology

Statistics

Both are equal

3- A member is selected at random from the population represented by the graph. Study the picture and use the information gathered to find the probability that the member selected at random is from the shaded region of the graph.

The area of the shaded region is__________ (Round answers to 4 decimal places)

4-  A random sample of 50 cars in the drive-thru of a popular fast food restaurant revealed an average bill of $18.21 per car. The population standard deviation is $5.92.

Round your answers to two decimal places.

(a) State the point estimate for the population mean cost of fast food bills at this restaurant $

(b) Calculate the 95% margin of error. $

(c) State the 95% confidence interval for the population mean cost of fast food bills at this restaurant.

$  ≤ µ ≤ $

(d) What sample size is needed if the error must not exceed $1.00?

n =

5- Assume that females have pulse rates that are normally distributed with a mean of 74.0 beats per minute and a standard deviation of 12.5 beats per minute.

(a) If 1 adult female is randomly selected, find the probability that her pulse rate is less than 80 beats per minute. (Round your answer to 4 decimal places)

(b) If 16 adult females are randomly selected, find the probability that they have pulse rates with a mean less than 80 beats per minute.  (Round your answer to 4 decimal places)

In: Statistics and Probability

The fuel efficiency, measured in miles per gallon, was measured for each of 12 cars when...

The fuel efficiency, measured in miles per gallon, was measured for each of 12 cars when the cars where brand new. After exactly 5 years of use, the fuel efficiency of the same 12 cars was measured again. The data is in the following table. Mileage when New Mileage after 5 years Difference 16 15 1 27 24 3 17 17 0 33 29 4 28 25 3 24 22 2 18 16 2 22 20 2 20 21 -1 22 20 2 29 22 7 21 22 -1 a). Construct a 99% CI for the mean difference between initial fuel efficiency and the fuel efficiency after 5 years. b). Do the data give an evidence that there is no difference in fuel efficiency.

In: Statistics and Probability

Listed below are the combined city – highway fuel consumption ratings (in miles per gallons) for...

Listed below are the combined city – highway fuel consumption ratings (in miles per gallons) for different cars measured in old rating system and cars in a new rating system introduced in 2008 (based on data from USA today).

A. Construct a 90 percent confidence interval of the difference in the ratings of cars.

Old Rating: 16 18 27 17 33 28 33 18 24 19 18 27 22 18 20 29 19 27 20 21

New Rating: 15 16 24 15 29 25 29 16 22 17 16 24 20 16 18 26 17 25 18 19

B. Based on the interval is there a reason to believe that there is a difference in the ratings of the two cars?

C. Is there any significant difference in the old and new ratings of cars? Use appropriate hypothesis test to answer this question.

In: Statistics and Probability

Two types of engines are tested for fuel efficiency based on miles per gallon. A sample...

Two types of engines are tested for fuel efficiency based on miles per gallon. A sample of 31 cars were tested with Brand X and the mean was 20.9 mpg with a standard deviation of 1.8 mpg. 31 cars tested with Brand Y had a mean of 17.6 mpg and a standard deviation of 1.2 mpg. Test the claim that Brand X is more efficient than Brand Y. Use a 0.05 significance level.

Using the data from Problem #1, calculate a 99% confidence interval of the difference between fuel efficiencies of Brand X and Brand Y.

In: Statistics and Probability