Friday, March 31, 2017

Probability of A or B


  •  if A and B ARE mutually exclusive then the events cannot occur at the same time
  • Then there is no intersection

  • Since they cannot both occur so in that case it's just P(A) + P(B)

  • For NON mutually exclusive events they can both occur at the same time
  • so we have an intersection of the events A and B, so we still have P(A) + P(B)  but now see if we add A and B we are also adding the intersected part, so really adding a part of A and a Part of B twice  so to just get A or B we have to remove that part, so subtract off P(A and B)

Monday, March 20, 2017

hypothesis test for proportions, things to remember

Here's a few things to remember

Z scores for proportion
(p^ - p)/square root(p*(1-p)/n)

Z for difference of two proportion
(p1^ - p2^)/square root(p-bar(1-p-bar)/n1 + (p-bar(1-p-bar)/n2))
p-bar = (x1 +x2)/(n1 + n2)

Note that p-bar might also be noted at p-pooled

For hypotheses, remember that Ho always contains = and Ha contains <, > or "does not equal"
Confidence intervals for single proportion

p^ +/- Z*square root(p^(1-p^)/n)

For difference of two propotions
p1^ - p2^ +/- Z*square root(p1^(1-p1^)/n1 + p2^(1-p2^)/n2)

Z values for confidence intervals
90% = 1.645
95% = 1.96
98% = 2.33
99% = 2.575

You can also get these from Z chart

P-values are the value from the Z chart for corresponding Z score if Ha contains < and 1- value from the Z chart for corresponding Z score if Ha contains >. If Ha is "does not equal" you take 1 - value from the Z chart for corresponding Z score then multiply the result by 2.
You can also get p-values from Z scores using the link below.


http://www.socscistatistics.com/pvalues/normaldistribution.aspx

Monday, March 6, 2017

Finding half life

Solving for the half life is easy.

Suppose A(t) = Ao*e^(-4t)

To find the half life, let A(t) = (1/2)Ao

(1/2)Ao = Ao*e^(-4t)

1/2 = e^(-4t)

ln (1/2) = ln(e^(-4t))

ln (1/2) = -4t

t = (-1/4)ln(1/2)


Monday, February 27, 2017

Bayes Theorem

