Suppose that six cards are selected at random from a standard 52-card deck, what is the probability that two of the selected cards are less than 5 and neither of them is black and two cards are greater than 10 neither of them is red, and the last two cards are any cards?
In: Statistics and Probability
The owner of Maumee Ford-Volvo wants to study the relationship between the age of a car and its selling price. Listed below is a random sample of 12 used cars sold at the dealership during the last year.
| Car | Age (years) | Selling Price ($000) | ||||||||
| 1 | 11 | 12.1 | ||||||||
| 2 | 8 | 10.5 | ||||||||
| 3 | 14 | 5.7 | ||||||||
| 4 | 17 | 4.9 | ||||||||
| 5 | 9 | 5.0 | ||||||||
| 6 | 8 | 13.4 | ||||||||
| 7 | 10 | 10.5 | ||||||||
| 8 | 14 | 9.0 | ||||||||
| 9 | 13 | 9.0 | ||||||||
| 10 | 17 | 4.5 | ||||||||
| 11 | 6 | 12.5 | ||||||||
| 12 | 6 | 11.5 | ||||||||
1-Determine the regression equation.
a=
b=
2- Estimate the selling price of an 7-year-old car (in $000).
3-Interpret the regression equation (in dollars).
In: Statistics and Probability
Given any positive integer n, the hailstone sequence starting at n is obtained as follows. You write a sequence of numbers, one after another. Start by writing n. If n is even, then the next number is n/2. If n is odd, then the next number is 3n + 1. Continue in this way until you write the number 1.
For example, if you start at 7, then the next number is 22 (3 × 7 + 1). The next number after 22 is 11.
The hailstone sequence starting at 7 is [7, 22, 11, 34, 17, 52, 26, 13, 40, 20, 10, 5, 16, 8, 4, 2, 1] and its length is 17.
The hailstone sequence starting at 6 is [6, 3, 10, 5, 16, 8, 4, 2, 1] and its length is 9.
The hailstone sequence starting at 1 is [1] and its length is 1.
The Assignment
Write and test a C++ program that reads a number n from the standard input (after giving a suitable prompt) and then writes the following information on the standard output:
the entire hailstone sequence starting at n, all on one line, with the numbers separated by spaces;
the length of the hailstone sequence that starts with n;
the largest number in the hailstone sequence that starts with n;
an indication of whether the hailstone sequence that starts with n contains a number that is greater than 1000.
the length of the longest hailstone sequence that starts with a number from 1 to n;
the starting number of the longest hailstone sequence that starts with a number from 1 to n;
the largest number that occurs in any hailstone sequence that starts with a number from 1 to n.
the start value, from 1 to n, of the hailstone sequence that contains largest number reported in the previous step.
For this program, use loops. Do not use recursion. Use type int for all of the integers. Do not use any of
The main function must not contain any loops. You can use the <cstdio>, <iostream> and <algorithm> libraries for this assignment.
The output needs to be sensible and easy to read, not just numbers. It must follow the general template below, with all numeric results lined up (approximately) vertically. Each part of the output should be on a separate line. Parts in black are written by the program.
What number shall I start with? 7 The hailstone sequence starting at 7 is: 7 22 11 34 17 52 26 13 40 20 10 5 16 8 4 2 1 Sequence length: 17 Largest number: 52 Contains a number >1000? no Greatest length starting with 1 to 7: 17 Start value of sequence of length 17: 7 Largest value in a sequence starting with 1 to 7: 52 Start value of sequence containing 52: 7
In: Computer Science
For c++, please do not recycle other peoples code as they do not satisfy the requirements.
Write a program for sorting a list of integers in ascending order using the bubble sort algorithm.
Requirements
Implement the following functions:
Here is the content of the file data.txt.
9
8
4
7
2
9
5
6
1
3
Then reimpelment a function called bubble_sort that has the following prototype.
bubble_sort(int *array, int size, pointer to a function)
Pre condition
array - a pointer to an array of size element.
pointer to function - a pointer to a function that compares two
values (depending on sorting in ascending order or descending
order)
Post condition
Sort the array in ascending or descending based on the the pointer
to a function.
Write the main function to perform the following:
In: Computer Science
How do i change the vector v to size 20 in C++.
Also given the following, which line of code stores 40 into the 4th column of the 6th row of array dataVals?
const int rows = 7;
const int cols = 5;
int dataVals[rows][cols];
Select one:
a. dataVals[5, 3] = 40;
b. dataVals[5 * 3] = 40;
c. dataVals[3][5] = 40;
d. dataVals[5][3] = 40;
In: Computer Science
You are the manager of a 40 head broodmare farm. The mare’s average weight is 1,000 lbs. ➢ You know the mares in early lactation require: 28.3 Mcal DE, 3 lbs Crude protein, 50 g Ca, 34 g P. ➢ You go to the local feed store and purchase a feed that sells of $8.50/50 lb bag. ➢ The nutrient make up of the feed is: 13.5% CP, 0.5% Ca, and 0.44% P. By the fiber content you estimate the DE to be around 1.3 Mcal/lb. ➢ You feed 1% bwt in grass hay (7% CP, 0.8 Mcal DE/lb, 0.4% Ca, 0.2% P) A. How much of the commercial feed must you feed to meet the mares’ requirements (per head, per day)? 21.76 B. If the hay costs $40/ton, what is the monthly cost to feed these 40 mares, in early lactation (grain cost is given above)? a. Hay b. Grain c. Total
In: Physics
HOMEWORK 1
This assignment is designed to illustrate how a software package such as Microsoft Excel supplemented by an add-in such as PHStat can enable one to calculate minimum sample sizes necessary in order to construct confidence intervals for both population means and proportions and to construct these types of confidence intervals. You should use PHStat in order to accomplish all parts of this assignment. You should not only find the required information, but you should explain the meanings of your results for each problem and part of each problem in the context of the problem. You also should provide business implications of the results at which you arrive for one part of either problems two and three and for problem five.
Scenario of the Problem:
In your memo, be sure to comment on the differences found in the calculation of the minimum sample sizes in the various parts of the above problem. Explain why differences in your answers exist. In doing so, make all comparisons relative to the answer found in the first part of the problem.
Appendix One: (Age of Supporters)
40 32 60 58 22 28 66 70 71 55 59 58 62 44 89 48 56 33 46 39 39 44 32 48 49 50 51 18 28 23 34 54 28 76 35 77 38 21 59 51 54 38 45 39 19 90 37 46 22 26 27 39 30 45 27
Comment on the changes in the minimum sample sizes you have computed based upon the changes in the information given in the three parts of this problem.
Appendix Two: (Loyal Party Supporter? (Y = yes, N = no))
Y Y Y Y N N Y Y Y Y N
Y N Y Y Y Y Y Y Y N Y
N Y Y Y Y Y Y Y Y Y Y
Y Y N N N Y Y Y Y Y Y
Y Y Y Y Y Y N Y N N Y
N Y Y Y Y Y Y Y Y N Y
Y Y Y N Y Y Y Y Y Y N
N Y Y Y Y Y Y Y Y Y Y
In: Math
HOMEWORK 1
This assignment is designed to illustrate how a software package such as Microsoft Excel supplemented by an add-in such as PHStat can enable one to calculate minimum sample sizes necessary in order to construct confidence intervals for both population means and proportions and to construct these types of confidence intervals. You should use PHStat in order to accomplish all parts of this assignment. You should not only find the required information, but you should explain the meanings of your results for each problem and part of each problem in the context of the problem. You also should provide business implications of the results at which you arrive for one part of either problems two and three and for problem five.
Scenario of the Problem:
In your memo, be sure to comment on the differences found in the calculation of the minimum sample sizes in the various parts of the above problem. Explain why differences in your answers exist. In doing so, make all comparisons relative to the answer found in the first part of the problem.
Appendix One: (Age of Supporters)
40 32 60 58 22 28 66 70 71 55 59 58 62 44 89 48 56 33 46 39 39 44 32 48 49 50 51 18 28 23 34 54 28 76 35 77 38 21 59 51 54 38 45 39 19 90 37 46 22 26 27 39 30 45 27
Comment on the changes in the minimum sample sizes you have computed based upon the changes in the information given in the three parts of this problem.
Appendix Two: (Loyal Party Supporter? (Y = yes, N = no))
Y Y Y Y N N Y Y Y Y N
Y N Y Y Y Y Y Y Y N Y
N Y Y Y Y Y Y Y Y Y Y
Y Y N N N Y Y Y Y Y Y
Y Y Y Y Y Y N Y N N Y
N Y Y Y Y Y Y Y Y N Y
Y Y Y N Y Y Y Y Y Y N
N Y Y Y Y Y Y Y Y Y Y
In: Math
Consider a two year 6% coupon bond that sells at a discount rate of 7% APR. At what price should the bond sell?
In: Finance
Two charges, q1 = 5 μC and q2 = 7 μC, are separated by 25 cm. Where should a third charge be placed on the line between them such that the resultant force on it will be zero? Does it matter if the third charge is positive or negative?
In: Physics