Your code must print all the steps in the output as an Eg>
When you run your Merge sort code the sequence of output should be:
1) Enter input sequence
2) Show n/2 division of the input sequence
3) keep showing n/2 division of your sequence until you get one attribute
4) Sort first two numbers
5) Make a stack of 4 by merging 2 * 2 and sort them
6) keep showing merging and sorting until you show the final merging of last two stacks and sort them.
Similarly, show all the steps for Bubble sort.
Mostly need Bubble in Java, please.v
In: Computer Science
A doctor orders 170. mL of 4 % (m/v) ibuprofen. If you have 10. % (m/v) ibuprofen on hand, how many milliliters do you need? Express the volume to two significant figures and include the appropriate units. A doctor orders 170. mL of 4 % (m/v) ibuprofen. If you have 10. % (m/v) ibuprofen on hand, how many milliliters do you need? Express the volume to two significant figures and include the appropriate units.
A doctor orders 170. mL of 4 % (m/v) ibuprofen. If you have 10. % (m/v) ibuprofen on hand, how many milliliters do you need? Express the volume to two significant figures and include the appropriate units.
You need to prepare a 2.20 M solution of sodium hydroxide (molar mass of sodium hydroxide = 40.00 g/mol ), but you only have a 10 mL graduated cylinder and a 25 mL beaker. Complete the following sentences regarding the concentration of the prepared solution. Match the words in the left column to the appropriate blanks in the sentences on the right. Make certain each sentence is complete before submitting your answer.
You need to prepare a 2.20 M solution of sodium hydroxide (molar mass of sodium hydroxide = 40.00 g/mol ), but you only have a 10 mL graduated cylinder and a 25 mL beaker. Complete the following sentences regarding the concentration of the prepared solution. Match the words in the left column to the appropriate blanks in the sentences on the right. Make certain each sentence is complete before submitting your answer.
In: Chemistry
3. A teacher believes that a new method will improve students’ reading ability. For 8 weeks, she teaches a class of 21 students using these new methods. Meanwhile a colleague uses “traditional” methods to teach his 23 students. At the end of the 8 weeks, all the students are given the Degree of Reading Power Test. Here are the scores:
New Method students
|
24 |
43 |
58 |
71 |
43 |
49 |
|
61 |
44 |
67 |
49 |
53 |
56 |
|
59 |
52 |
62 |
54 |
57 |
33 |
|
46 |
43 |
57 |
Traditional Method students
|
42 |
43 |
55 |
26 |
62 |
|
37 |
33 |
41 |
19 |
54 |
|
20 |
85 |
46 |
10 |
17 |
|
60 |
53 |
42 |
37 |
42 |
|
55 |
28 |
48 |
Are we justified in using the t procedures? Explain.
Give a significance test to check the teacher’s theory. Include all relevant components. (you may wish to list some “background” items first)
Give a 99% confidence interval for the mean difference between the two groups of students
Draw an overall conclusion based on parts B and C.
In: Statistics and Probability
A manufacturing company is measuring the diameter of a ball bearing in mm by 12 inspectors, each using two different kinds of calipers to test the difference between the sample means of the two calipers used. Data is shown below. Use excel to resolve.
a) Use t-test to check if there is a significant difference between the means of the population of measurements from which the two samples were selected? Use α = 0.01, 0.05, 0.1 and comment on the results.
b) Find the P-value for the test in part (a).
| Inspector | Caliper 1 | Caliper 2 |
| 1 | 0.473 | 0.518 |
| 2 | 0.512 | 0.552 |
| 3 | 0.518 | 0.545 |
| 4 | 0.492 | 0.521 |
| 5 | 0.484 | 0.511 |
| 6 | 0.512 | 0.492 |
| 7 | 0.513 | 0.558 |
| 8 | 0.536 | 0.545 |
| 9 | 0.481 | 0.5 |
| 10 | 0.533 | 0.575 |
| 11 | 0.536 | 0.554 |
| 12 | 0.538 | 0.515 |
In: Statistics and Probability
STAT 14_3:
Ronit has a box with beads. The beads are opaque or transparent
and available in several colors.
The probability of a random bead being red is 0.3. The probability
of a bead being transparent is 0.6.
Of the red beads - the probability of a random bead being
transparent is 0.5.
a. Remove 8 beads from the box at random and upon return. What is the probability that exactly two of them will be red?
b. Take beads out of the box accidentally and on return until
you first remove a transparent bead
i. What is the probability of getting more than 4 beads?
ii. The first two beads taken out were not transparent. What is the
probability of getting 7 beads out of the box?
c. Remove 10 beads from the box at random and upon return. What is the probability that exactly three of them will be red and transparent, two opaque and red and 5 transparent and red?
In: Statistics and Probability
you have $100 to invest in two different investment projects, A and B, the total returns from which (TR and TR) are given below. the cost of purchasing a unit of investment in each project is $10 per unit. your problem is to invest the $100 in the two invest the $100 in the two investments so as to maximize your total return (for example, if you invested the entire $100 in investment B, you would receive a total return of $105.) what is the general principle that defines the maximizing allocation of the $100 among the investment options?
| # units | TR A | TR B |
| 1 | $20 | $15 |
| 2 | 38 | 29 |
| 3 | 54 | 42 |
| 4 | 68 | 54 |
| 5 | 80 | 65 |
| 6 | 90 | 75 |
| 7 | 98 | 84 |
| 8 | 104 | 92 |
| 9 | 108 | 99 |
| 10 | 110 | 105 |
In: Economics
Module 6 Worksheet: Chapter 10 Capital Budgeting – Complete in Excel
Please complete the following and upload this to the drop box by Sunday 11:55PM
Year Project A Project B
1 $5,000,000 $20,000,000
2 10,000,000 10,000,000
3 20.000.000 6,000,000
In: Finance
Temperature Conversion Menu (100 pts)
The three common temperature scales are Celsius, Fahrenheit and Kelvin. The conversion formulae for each of the scales is shown below (where °C, °F and K represent the temperatures in degrees Celsius, degrees Fahrenheit and Kelvin respectively):
Celsius to Fahrenheit: °F = (9.0/5) ´ (°C) + 32
Celsius to Kelvin: K = °C + 273.15
Kelvin to Celsius: °C = K – 273.15
Kelvin to Fahrenheit: °F = (9.0/5) ´ (K – 273.15) + 32
Fahrenheit to Celsius: °C = (5.0/9) ´ (°F – 32)
Fahrenheit to Kelvin: K = (5.0/9) ´ (°F – 32) + 273.15
Write a program that can convert the temperature using the given formulae.
Your code should:
2 – convert from Celsius to Kelvin
3 – convert from Kelvin to Celsius
4 – convert from Kelvin to Fahrenheit
5 – convert from Fahrenheit to Celsius
6 – convert from Fahrenheit to Kelvin
7 – quit the program
Samples of the output are shown below. (Note, match the wording as closely as possible and accomplish the same tasks.)
Please select an option below (1 to 7):
1. Convert from Celsius to Fahrenheit
2. Convert from Celsius to Kelvin
3. Convert from Kelvin to Celsius
4. Convert from Kelvin to Fahrenheit
5. Convert from Fahrenheit to Celsius
6. Convert from Fahrenheit to Kelvin
7. Quit
Enter choice: 8
Invalid entry. Renter choice: 1
Enter the temperature: 100
100.0 degrees Celsius is 212.0 degrees Fahrenheit
Please select an option below (1 to 7):
1. Convert from Celsius to Fahrenheit
2. Convert from Celsius to Kelvin
3. Convert from Kelvin to Celsius
4. Convert from Kelvin to Fahrenheit
5. Convert from Fahrenheit to Celsius
6. Convert from Fahrenheit to Kelvin
7. Quit
Enter choice: 2
Enter the temperature: 0
0.0 degrees Celsius is 273.15 Kelvin
Please select an option below (1 to 7):
1. Convert from Celsius to Fahrenheit
2. Convert from Celsius to Kelvin
3. Convert from Kelvin to Celsius
4. Convert from Kelvin to Fahrenheit
5. Convert from Fahrenheit to Celsius
6. Convert from Fahrenheit to Kelvin
7. Quit
Enter choice: 3
Enter the temperature: -40
-40.0 degrees Fahrenheit is -40.0 degrees Celsius
Please select an option below (1 to 7):
1. Convert from Celsius to Fahrenheit
2. Convert from Celsius to Kelvin
3. Convert from Kelvin to Celsius
4. Convert from Kelvin to Fahrenheit
5. Convert from Fahrenheit to Celsius
6. Convert from Fahrenheit to Kelvin
7. Quit
Enter choice: 4
Enter the temperature: 70
70.0 degrees Fahrenheit is 294.26111111111106 Kelvin
Please select an option below (1 to 7):
1. Convert from Celsius to Fahrenheit
2. Convert from Celsius to Kelvin
3. Convert from Kelvin to Celsius
4. Convert from Kelvin to Fahrenheit
5. Convert from Fahrenheit to Celsius
6. Convert from Fahrenheit to Kelvin
7. Quit
Enter choice: 5
Enter the temperature: 100
100.0 Kelvin is -173.14999999999998 degrees Celsius
Please select an option below (1 to 7):
1. Convert from Celsius to Fahrenheit
2. Convert from Celsius to Kelvin
3. Convert from Kelvin to Celsius
4. Convert from Kelvin to Fahrenheit
5. Convert from Fahrenheit to Celsius
6. Convert from Fahrenheit to Kelvin
7. Quit
Enter choice: 6
Enter the temperature: 100
100.0 Kelvin is -279.66999999999996 degrees Fahrenheit
Please select an option below (1 to 7):
1. Convert from Celsius to Fahrenheit
2. Convert from Celsius to Kelvin
3. Convert from Kelvin to Celsius
4. Convert from Kelvin to Fahrenheit
5. Convert from Fahrenheit to Celsius
6. Convert from Fahrenheit to Kelvin
7. Quit
Enter choice: 7
Ok bye!
In: Computer Science
There are two candidate RNAs for COVID-19 diagnosis: RNA1, RNA2. Canadian Disease Control Center carried out a clinical trial to check the expression levels for these two RNAs in the subjects with the virus infection: one group of 50 randomly recruited subjects has no critical symptoms; and the other group of 50 subjects has symptoms. After normalization, RNA1 expression levels follow a normal distribution N(0,1) for no-symptom subjects while N(1,1) for subjects with symptoms requiring hospitalization. For RNA2, the corresponding expression levels in nonsymptom subjects and subjects with symptoms follow normal distributions N(0,1) and N(-1,1), respectively.
a. For one breast cancer patient with normalized RNA1 expression
level at 2, what is the log-likelihood ratio (LLR) of this patient
being diagnosed to be hospitalized? (3 pts)
b. Taking naive Bayes classifier, if we know RNA1=2, RNA2 = 1, what
will be the naive Bayes score of the patient being hospitalized? (3
pts)
c. What is the basic assumption of naive Bayes classifier? Under
what situations, it may be problematic? (4 pts)
In: Statistics and Probability
The textbook basically says that the general addition rule is when A and B are two events in a probability experiment. The probability that either one of the events will occur is: P (A or B) = P (A) + P (B) – P (A and B). For example, if you take out a single card from a pack of cards, what is the probability that the card is either an ace or spade? Therefore, P(A) = 4/52, P (B) = 13/52, and P (A and B) = 1/52. P (A or B) = 4/52 + 13/52 – 1/52. P (A or B) = 4/13. Conditional Probability is the probability of one event (A) occurring with a relationship to another event (B). For example, in a sample of 40 vehicles, 18 are red, 6 are trucks, and 2 are both. Suppose that a randomly selected vehicle is red. What is the probability it is a truck? P(truck|red) = P (truck and red) / P (red). P (truck|red) = 2/40 = 18/40 = 2/18 = 1/9 or .11. So, if we must find the probability of an event which will occur given that another event has occurred, we will use conditional probability. If two events are mutually exclusive (no chance of things happening together) and you want to find the probability that an event A or B happens, we will use general addition rule.
"So we could use the general addition rule in the general election (in November elections) and use conditional probability in the primaries?"
In: Statistics and Probability