Bayes Theorem
P(B/A)=P(A and B)/P(A) but from Bayes Theorem we have
P(B/A) = P(A/B)*P(B)/P(A)
in our problem let A = identify correctly and B = cat person
therefore A' = identify incorrectly and B' = dog person
P(A) = P(A/B)*P(B) + P(A/B')P(B')
Note the tree diagram in the written work.
The values used and obtained are as follows
P(B) = .33
P(B') = .67
P(A/B) = .96
P(A'/B) = .04
P(A/B') = .71
P(A'/B') = .29
P(A and B) = .33(.76) = .3168
P(A' and B) = .33(.04) = .0132
P(A and B') = .67(.71) = .4757
P(A' and B') = .67(.29) = .1943
Notice that all the joint probabilities add to 1
Now put those values into the formula and you'll get P(B/A) = .3997

Monday, February 20, 2017

Assumptions for hypothesis test with proportions

 First we must see if np >10 and n(1-p)> 10
Also the sampling method must be a simple random sample, with only two possible outcomes, p (success) and 1-p (failure). 
The sample must include at least 10 successes and 10 failures and the population size is at least 20 times larger than the sample size.

Wednesday, February 15, 2017

The sample data distribution tends to resemble the population distribution more closely than the sampling distribution. A random sample of data from a population should be representative of the population, and its distribution should be similar to the population distribution.
 Suppose that we draw all possible samples of size n from a given population and then get the mean, standard deviation, proportion or other statistic for each sample. The probability distribution of this statistic is called a sample distribution.
Now suppose we take all possible samples of a certain size from a population. Once we obtain the samples, we get the mean for each sample. This is called the sampling distribution of the sample mean.

Thursday, February 9, 2017

The price ceiling which is the highest the price can be is lower than the price equilibrium, so when the price is $5, you see the supply is 10 and the demand is 30. This means there is a higher demand than what is in supply, therefore there is a shortage of 20.
The price floor is the lowest the price can be and since it's still $5, the supply and demand is the same as in the first part. But since the price floor can be increased, there is no surplus or shortage, it can be moved to create equilibrium or surplus. Basically it isn't fixed, whereas with the price ceiling at $5, there is no way to rectify the situation of the shortage.

Thursday, February 2, 2017

1.The distance that one professional golfer can drive a golf ball has a normal distribution with a mean of 258 yards and a standard deviation of 6 yards. What proportion of his drives exceed 280 yards in length? How many yards should this golfer drive a ball so that the distance is among his longest 25%

(X > 280) , we need to get the Z score, which is Z =(x -mean)/standard deviation
Z = (280 - 258)/6
Z = 3.67
1-Z(3.67) ,.... approximately 0, less then .0001
Z for upper 25th percent is .67
Mean + Z*standard deviation
258 +.67(6) = 262.02

2.The average number of pounds of meat a person consumes a year is 212.3 pounds. Assume that the standard deviation is 20 pounds. If a sample of 50 individuals is selected, find the probability that the mean of the sample will be less than 210 pounds per year.
 mean = 212.3, standard deviation is 20
n = 50
P(x-bar < 210)
Z = (x-bar -mean)/(standard deviation/square root(n))
Z = (210 - 212.3)/(20/square root(50))
Z = -0.81
Z(-0.81) = .2090
answer is .2090
3. Suppose that a presidential candidate is favored by 51% of all eligible voters. What is the probability that in a random sample of 100 registered voters, less than 49% will favor that candidate?
p = .51
1-p = .49
Z = (p^ - p)/(sqrt(p(1-p)/n))
Z = (.49 - .51)/(sqrt(.51*.49)/100)
Z = -0.4
Z(-0.4) = .3446

Tuesday, January 24, 2017

When solving an SSA triangle, you could possible have 0,1 or 2 triangles

Suppose in triangle ABC, you know side a = 10, b = 16 and angle A is 30 degrees

By the law of sines, 

SinB/16 = Sin30/10

10*sinB = (1/2)!6

SinB = 0.8, therefore B = 53.1 degrees. But sine is also positive in the second quadrant, so there is a possible second triangle with B = 126.9 degrees. This can work because C would equal 23.1 degrees in this triangle and C = 96.9 in the first triangle

If angle A was 60 degrees and B came out to 53.1 or 126.9 then only 1 triangle exists since (126.9 + 60 = 186.9) angle C + angle A > 180.

If you try to solve for an angle an get Sin > 1 or < -1 then there are no solutions.

Friday, January 13, 2017

suppose we want a linear approximation for sin(0.3). Look at the function sinx, where x = 0.3 We want to pick a value for a to approximate x, a value for which we know the sin. We know sin0 = 0, so choose a = 0, which is close to x =0.3.

Now use the formula L(x) (linear approximation as function of x) = f(a) + f'(a)(x-a)

f(0) = 0
f'(x) = cosx, so f'(a) = f'(0) = 1

L(x) = 0 + 1(0.3 - 0)

       = 0 + 0.3

      =0.3

The value of sin(0.3) = .295. so the approximation is close.  Note that the value of x = 0.3 is in radians

Sunday, January 1, 2017

Roger's statement isn't exactly correct, as it doesn't make sense that a movie would make 3.8735 million dollars without any money put into the production of the movie. A movie cannot even be produced with money budgeted.
Looking at the definition of a linear equation of the regression line, y = a + bx or sometimes written as y = b0 +b1(x). The y-intercept is b0, which is the value when x is 0.
In this case by definition x being the budget and y being the revenue, yes with 0 dollars for budget, the revenue is 3.8735.
But we have to look at practicality with our conclusion. Like I mentioned above, this makes no sense in the context of the problem. So, we cannot make this conclusion. The y-intercept in this case is something we shouldn't even consider because you will never have a budget of 0 dollars.