The solubility product, Ksp, of Al(OH)3(s) is 1.0 x 10-33. What is its solubility (in g/L) in an aqueous solution of NaOH with a pH of 12.54 ? The temperature is 25oC.
In: Chemistry
In: Chemistry
Solid cobalt(II) carbonate is put into pure water and an equilibrium is established. The Ksp for CoCO3 is known to be 1.0 x 10-10. What is the concentration of CO32- ions in the equilibrium mixture of CoCO3?
In: Chemistry
What is the emf of a cell consisting of a Pb2+ / Pb half-cell and a Pt / H+ / H2 half-cell if [Pb2+] = 0.46 M, [H+] = 0.047 M and PH2 = 1.0 atm ?
____V
In: Chemistry
In: Chemistry
How much ice (in grams) would have to melt to lower the temperature of 354 mL of water from 26 ∘C to 6 ∘C? (Assume the density of water is 1.0 g/mL.)
In: Chemistry
1.0 mol of Cu(NO3)2 is dissolved in 1000 g of water. What is the molality of the solution for use in colligative property equations? The answers are 1, 2, 3, 4, or cannot be determined.
In: Chemistry
This Program is Written in PHYTON
In geomrety, the value of π can be estimated from an infinite
series of the form:
π / 4 = 1 - (1/3) + (1/5) - (1/7) + (1/9) - (1/11) + ...
However, there is another novel approach to calculate π. Imagine that you have a dartboard that is 2 units square. It inscribes a circle of unit radius. The center of the circle coincides with the center of the square. Now imagine that you throw darts at that dartboard randomly. Then the ratio of the number of darts that fall within the circle to the total number of darts thrown is the same as the ratio of the area of the circle to the area of the square dartboard. The area of a circle with unit radius is just π square unit. The area of the dartboard is 4 square units. The ratio of the area of the circle to the area of the square is π / 4.
To simulate the throwing of darts we will use a random number generator. The Random module has several random number generating functions that can be used. For example, the function uniform(a, b) returns a floating-point random number in the range an (inclusive) and b (exclusive).
Imagine that the square dart board has a coordinate system attached to it. The upper right corner has coordinates ( 1.0, 1.0) and the lower left corner has coordinates ( -1.0, -1.0 ). It has sides that are 2 units long and its center (as well as the center of the inscribed circle) is at the origin.
A random point inside the dart board can be specified by its x and y coordinates. These values are generated using the random number generator. The way we achieve that is:
xPos = random.uniform (-1.0, 1.0) yPos = random.uniform (-1.0, 1.0)
To determine if a point is inside the circle its distance from the center of the circle must be strictly less than the radius of the circle. The distance of a point with coordinates ( xPos, yPos ) from the center is math.hypot (xPos, yPos). The radius of the circle is 1 unit.
The program that you will be writing will be called CalculatePI. It will have the following structure:
import math import random def computePI ( numThrows ): ... def main (): ... main()
Your function main() will call the function computePI() for a given number of throws. The function computePI() will simulate the throw of a dart by generating random numbers for the x and y coordinates. You will determine if that randomly generated point is inside the circle or not. You will do this as many times as specified by the number of throws. You will keep a count of the number of times a dart lands within the circle. That count divided by the total number of throws is the ratio π/4. The function computePI() will then return the computed value of PI.
In your function main() you want to experiment and see if the accuracy of PI increases with the number of throws on the dartboard. You will compare your result with the value given by math.pi. The quantity Difference in the output is your calculated value of PI minus math.pi. Use the following number of throws to run your experiment - 100, 1000, 10,000, 100,000, 1,000,000, and 10,000,000. You will call the function computePI() with these numbers as input parameters. Your output will be similar to the following, i.e. the actual values of your Calculated PI and Difference will be different but close to the ones shown:
Computation of PI using Random Numbers num = 100 Calculated PI = 3.320000 Difference = +0.178407 num = 1000 Calculated PI = 3.080000 Difference = -0.061593 num = 10000 Calculated PI = 3.120400 Difference = -0.021193 num = 100000 Calculated PI = 3.144720 Difference = +0.003127 num = 1000000 Calculated PI = 3.142588 Difference = +0.000995 num = 10000000 Calculated PI = 3.141796 Difference = +0.000204 Difference = Calculated PI - math.pi
Your output MUST be in the above format. The number of throws must be left-justified. The calculated value of π and the difference must be expressed correctly to six places of decimal. There should be a plus or minus sign on the difference.
In: Computer Science
This Program is Written in PHYTON
In geomrety, the value of π can be estimated from an infinite
series of the form:
π / 4 = 1 - (1/3) + (1/5) - (1/7) + (1/9) - (1/11) + ...
However, there is another novel approach to calculate π. Imagine that you have a dartboard that is 2 units square. It inscribes a circle of unit radius. The center of the circle coincides with the center of the square. Now imagine that you throw darts at that dartboard randomly. Then the ratio of the number of darts that fall within the circle to the total number of darts thrown is the same as the ratio of the area of the circle to the area of the square dartboard. The area of a circle with unit radius is just π square unit. The area of the dartboard is 4 square units. The ratio of the area of the circle to the area of the square is π / 4.
To simulate the throwing of darts we will use a random number generator. The Random module has several random number generating functions that can be used. For example, the function uniform(a, b) returns a floating-point random number in the range an (inclusive) and b (exclusive).
Imagine that the square dart board has a coordinate system attached to it. The upper right corner has coordinates ( 1.0, 1.0) and the lower left corner has coordinates ( -1.0, -1.0 ). It has sides that are 2 units long and its center (as well as the center of the inscribed circle) is at the origin.
A random point inside the dart board can be specified by its x and y coordinates. These values are generated using the random number generator. The way we achieve that is:
xPos = random.uniform (-1.0, 1.0) yPos = random.uniform (-1.0, 1.0)
To determine if a point is inside the circle its distance from the center of the circle must be strictly less than the radius of the circle. The distance of a point with coordinates ( xPos, yPos ) from the center is math.hypot (xPos, yPos). The radius of the circle is 1 unit.
The program that you will be writing will be called CalculatePI. It will have the following structure:
import math import random def computePI ( numThrows ): ... def main (): ... main()
Your function main() will call the function computePI() for a given number of throws. The function computePI() will simulate the throw of a dart by generating random numbers for the x and y coordinates. You will determine if that randomly generated point is inside the circle or not. You will do this as many times as specified by the number of throws. You will keep a count of the number of times a dart lands within the circle. That count divided by the total number of throws is the ratio π/4. The function computePI() will then return the computed value of PI.
In your function main() you want to experiment and see if the accuracy of PI increases with the number of throws on the dartboard. You will compare your result with the value given by math.pi. The quantity Difference in the output is your calculated value of PI minus math.pi. Use the following number of throws to run your experiment - 100, 1000, 10,000, 100,000, 1,000,000, and 10,000,000. You will call the function computePI() with these numbers as input parameters. Your output will be similar to the following, i.e. the actual values of your Calculated PI and Difference will be different but close to the ones shown:
Computation of PI using Random Numbers num = 100 Calculated PI = 3.320000 Difference = +0.178407 num = 1000 Calculated PI = 3.080000 Difference = -0.061593 num = 10000 Calculated PI = 3.120400 Difference = -0.021193 num = 100000 Calculated PI = 3.144720 Difference = +0.003127 num = 1000000 Calculated PI = 3.142588 Difference = +0.000995 num = 10000000 Calculated PI = 3.141796 Difference = +0.000204 Difference = Calculated PI - math.pi
Your output MUST be in the above format. The number of throws must be left-justified. The calculated value of π and the difference must be expressed correctly to six places of decimal. There should be a plus or minus sign on the difference.
In: Computer Science
A survey of a sample of 26 hotels in New Orleans found that the
average hotel room rate s $88.42 with a standard deviation of $5.62
and another survey of 25 hotels in the Phoenix area found that the
average room rate is $80.61. Assume with a standard deviation of
$4.83. At α = 0.05, can it be concluded that there is a
significant difference in the rates?
Source: USA TODAY.
Make sure to state Ho, H1 and where the claim is
State the value of the test statistic
Calculate the p-value
Make a decision to reject Ho or fail to reject Ho
State your conclusion in words in the context of the claim
You may use your TI 84 but make sure to state the name of the test
you used.
When using calculator and when it comes to choose Yes or No for
pooled, keep it at the default No.
Here is what pooled means: If we assume that population variances
are equal we select YES and if we assume that population variances
are not equal, we select No. By default, use No unless if it is
specified otherwise.
In: Statistics and Probability