13 25 40 20 28 48 19 14
Complete the following:
a) Use the bubble sort (page 214) to sort the values showing the order of the values in the list after every pass of the sorting algorithm.
b) What is the time complexity of the sort (use the number of comparisons required as a measure of time.)
c) Modify the algorithm so it stops if there are no swaps in a complete pass. How many comparisons would be needed in your specific example?
d) Choose one of the following properties of Algorithms and show that the bubble sort has the given property:
Input: an algorithm has input values;
Output: from each set of input values an algorithm produces output values that are a solution to the problem;
Definiteness: the steps in an algorithm must be precisely defined;
Correctness: an algorithm must produce the correct output values for each set of input values;
Finiteness: an algorithm should produce the output after a finite number of steps;
Effectiveness: it must be possible to perform each step in the algorithm in a finite amount of time;
Generality: the algorithm must be applicable to a category of problems, not a single set of input values
In: Math
A total of 150 crimes were reported by the sheriff last year. Of the 150 crimes, 39 were committed by criminals under 20 years of age, 36 were committed by criminals over 40 and 82 were violent crimes. There were 27 violent crimes under the age of 20 and 14 violent criminals over the age of 40.
Type of Crime | Under 20 | 20-40 | Over 40 | Total |
Violent | 27 | 41 | 14 | 82 |
Non Violent | 12 | 34 | 22 | 68 |
Total | 39 | 75 | 36 | 150 |
What is the probability that at least one out of four crimes is nonviolent? Please show work so I can understand how to get the answer
In: Math
determine what level of measurements (interval/ratio, nominal, ordinal) the following demographics are measured:
Number of children in a household, race, salary $75 k- 100 k, ethnicity, political party,ideology, level of education (by level),marital status, religion, religious affiliation, age in years.
In: Math
Find an experimental study from a journal of your choice. (Provide the citation).
In: Math
The New England Cheese Company produces two cheese spreads by blending mild cheddar cheese with extra sharp cheddar cheese. The cheese spreads are packaged in 12-ounce containers, which are then sold to distributors throughout the Northeast. The Regular blend contains 85% mild cheddar and 15% extra sharp, and the Zesty blend contains 75% mild cheddar and 25% extra sharp. This year, a local dairy cooperative offered to provide up to 9,000 pounds of mild cheddar cheese for $1.50 per pound and up to 4,000 pounds of extra sharp cheddar cheese for $1.70 per pound. The cost to blend and package the cheese spreads, excluding the cost of the cheese, is $0.25 per container. If each container of Regular is sold for $2.00 and each container of Zesty is sold for $2.50, how many containers of Regular and Zesty should New England Cheese produce?
Do not round your interim computations. If required, round your answers to the nearest whole number.
Let R= | number of containers of Regular | |
Z = | number of containers of Zesty |
Optimal Solution: R
= , Z = , profit = $ . |
In: Math
An airline owns an aging fleet of Boeing 737 jet airplanes. It is considering a major purchase of up to 17 new Boeing model 787 and 767 jets. The decision must take into account numerous cost and capability factors, including the following: (1) the airline can finance up to $1.6 billion in purchases; (2) each Boeing 787 will cost $80 million, and each Boeing 767 will cost $110 million; (3) at least one-third of the planes purchased should be the longer-range 787; (4) the annual maintenance budget is to be no more than $8 million; (5) the annual maintenance cost per 787 is estimated to be $800,000, and it is $500,000 for each 767 purchased; and (6) each 787 can carry 125,000 passengers per year, whereas each 767 can fly 81,000 passengers annually. Formulate this as an integer programming problem to maximize the annual passenger-carrying capability. What category of integer programming problem is this? Solve this problem. Please do not use any computer programs to solve. Thank you.
In: Math
If the sample proportion of first-year students who suffer from depression is 328/450
1- Find and interpret the 95% condence interval for the proportion of students who are suffering from depression. Is there evidence to suggest that more than half
of the population of first-year students suffer from depression? Explain.
2- Give an explanation for your conclusion in part 1.
Please show steps. No steps, no rate.
In: Math
In the following problem, check that it is appropriate to use the normal approximation to the binomial. Then use the normal distribution to estimate the requested probabilities. Ocean fishing for billfish is very popular in the Cozumel region of Mexico. In the Cozumel region about 39% of strikes (while trolling) resulted in a catch. Suppose that on a given day a fleet of fishing boats got a total of 24 strikes. Find the following probabilities. (Round your answers to four decimal places.) (
a) 12 or fewer fish were caught
(b) 5 or more fish were caught (
c) between 5 and 12 fish were caught
In: Math
In the study of a storage dam design, it is assumed that quantities can be measured sufficiently accurately in units of ¼ of the dam’s capacity. It is known from past studies that at the beginning of the first (fiscal) year the dam will be either full, ¾ full, ½ full, or ¼ full, with probabilities 1/3, 1/3, 1/6, and 1/6, respectively. During each year water is released. The amount released is ½ the capacity if at least this much is available; it is all that remains if this is less than ½ the capacity. After release, the inflow from the surrounding watershed is obtained. It is either ½ or ¼ of the dam’s capacity with probabilities 2/3 and 1/3, respectively. Inflow causing a total in excess of the capacity is spilled. Assuming independence of annual inflows, what is the probability distribution of the total amount of water at the beginning of the third year? Use total probability theorem.
In: Math
Problem 4-03 (Algorithmic)
The employee credit union at State University is planning the allocation of funds for the coming year. The credit union makes four types of loans to its members. In addition, the credit union invests in risk-free securities to stabilize income. The various revenue producing investments together with annual rates of return are as follows:
Type of Loan/Investment | Annual Rate of Return (%) |
---|---|
Automobile loans | 8 |
Furniture loans | 12 |
Other secured loans | 14 |
Signature loans | 13 |
Risk-free securities | 9 |
The credit union will have $2.4 million available for investment during the coming year. State laws and credit union policies impose the following restrictions on the composition of the loans and investments.
How should the $2.4 million be allocated to each of the loan/investment alternatives to maximize total annual return? Round your answers to the nearest dollar.
Automobile Loans | $ |
Furniture Loans | $ |
Other Secured Loans | $ |
Signature Loans | $ |
Risk Free Loans | $ |
What is the projected total annual return? Round your answer to the nearest dollar.
$ ______________________
In: Math
You are getting your wisdom teeth removed and are a participant in a clinicaltrial for three different procedures, one of which is randomly assigned to you. Of those whoundergo the first procedure, 8% get an infection; of those who undergo the second procedure,4% get an infection; of those who undergo the third procedure, 9% get an infection.
(a) What is the probability that you will not get an infection.
b) Unfortunately, you got an infection after removing your wisdom teeth! What is the probability that you were assigned to the first procedure?
In: Math
The owner of a popular chicken restaurant, Chicken-For-Me, with
many branches wanted to know if the quality of customer service at
a new restaurant was acceptable. One aspect of service that was
examined was the length of time that customers had to wait in line
before ordering their food. The restaurant decided on acceptable
probabilities for the waiting-time categories, and these are given
below.
Waiting-time Category
Probability
No more than 1 minute
0.15
More than 1 minute but no more than 3 mins
0.30
More than 3 minutes but no more than 5 mins
0.24
More than 5 minutes but no more than 10 minutes
0.25
More than 10 minutes
0.06
To investigate whether the quality of customer service was
acceptable, waiting times were recorded for a random sample of 100
customers at the new Chicken-for-Me. The table below shows the
number of customers observed in the five waiting-time
categories.
Waiting-time Category
Number of Customers
No more than 1 minute
20
More than 1 minute but no more than 3 mins
31
More than 3 minutes but no more than 5 mins
31
More than 5 minutes but no more than 10 minutes
15
More than 10 minutes
3
Total
100
Use the sample data for the 100 customers to conduct a statistical
test to determine if the waiting times at the new Chicken-For-Me
are inconsistent with the acceptable probabilities for the waiting-
time categories.
Question #2
A randomly selected group of men and women were surveyed to
investigate the association between gender and the amount of money
spent at a local store, Bullseye. Results are shown in the table
below:
Dollars Spent @ “Bullseye”
$0 to $50
$51 to $100
$101 to $200
more than $201
Total
Men
18
85
71
90
264
Women
35
72
98
142
347
Total
53
157
169
232
611
Is there convincing evidence that there is an association between
gender and the amount of money spent at “Bullseye”?
In: Math
Problem 7-9 Dixie Showtime Movie Theaters, Inc., owns and operates a chain of cinemas in several markets in the southern U.S. The owners would like to estimate weekly gross revenue as a function of advertising expenditures.
Data for a sample of eight markets for a recent week follow. Market Weekly Gross Revenue ($100s) Television Advertising ($100s) Newspaper Advertising ($100s) Mobile 102.5 5.1 1.6 Shreveport 52.7 3.2 3 Jackson 75.8 4 1.5 Birmingham 127.8 4.3 4 Little Rock 137.8 3.5 4.3 Biloxi 101.4 3.6 2.3 New Orleans 237.8 5 8.4 Baton Rouge 219.6 6.9 5.8
(a) Use the data to develop an estimated regression with the amount of television advertising as the independent variable. Let x represent the amount of television advertising. If required, round your answers to three decimal places. For subtractive or negative numbers use a minus sign even if there is a + sign before the blank. (Example: -300) = + x Test for a significant relationship between television advertising and weekly gross revenue at the 0.05 level of significance. What is the interpretation of this relationship? The input in the box below will not be graded, but may be reviewed and considered by your instructor.
(b) How much of the variation in the sample values of weekly gross revenue does the model in part (a) explain? If required, round your answer to two decimal places. %
(c) Use the data to develop an estimated regression equation with both television advertising and newspaper advertising as the independent variables. Let x1 represent the amount of television advertising. Let x2 represent the amount of newspaper advertising. If required, round your answers to three decimal places. For subtractive or negative numbers use a minus sign even if there is a + sign before the blank. (Example: -300) = + x1 + x2 Test whether each of the regression parameters β0, β1, and β2 is equal to zero at a 0.05 level of significance. What are the correct interpretations of the estimated regression parameters? Are these interpretations reasonable?
(d) How much of the variation in the sample values of weekly gross revenue does the model in part (c) explain? If required, round your answer to two decimal places. % (e) Given the results in part (a) and part (c), what should your next step be? Explain. (f) What are the managerial implications of these results?
In: Math
suppose that you encounter two traffic lights on your commute to school. Based on past experience, you judge that the probability is .60 that the first light will be red when you get to it, .50 that the second light will be red, and .40 that both lights will be red.
a)Determine the conditional probability that the second light will be red, given that the first light is red. (Here and throughout, show the details of your calculations.)
b)Are the events {first light is red} and {second light is red} independent? Justify your answer.
c) Given that at least one light is red, what is the probability that both lights are red? (Show your work.)
In: Math
In a study of texting speed, 45 adults aged 18-22 were randomly chosen. Each person was asked to type the following phrase exactly “Hi! What’s up?” on a cell phone. The average time it took was 2.72 seconds. This was found to happen with about a 25% chance when compared to someone saying it takes less than 3 seconds to type.
1.) Identify the following: a. Population: ______________________________________________
b. Sample: _________________________________________________
c. Unit/individual: ___________________________________________
d. Response variable: ________________________________________
2.) What type of variable is the response variable? And what is the level of measurement?
3.) Determine whether the results below appear to have statistical significance, and also determine whether the results have practical significance.
In a study of a hair growth vitamin, 65 subjects grew an average of 1.4 inches of hair in 4 weeks. If regular hair growth is ¼ inch per month. It is found that there is about a 2% chance of getting such results with a diet that has no effect.
i. Does the weight loss program have statistical significance?
ii. Does the weight loss program have practical significance?
Determine which of the four levels of measurement (nominal, ordinal, interval, ratio) is most appropriate for the data below.
4) Alert system of yellow (lowest), orange, and red (highest) right
5) Social security numbers
6) Years in which a war was started
7) Class times measured in minutes
In: Math