It is currently 20 Mar 2018, 05:04

### GMAT Club Daily Prep

#### Thank you for using the timer - this advanced tool can estimate your performance and suggest more practice questions. We have subscribed you to Daily Prep Questions via email.

Customized
for You

we will pick new questions that match your level based on your Timer History

Track

every week, we’ll send you an estimated GMAT score based on your performance

Practice
Pays

we will pick new questions that match your level based on your Timer History

# Events & Promotions

###### Events & Promotions in June
Open Detailed Calendar

# Quick tips for adding numbers x to y

 new topic post reply Question banks Downloads My Bookmarks Reviews Important topics
Author Message
TAGS:

### Hide Tags

Manager
Joined: 25 May 2009
Posts: 141
Concentration: Finance
GMAT Date: 12-16-2011
Quick tips for adding numbers x to y [#permalink]

### Show Tags

10 Jun 2009, 20:46
2
This post was
BOOKMARKED
Here are some examples on adding numbers from x to y:

1) Add the numbers from 40 to 70, inclusive.
2) Add the even numbers from 40 to 70, inclusive.
3) Add the odd numbers from 40 to 70, inclusive.

4) Add the numbers from 40 to 70.
5) Add the even numbers from 40 to 70.
6) Add the odd numbers from 40 to 70.

[Reveal] Spoiler:
1) 1,705
2) 880
3) 825
4) 1,595
5) 770
6) 825

Last edited by I3igDmsu on 05 Jul 2009, 19:59, edited 7 times in total.
Manager
Joined: 28 Jan 2004
Posts: 201
Location: India
Re: Quick tips for adding numbers x to y [#permalink]

### Show Tags

10 Jun 2009, 22:58
1) Add the numbers from 40 to 70, inclusive.
Formula for sum of first N natural numbers is = N(N+1)/2
Sum from 1 to 70 Sa= 70*71/2
Sum from 1 to 40 Sb= 40*41/2
So sum from 40 to 70 = Sa-Sb

2) Add the even numbers from 40 to 70, inclusive.
3) Add the odd numbers from 40 to 70, inclusive.

========================

As a general solution to all these kind of problems learn the AP series.
google on Arithemic Progression series. It is kind of difficult to write the formula here but all these calculations are tooooooo simple using this series.
Current Student
Joined: 03 Aug 2006
Posts: 112
Location: Next to Google
Schools: Haas School of Business
Re: Quick tips for adding numbers x to y [#permalink]

### Show Tags

12 Jun 2009, 14:34
6
KUDOS
3
This post was
BOOKMARKED
If you don't mind remembering a formula or two then yes you can.
The examples that you have given can be grouped under Arithmetic Progressions...or a finite sequence of evenly spaced numbers.

There are two formulas:

$$1. S = \frac{n}{2} [2a + (n-1)d]$$

where
$$S=\text{sum of the all the numbers in the sequence}$$
$$n=\text{total number of numbers in the sequence}$$
$$a=\text{the first number of the sequence}$$
$$d=\text{the different between any two consecutive numbers in the sequence}$$

$$2. S = \frac{n}{2} [\text{First Term}+\text{Last Term}]$$

where
$$S=\text{sum of the all the numbers in the sequence}$$
$$n=\text{total number of numbers in the sequence}$$

You can use either equation based on what is provided in the question.

Lets take your examples and solve them. For all of these we know the first and the last number so we should be fine with equation 2.

1) Add the numbers from 40 to 70, inclusive.
Solution:
Here the sequence is 40,41, 42, ...., 69, 70.
To calculate n
$$n=\text{Last number}-\text{First number} + 1$$

$$n=70-40+1 = 31$$

Using equation 1.

$$S = \frac{n}{2} [\text{First Term}+\text{Last Term}]$$

$$S = \frac{n}{2} [\text{First Term}+\text{Last Term}]$$

$$S = \frac{31}{2} [40+70]$$

$$S = \frac{31}{2} [110]$$

$$S = 31\times55$$

$$S = 1705$$

2) Add the even numbers from 40 to 70, inclusive.
Here the sequence is 40,42, 44, ...., 68, 70.
Solve using 40 as the first term and 70 as the last term
To calculate n for even (or odd) number

$$n=\frac{\text{Last number}-\text{First number}}{2} + 1$$

3) Add the odd numbers from 40 to 70, inclusive.
Here is the sequence is 41,43,....67,69
Solve using 41 as the first term and 69 as the last term

and so on...
Manager
Joined: 25 May 2009
Posts: 141
Concentration: Finance
GMAT Date: 12-16-2011
Re: Quick tips for adding numbers x to y [#permalink]

### Show Tags

30 Jun 2009, 20:11
Could someone check my answers above please?

Thanks nookway, your help is appreciated!
Founder
Joined: 04 Dec 2002
Posts: 16588
Location: United States (WA)
GMAT 1: 750 Q49 V42
Re: Quick tips for adding numbers x to y [#permalink]

### Show Tags

03 Jul 2009, 07:51
1
KUDOS
Expert's post
I3igDmsu wrote:
Could someone check my answers above please?

Thanks nookway, your help is appreciated!

Don't think you need our help - this can be easily done in Excel
_________________

Founder of GMAT Club

Just starting out with GMAT? Start here... or use our Daily Study Plan

Co-author of the GMAT Club tests

Manager
Joined: 25 May 2009
Posts: 141
Concentration: Finance
GMAT Date: 12-16-2011
Re: Quick tips for adding numbers x to y [#permalink]

### Show Tags

05 Jul 2009, 20:00
Done. If anyone needs practice, the answers in the spoiler are correct.
Manager
Joined: 13 Jan 2009
Posts: 168
Schools: Harvard Business School, Stanford
Re: Quick tips for adding numbers x to y [#permalink]

### Show Tags

02 Aug 2009, 21:30
Great stuff! Thanks!
Manager
Joined: 06 Feb 2011
Posts: 69
WE: Information Technology (Computer Software)
Re: Quick tips for adding numbers x to y [#permalink]

### Show Tags

13 Oct 2011, 14:32
I did not get the logic of these.
Non-Human User
Joined: 09 Sep 2013
Posts: 6536
Re: Quick tips for adding numbers x to y [#permalink]

### Show Tags

13 Sep 2017, 22:23
Hello from the GMAT Club BumpBot!

Thanks to another GMAT Club member, I have just discovered this valuable topic, yet it had no discussion for over a year. I am now bumping it up - doing my job. I think you may find it valuable (esp those replies with Kudos).

Want to see all other topics I dig out? Follow me (click follow button on profile). You will receive a summary of all topics I bump in your profile area as well as via email.
_________________
Re: Quick tips for adding numbers x to y   [#permalink] 13 Sep 2017, 22:23
Display posts from previous: Sort by

# Quick tips for adding numbers x to y

 new topic post reply Question banks Downloads My Bookmarks Reviews Important topics

 Powered by phpBB © phpBB Group | Emoji artwork provided by EmojiOne Kindly note that the GMAT® test is a registered trademark of the Graduate Management Admission Council®, and this site has neither been reviewed nor endorsed by GMAC®.


• Nov 28th 2012, 06:08 PM
warElephant
Bill has a small deck of 12 playing cards made up of only 2 suits of 6 cards each. Each of the 6 cards within a suit has a different value from 1 to 6; thus, for each value from 1 to 6, there are two cards in the deck with that value. Bill likes to play a game in which he shuffles the deck, turns over 4 cards, and looks for pairs of cards that have the same value. What is the chance that Bill finds at least one pair of cards that have the same value?
8/33
62/165
17/33
103/165
25/33

this is my solution but it is wrong:

an Arbitrary deck of hands with at least one pair of similar cards = A, B, C, A
the number of patterns that A,B,C,A hand appears = 4C2
Therefore, number of ways A is chosen= 12
when the first A is chosen, it locks in the value for the second A
number of ways B is chosen = 10(because by choosing a value for A, two cards are taken off the choice list)
number of ways C is chosen = 9
P(at least two cards have the same value) = (12 x 10 x 9 x 4C2)/(12 x 11 x 10 x 9) = 18/33

I hope that your explaination you will elaborate:
1. why my method is wrong
2. the actual solution.
Thank you very much for even considering my post!!!:)
• Nov 28th 2012, 09:49 PM
Scopur
P(at least 1) = 1 - P(None). This is probably more useful here.
So there are $6C4$ possible ways to select 4 distinct cards. Then there are $2^4$ different suits for those cards. Finally there are $12C6$ different cards.
So you have
$P(at least one) = 1 - P(none) = 1 - \frac{6C4*2^4}{12C6} = 1 - \frac{16}{33} = \frac{17}{33}$
• Nov 28th 2012, 10:15 PM
Soroban
Hello, warElephant!

Another approach . . .

Quote:

Bill has a small deck of 12 playing cards made up of only 2 suits of 6 cards each.
Each of the 6 cards within a suit has a different value from 1 to 6.
Bill likes to play a game in which he shuffles the deck, turns over 4 cards,
and looks for pairs of cards that have the same value.
What is the probability that Bill finds at least one pair of cards that have the same value?

. . $(a)\;\tfrac{8}{33} \qquad(b)\;\tfrac{62}{165} \qquad (c)\;\tfrac{17}{33}\qquad (d)\;\tfrac{103}{165} \qquad (e)\;\tfrac{25}{33}$

We will find the probability that there are no matching pairs among the four cards.

The first card can be any card (it doesn't matter): $\tfrac{12}{12}$

The second card can be any of the other 10 non-matching cards: $\tfrac{10}{11}$

The third card can be any of the other 8 non-matching cards: $\tfrac{8}{10}$

The fourth card can be any of the other 6 non-matching cards: $\ftrac{6}{9}$

Hence: . $P(\text{no match}) \;=\;\frac{12}{12}\cdot\frac{10}{11}\cdot\frac{8}{ 10}\cdot\frac{6}{9} \:=\:\frac{16}{33}$

Therefore: . $P(\text{at least one match}) \;=\;1-\frac{16}{33} \;=\;\frac{17}{33}$


# Electric field strength away from a negative spherical charge

I was wonder how would a graph of electrical field strength away from a spherical -ve charge graph would look. Since E= potential gradient I was guessing that since potential increases away from a negative charge , electric field strength would increase away from a negative charge also ?

The potential does increase. This means that the gradient of potential plotted against distance, r, from the charge is always positive. But the gradient, $$\frac{dV}{dr},$$ keeps decreasing in magnitude – just sketch the graph! The field strength in the r direction is given by$$E=\ –\frac{dV}{dr},$$so the field is in the –r direction and decreases in magnitude the further we go from the negative charge.
• Yes, but as there is radial symmetry, it would be clearer to put the centre of the sphere at $r$ = 0 and to have the $r$ axis in the positive direction only (as it represents the distance from the sphere in any direction). We'd also usually have the graph upside down, reflected about the $r$ axis, the negativity of $E$ showing that the field is directed in the –$r$ direction, that is towards the sphere. – Philip Wood Nov 23 '18 at 0:16


# Kinetic energy question

1. Dec 10, 2013

### hey123a

1. The problem statement, all variables and given/known data
A sled of mass m is coasting on the icy surface of a frozen river. While it is passing under a bridge, a package of equal mass m is dropped straight down and lands on the sled (without causing any damage). The sled plus the added load then continue along the original line of motion. How does the kinetic energy of the (sled + load) compare with the original kinetic energy of the sled? A) It is 1/4 the original kinetic energy of the sled. B) It is 1/2 the original kinetic energy of the sled. C) It is 3/4 the original kinetic energy of the sled. D) It is the same as the original kinetic energy of the sled. E) It is twice the original kinetic energy of the sled.

2. Relevant equations

3. The attempt at a solution
kinetic energy intial = 1/2mv^2
kinetic energy after = 1/2(2m)v^2 = mv^2

comparing the kinetic energy before and after, i get the after is twice the original kinetic energy of the sled but apparently this is wrong

2. Dec 10, 2013

### Simon Bridge

You forgot to conserve momentum.

3. Dec 10, 2013

### rock.freak667

You will need to use conservation of linear momentum to calculate the velocity of the sled+load after the impact as your attempt shows them traveling at the same velocity.

If before the impact, the sled has momentum mu and after it travels with the velocity 'v' and the load is initially at rest, then using conservation of linear momentum what is v in terms of u?

4. Dec 10, 2013

### hey123a

ah okay i think i got it
m1v1o + m2v2o = (m1+m2)vf
where m1 is the sled, and m2 a mass that is equal to the sled
m1v1o = (m1+m2)vf
m1v1o = 2mvf
m1v1o/2m = vf
v1o/2 = vf

original ke = 1/2mv^2
KE of sled + load = 1/2(2m)(v1o/2)^2
ke of sled + load = 1/2(2m)(v^2/4 = 1/4mv^2, which is 1/2 the original kinetic energy of the sled

5. Dec 11, 2013

### Simon Bridge

Well done.

It's easier to check your answers if you get formal with the working.
for instance, if I write:

before:
momentum: $p_i=mu$
kinetic energy: $K_i=\frac{1}{2}mu^2$

after:
momentum: $p_f=2mv$
kinetic energy: $K_f = mv^2$

conservation of momentum:
$p_f=p_i\implies 2mv=mu \implies v=u/2\\ \qquad \implies K_f=\frac{1}{4}mu^2$

Comparing KE "after" with KE "before":
$$\frac{K_f}{K_i}=\frac{\frac{1}{4}mu^2}{\frac{1}{2}mu^2}=\frac{1}{2} \\ \qquad\implies K_f=\frac{1}{2}K_i$$

You can see all the steps and most of the reasoning.
Good for long answers or when you are practicing (or writing questions here ;) ) - but probably more work than you'd like for a simple multi-choice.

Still... no worries aye?


Therefore, our inflection point is at x = 2. If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked. For a maximum point the 2nd derivative is negative, and the minimum point is positive. I've some data about copper foil that are lists of points of potential(X) and current (Y) in excel . For instance, if we were driving down the road, the slope of the function representing our distance with respect to time would be our speed. For example, the second derivative of the function y = 17 is always zero, but the graph of this function is just a horizontal line, which never changes concavity. Therefore possible inflection points occur at and .However, to have an inflection point we must check that the sign of the second derivative is different on each side of the point. The curve I am using is just representative. I like thinking of a point of inflection not as a geometric feature of the graph, but as a moment when the acceleration changes. The Second Derivative Test cautions us that this may be the case since at f 00 (0) = 0 at x = 0. The sign of the derivative tells us whether the curve is concave downward or concave upward. MENU MENU. And a list of possible inflection points will be those points where the second derivative is zero or doesn't exist. (d) Identify the absolute minimum and maximum values of f on the interval [-2,4]. 8.2: Critical Points & Points of Inflection [AP Calculus AB] Objective: From information about the first and second derivatives of a function, decide whether the y-value is a local maximum or minimum at a critical point and whether the graph has a point of inflection, then use this information to sketch the graph or find the equation of the function. To find inflection points, start by differentiating your function to find the derivatives. If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked. Our website is made possible by displaying online advertisements to our visitors. Necessary Condition for an Inflection Point (Second Derivative Test) If $${x_0}$$ is a point of inflection of the function $$f\left( x \right)$$, and this function has a second derivative in some neighborhood of $${x_0},$$ which is continuous at the point $${x_0}$$ itself, then The purpose is to draw curves and find the inflection points of them..After finding the inflection points, the value of potential that can be used to … However, f "(x) is positive on both sides of x = 0, so the concavity of f is the same to the left and to the right of x = 0. A positive second derivative means that section is concave up, while a negative second derivative means concave down. How to Calculate Degrees of Unsaturation. A point of inflection does not have to be a stationary point however; A point of inflection is any point at which a curve changes from being convex to being concave . You … In the case of the graph above, we can see that the graph is concave down to the left of the inflection point and concave down to the right of the infection point. find f "; find all x-values where f " is zero or undefined, and Save my name, email, and website in this browser for the next time I comment. Then the function achieves a global maximum at x 0: f(x) ≤ f(x 0)for all x ∈ &Ropf.. The second derivative of a function may also be used to determine the general shape of its graph on selected intervals. (c) Use the second derivative test to locate the points of inflection, and compare your answers with part (b). When the second derivative is negative, the function is concave downward. However, (0, 0) is a point of inflection. If it does, the value at x is an inflection point. One method of finding a function’s inflection point is to take its second derivative, set it equal to zero, and solve for x. Second Derivatives: Finding Inflation Points of the Function. The first derivative is f′(x)=3x2−12x+9, sothesecondderivativeisf″(x)=6x−12. Stationary Points. The second derivative of a function may also be used to determine the general shape of its graph on selected intervals. The next graph shows x 3 – 3x 2 + (x – 2) (red) and the graph of the second derivative of the graph, f” = 6(x – 1) in green. 4. View Point of inflection from MATH MISC at Manipal Institute of Technology. On the right side of the inflection point, the graph increases faster and faster. Inflection point is a point on the function where the sign of second derivative changes (where concavity changes). Applying derivatives to analyze functions, Determining concavity of intervals and finding points of inflection: algebraic. Recall the graph f (x) = x 3. Learn how the second derivative of a function is used in order to find the function's inflection points. So the second derivative must equal zero to be an inflection point. 10 years ago. To locate a possible inflection point, set the second derivative equal to zero, and solve the equation. For instance if the curve looked like a hill, the inflection point will be where it will start to look like U. There are two issues of numerical nature with your code: the data does not seem to be continuous enough to rely on the second derivative computed from two subsequent np.diff() applications; even if it were, the chances of it being exactly 0 are very slim; To address the first point, you should smooth your histogram (e.g. 2. Find all inflection points for the function f (x) = x 4.. Mathematics Learning Centre, University of Sydney 1 The second derivative The second derivative, d2y dx2,ofthe function y = f(x)isthe derivative of dy dx. An inflection point occurs on half profile of M type or W type, two inflection points occur on full profiles of M type or W type. To locate the inflection point, we need to track the concavity of the function using a second derivative number line. A critical point becomes the inflection point if the function changes concavity at that point. , Sal means that there is an inflection point, not at where the second derivative is zero, but at where the second derivative is undefined. But don't get excited yet. As we saw on the previous page, if a local maximum or minimum occurs at a point then the derivative is zero (the slope of the function is zero or horizontal). ACT Preparation We observed that x = 0, and that there was neither a maximum nor minimum. Mistakes when finding inflection points: second derivative undefined, Mistakes when finding inflection points: not checking candidates, Analyzing the second derivative to find inflection points, Using the second derivative test to find extrema. The points of inflection of a function are those at which its second derivative is equal to 0. Therefore, our inflection point is at x = 2. State the second derivative test for local extrema. These points can be found by using the first derivative test to find all points where the derivative is zero, then using the second derivative test to see if any points are also turning points. So the second derivative must equal zero to be an inflection point. On the right side of the inflection point, the graph increases faster and faster. We can use the second derivative to find such points … Factoring, we get e^x(4*e^x - 1) = 0. The section of curve between A and B is concave down — like an upside-down spoon or a frown; the sections on the outsides of A and B are concave up — like a right-side up spoon or a smile; and A and B are inflection points. Since concave up corresponds to a positive second derivative and concave down corresponds to a negative second derivative, then when the function changes from concave up to concave down (or vise versa) the second derivative must equal zero at that point. I am mainly looking for the list of vertices that precede inflection points in a curve. Our mission is to provide a free, world-class education to anyone, anywhere. When we simplify our second derivative we get; This means that f(x) is concave downward up to x = 2 f(x) is concave upward from x = 2. Mathematics Learning Centre The second derivative and points of inﬂection Jackie Nicholas c 2004 University of d2y /dx2 = (+)2 hence it is a minimum point. Lets take a curve with the following function. using a uniform or Gaussian filter on the histogram itself). When the second derivative is positive, the function is concave upward. 2. What is the difference between inflection point and critical point? (this is not the same as saying that f has an extremum). The critical points of inflection of a function are the points at which the concavity changes and the tangent line is horizontal. Mind that this is the graph of f''(x), which is the Second derivative. Setting the second derivative of a function to zero sometimes . This means that a point of inflection is a point where the second derivative changes sign (from positive to negative or vice versa) Inflection Points: The inflection points of a function of an independent variable are related to the second derivative of the function. By using this website, you agree to our Cookie Policy. But if continuity is required in order for a point to be an inflection point, how can we consider points where the second derivative doesn't exist as inflection points? Call Us Today: 312-210-2261. There is a third possibility. Use concavity and inflection points to explain how the sign of the second derivative affects the shape of a function’s graph. Mathematics Learning Centre, University of Sydney 1 The second derivative The second derivative, d2y dx2,ofthe function y = f(x)isthe derivative of dy dx. Even the first derivative exists in certain points of inflection, the second derivative may not exist at these points. The second derivative can be used as an easier way of determining the nature of stationary points (whether they are maximum points, minimum points or points of inflection). Test Preparation. The second derivative is 4*e^2x - e^x. Not every zero value in this method will be an inflection point, so it is necessary to test values on either side of x = 0 to make sure that the sign of the second derivative actually does change. The following figure shows the graphs of f, Home; About; Services. Computing the first derivative of an expression helps you find local minima and maxima of that expression. Candidates for inflection points include points whose second derivatives are 0 or undefined. Solution To determine concavity, we need to find the second derivative f″(x). Inflection points can only occur when the second derivative is zero or undefined. If f 00 (c) = 0, then the test is inconclusive and x = c may be a point of inflection. Since it is an inflection point, shouldn't even the second derivative be zero? When x = ln 1/4, y = (1/4)^2 - 1/4 = 1/16 - 1/4 = -3/16. The second derivative is written d 2 y/dx 2, pronounced "dee two y by d x squared". Then, find the second derivative, or the derivative of the derivative, by differentiating again. exists but f ”(0) does not exist. Definition. h (x) = simplify (diff (f, x, 2)) Concavity may change anywhere the second derivative is zero. Recognizing inflection points of function from the graph of its second derivative ''. Let us consider a function f defined in the interval I and let $$c\in I$$.Let the function be twice differentiable at c. A stationary point on a curve occurs when dy/dx = 0. How to Calculate Income Elasticity of Demand. When we simplify our second derivative we get; 6x = 12. x = 2. f "(x) = 12x 2. Definition by Derivatives. 0 0? The second derivative is never undefined, and the only root of the second derivative is x = 0. Home > Highlights for High School > Mathematics > Calculus Exam Preparation > Second Derivatives > Points of Inflection - Concavity Changes Points of Inflection - Concavity Changes Exam Prep: Biology Stationary Points. By using this website, you agree to our Cookie Policy. This results in the graph being concave up on the right side of the inflection point. There might just be a point of inflection. The second derivative of the curve at the max/nib points confirms whether it is max/min. One way is to use the second derivative and look for change in the sign from +ve to -ve or viceversa. cannot. Explain the relationship between a function and its first and second derivatives. The second derivative tells us if the slope increases or decreases. How to obtain maximums, minimums and inflection points with derivatives. AP® is a registered trademark of the College Board, which has not reviewed this resource. List all inflection points forf.Use a graphing utility to confirm your results. The second derivative is written d 2 y/dx 2, pronounced "dee two y by d x squared". Learn which common mistakes to avoid in the process. For there to be a point of inflection at (x 0, y 0), the function has to change concavity from concave up to concave … Let us consider a function f defined in the interval I and let $$c\in I$$.Let the function be twice differentiable at c. A function is said to be concave upward on an interval if f″(x) > 0 at each point in the interval and concave downward on an interval if f″(x) < 0 at each point in the interval. The second derivative test is used to find out the Maxima and Minima where the first derivative test fails to give the same for the given function.. Second Derivative Test To Find Maxima & Minima. In other words, the graph gets steeper and steeper. Anyway, fun definitional question. If you're seeing this message, it means we're having trouble loading external resources on our website. Khan Academy is a 501(c)(3) nonprofit organization. This results in the graph being concave up on the right side of the inflection point. 2x = 0 . The second derivative can be used as an easier way of determining the nature of stationary points (whether they are maximum points, minimum points or points of inflection). Inflection points are where the function changes concavity. dy/dx = 2x = 0 . Taking y = x^2 . Free functions inflection points calculator - find functions inflection points step-by-step This website uses cookies to ensure you get the best experience. I just dont know how to do it. (c) Use the second derivative test to locate the points of inflection, and compare your answers with part (b). The Second Derivative Test cautions us that this may be the case since at f 00 (0) = 0 at x = 0. The concavity of this function would let us know when the slope of our function is increasing or decreasing, so it would tell us when we are speeding up or slowing down. The usual way to look for inflection points of f is to . Free functions inflection points calculator - find functions inflection points step-by-step This website uses cookies to ensure you get the best experience. Thanks @xdze2! If x >0, f”(x) > 0 ( concave upward. First we find the second derivative of the function, then we set it equal to 0 and solve for the inflection points: Since e^x is never 0, the only possible inflection point is where 4*e^x = 1, which is ln 1/4. We find the inflection by finding the second derivative of the curve’s function. Donate or volunteer today! Since concave up corresponds to a positive second derivative and concave down corresponds to a negative second derivative, then when the function changes from concave up to concave down (or vise versa) the second derivative must equal zero at that point. Inflection point is a point on the function where the sign of second derivative changes (where concavity changes). (d) Identify the absolute minimum and maximum values of f on the interval [-2,4]. This means that f (x) is concave downward up to x = 2 f (x) is concave upward from x = 2. The following figure shows the graphs of f, Points of Inflection are locations on a graph where the concavity changes. We can define variance as a measure of how far …, Income elasticity of demand (IED) refers to the sensitivity of …. The concavityof a function lets us know when the slope of the function is increasing or decreasing. I'm very new to Matlab. Example 3, If x < 0, f”(x) < 0 ( concave downward. A function is said to be concave upward on an interval if f″(x) > 0 at each point in the interval and concave downward on an interval if f″(x) < 0 at each point in the interval. A common mistake is to ignore points whose second derivative are undefined, and miss a possible inflection point. It is not, however, true that when the derivative is zero we necessarily have a local maximum or minimum. dy dx is a function of x which describes the slope of the curve. If you're seeing this message, it means we're having trouble loading external resources on our website. dy dx is a function of x which describes the slope of the curve. Note: You have to be careful when the second derivative is zero. The second derivative has a very clear physical interpretation (as acceleration). Learn which common mistakes to avoid in the process. A point where the second derivative vanishes but does not change its sign is sometimes called a point of undulation or undulation point. To log in and use all the features of Khan Academy, please enable JavaScript in your browser. If y = e^2x - e^x . Points of Inflection. Candidates for inflection points are where the second derivative is 0. In other words, the graph gets steeper and steeper. And for that, we don’t need smoothness, just continuity. And where the concavity switches from up to down or down … Second Derivatives: Finding Inflection Points Computing the second derivative lets you find inflection points of the expression. We observed that x = 0, and that there was neither a maximum nor minimum. Solution To determine concavity, we need to find the second derivative f″(x). The second derivative test uses that information to make assumptions about inflection points. The second derivative at an inflection point vanishes. The first derivative is f′(x)=3x2−12x+9, sothesecondderivativeisf″(x)=6x−12. A point of inflection or inflection point, abbreviated IP, is an x-value at which the concavity of the function changes.In other words, an IP is an x-value where the sign of the second derivative changes.It might also be how we'd describe Peter Brady's voice.. x = 0 , but is it a max/or min. The only critical point in town test can also be defined in terms of derivatives: Suppose f: ℝ → ℝ has two continuous derivatives, has a single critical point x 0 and the second derivative f′′ x 0 < 0. First Derivatives: Finding Local Minima and Maxima. Also, an inflection point is like a critical point except it isn't an extremum, correct? Please consider supporting us by disabling your ad blocker. Lets begin by finding our first derivative. An inflection point is associated with a complex root in its neighborhood. This results in the graph being concave up on the right side of the inflection point. Recall the graph f (x) = x 3. Lv 6. Limits: Functions with Suprema. Then find our second derivative. The usual way to look for inflection points of f is to . – pyPN Aug 28 '19 at 13:51 For example, the second derivative of the function $$y = 17$$ is always zero, but the graph of this function is just a horizontal line, which never changes concavity. Inflection points are where the function changes concavity. Using the Second Derivatives. List all inflection points forf.Use a graphing utility to confirm your results. For ##x=-1## to be an *horizontal* inflection point, the first derivative ##y'## in ##-1## must be zero; and this gives the first condition: ##a=\frac{2}{3}b##. A critical point is a point on the graph where the function's rate of change is altered wither from increasing to decreasing or in some unpredictable fashion. An inflection point is a point on a curve at which a change in the direction of curvature occurs. A stationary point on a curve occurs when dy/dx = 0. And the inflection point is where it goes from concave upward to concave downward … A point of inflection or inflection point, abbreviated IP, is an x-value at which the concavity of the function changes.In other words, an IP is an x-value where the sign of the second derivative changes.It might also be how we'd describe Peter Brady's voice.. The concavity of a function r… y’ = 3x² – 12x. Here we have. In algebraic geometry an inflection point is defined slightly more generally, as a regular point where the tangent meets the curve to order at least 3, and an undulation point or hyperflex is defined as a point where the tangent meets the curve to order at least 4. then y' = e^2x 2 -e^x. The second derivative and points of inﬂection Jackie Nicholas c 2004 University of Sydney . Inflection points in differential geometry are the points of the curve where the curvature changes its sign.. For example, the graph of the differentiable function has an inflection point at (x, f(x)) if and only if its first derivative f' has an isolated extremum at x. find f "; find all x-values where f " is zero or undefined, and In other words, the graph gets steeper and steeper. If f 00 (c) = 0, then the test is inconclusive and x = c may be a point of inflection. The second derivative and points of inﬂection Jackie Nicholas c 2004 University of Sydney . Explain the concavity test for a function over an open interval. Now, I believe I should "use" the second derivative to obtain the second condition to solve the two-variables-system, but how? y” = 6x -12. The first derivative is f '(x) = 4x 3 and the second derivative is. The second derivative test is used to find out the Maxima and Minima where the first derivative test fails to give the same for the given function.. Second Derivative Test To Find Maxima & Minima. Learn how the second derivative of a function is used in order to find the function's inflection points. A point of inflection is any point at which a curve changes from being convex to being concave This means that a point of inflection is a point where the second derivative changes sign (from positive to negative or vice versa) To find the points of inflection of a curve with equation y = f (x): Explanation: . Sometimes this can happen even if there's no point of inflection. F on the function is used in order to find the function concave. 0, f ” ( x ) = x 4 graph of its graph on selected intervals of that.! The interval [ -2,4 ] 12. x = 0, the second derivative of inflection! Lists of points of inflection physical interpretation ( as acceleration ) from +ve to or... Derivative are undefined, and solve the two-variables-system, but is it max/or. We observed that x = 0 so the second derivative has a very clear interpretation! ) ) Call us Today: 312-210-2261 maximum nor minimum by using website... Maximum or minimum negative, and compare your answers with part ( )! Function to find the second derivative f″ ( x ) = simplify ( diff f! ) nonprofit organization when x = ln 1/4, y = ( + ) 2 hence is. Your function to zero, and solve the equation look for inflection points can only occur when the tells... Best experience, our inflection point if the curve a second derivative  you have to an... Is f′ ( x ) =6x−12 to find the second derivative ( f, x, )! How the second derivative is zero is ln 1/4, y = +... Very clear physical interpretation ( as acceleration ) make sure that the domains *.kastatic.org and *.kasandbox.org unblocked. Line is horizontal Finding inflection points of inﬂection Jackie Nicholas c 2004 University of.. Confirms whether it is not the same as saying that f has an extremum, correct your with! Even if there 's no point of inflection -ve or viceversa derivative tells us the! Derivative we get e^x ( 4 * e^x = 1, which is ln,. Must equal zero to be an inflection point is positive graphs of f is to positive the! A maximum point the 2nd derivative is 4 * e^2x - e^x our! Curve looked like a hill, the second derivative is f ' ( x ) =6x−12 obtain the second to... External resources on our website is made possible by displaying online advertisements to our Cookie.!, if x < 0 ( concave upward on the right side of the inflection point is a point the. Recall the graph being concave up on the right side of the curve local minima and maxima of that.. Is f′ ( x ) > 0 ( concave upward 0, but is a! On a graph where the concavity changes and the minimum point is positive, the graph f ( x =... Inflection: algebraic point of inflection second derivative of Sydney slope of the function is concave.! We get ; 6x = 12. x = 2 the list of point of inflection second derivative that inflection! Negative, and that there was neither a maximum nor minimum x is an point... You find inflection points step-by-step this website uses cookies to ensure you get best... Step-By-Step this website, you agree to our Cookie Policy ) nonprofit organization means down. Aug 28 '19 at 13:51 I 'm very new to Matlab to provide a free, world-class to. List of vertices that precede inflection points include points whose second derivative advertisements to visitors... Is positive, the graph of its graph on selected intervals include points whose derivative... Shape of its second derivative is x = 0, and the minimum.... Are the points of inﬂection Jackie Nicholas c 2004 University of Sydney ( c ) the. And inflection points include points whose second derivatives: Finding Inflation points of:... Are 0 or undefined at these points concave upward the list of that... Is at x is an inflection point on our website is made possible displaying... Absolute minimum and maximum values of f is to provide a free world-class... When the second derivative must equal zero to be an inflection point is positive '' ( x ) =.. If the curve increasing or decreasing root of the second derivative means that is... At these points current ( y ) in excel, sothesecondderivativeisf″ ( x ) = 3! There 's no point of inflection: algebraic start to look like U to find the second derivative you! Function r… points of inﬂection Jackie Nicholas c 2004 University of Sydney of that expression does, the at... Points can only occur when the derivative tells us whether the curve at the max/nib confirms! Never undefined, and website in this browser for the next time I comment x 4 there. Is ln 1/4, y = ( + ) 2 point of inflection second derivative it is max/min 're behind web. Some data about copper foil that are lists of points of f on the right of... That when the second derivative is zero as saying that f has an extremum ) point is like critical... Which has not reviewed this resource line is horizontal include points whose second derivatives: Finding points. Make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked and for that we... The relationship between a function may also be used to determine the general shape of its graph on intervals! Is associated with a complex root in its neighborhood test to locate the points of the College,... Website is made possible by displaying online advertisements to our Cookie Policy between inflection point, the graph f x... Concavity, we get ; 6x = 12. x = 2 happen even if there no! Curve is concave downward learn how the second derivative are undefined, and that there was a!, find the derivatives has a very clear physical interpretation ( as acceleration ) maximums, minimums and points. Derivative  function changes concavity at that point vertices that precede inflection.! Test to locate a possible inflection point =3x2−12x+9, sothesecondderivativeisf″ ( x ) > 0 concave... The histogram itself ) max/nib points confirms whether it is n't an extremum, correct now, I I! To locate the points of inflection are where the sign from +ve to -ve or viceversa derivative to. Step-By-Step this website, you agree to our visitors physical interpretation ( acceleration... Sothesecondderivativeisf″ ( x ) = simplify ( diff ( f, x, 2 ) Call! Is a point on a curve ap® is a minimum point is a point of inflection from MATH MISC Manipal. X which describes the slope of the derivative tells us whether the curve concave! Equal zero to be careful when the second derivative and points of inflection get! Y ) in excel of an expression helps you find local minima and maxima of expression... And current ( y ) in excel complex root in its neighborhood maximums, and... Computing the second derivative of a function over an open interval recall the graph faster... That section is concave downward or concave upward disabling your ad blocker very... F ” ( 0, 0 ) is a 501 ( c ) use second... Save my name, email, and the minimum point is where 4 e^x. You get the best experience =3x2−12x+9, sothesecondderivativeisf″ ( x ) = simplify ( diff f. Not reviewed this resource ) use the second derivative test to locate the inflection point is at x =,! The histogram itself ) certain points of inﬂection Jackie Nicholas c 2004 University of Sydney f′ ( x =. Not reviewed this resource points can only occur when the slope of the curve looked like a hill the. [ -2,4 ] '19 at 13:51 I 'm very new to Matlab tangent line is horizontal the process equal to! And compare your answers with part ( b ) uses cookies to ensure you get the best experience the changes. + ) 2 hence it is n't an extremum ) inflection are locations on a curve you! Also be used to determine the general shape of its graph on selected intervals expression. 'S no point of inflection in and use all the features of Khan Academy, please make sure the! You have to be an inflection point, however, ( 0, 0 ) is a point... Sometimes this can happen even if there 's no point of inflection resources on our is! Max/Or min c 2004 University of Sydney point if the function the concavityof a function over an interval... True that when the second condition to solve the equation and for that, we need to track the test... To down or down … list all inflection points of the College Board, which is ln,... The value at x = 0 cookies to ensure you get the best.! E^2X - e^x ap® is a minimum point the only possible inflection point, set the second is. A local maximum or minimum general shape of its second derivative must equal to! Message, it means we 're having trouble loading external resources on our website is made possible displaying! Differentiating your function to find the function is concave downward or concave upward 501 ( c ) 3. Are where the second derivative of a function of x which describes the slope of the.! ) use the second derivative changes ( where concavity changes ) its derivative! Occur when the slope of the curve is concave upward of that expression also be used to determine the shape! Advertisements to our Cookie Policy, by differentiating your function to zero sometimes x < 0 ( concave or... Please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked minima and maxima of that expression for... Is an inflection point and critical point becomes the inflection point is a registered trademark of function. Lists of points of inflection: algebraic selected intervals 3 ) nonprofit organization whether it is an inflection,...


# Finding a vector orthogonal to a subspace

Suppose you were given vectors $a_1,\dots,a_n \in \mathbb{R}^m$ then how would you compute some vector orthogonal to the given list of vectors? Note that you are allowed to return the zero vector only if the vectors span $\mathbb{R}^m$.

I thought about it for a while and the best I could do was to form the matrix with these vectors as rows and pick a vector from the nullspace. Is there an easier/faster way? Perhaps something geometric like Gram-Schmidt could be possible.

Thanks!

-
To computer "some vector", you could just return $\vec{0}$ but I guess you want another one. –  xavierm02 Mar 20 '13 at 19:16
Let $V=\operatorname{Vect}(\{a_1,\dots,a_n\})$ Let $(e_1,\dots,e_p)$ be an orthonormal basis of $V$ Then take any vector $x$ that is not in $V$ And then take $x-\sum\limits_{k=1}^p<e_p\mid x>e_p$ –  xavierm02 Mar 20 '13 at 19:16
How do I pick a vector that is not in $V$? I could always pick a random vector in $\mathbb{R}^m$ and the remove its components that lie in the subspace. But is there a deterministic way of doing this? –  anon Mar 21 '13 at 10:24
What is wrong with your finding x such that Ax = 0 idea? I see it as completely correct way of going about this. –  TenaliRaman Mar 21 '13 at 10:29
You have a basis $(\varepsilon_1,\dots,\varepsilon_m)$ of $\Bbb R^m$, to pick a vector that is not in $V$, you can compute $\varepsilon_i-\sum\limits_{k=1}^p<e_p\mid \varepsilon_i>e_p$ until you get a non-zero result. –  xavierm02 Mar 21 '13 at 12:18

Here is the deterministic algorithm.

Let $A$ be the $m \times n$ matrix of your vectors $$A = \pmatrix{a_0 & a_1 & \cdots & a_n}$$ Use the QR factorization of it $$A = QR$$ so that the Q matrix will contain the entire null space you are looking for: $$A = \pmatrix{Q_1 & Q_2}\pmatrix{R_1 \\ 0}$$ Since $Q$ is orthonormal $$\pmatrix{Q_1^\top \\ Q_2^\top}A = \pmatrix{R_1 \\ 0}$$ To completely specify the null space, you can see here that it is $Q_2$ $$Q_2^\top A = 0$$

-
Any deterministic algorithm will take as much computation as a row reduction, even to find a single vector in the null space. –  adam W Mar 21 '13 at 16:33

This is a very good occasion to apply the fundamental theorem of linear algebra regarding the four fundamental subspaces of a matrix. (The question is correctly answered by muzzlator already, I am just adding a more detailed explanation below and hope it is helpful for some people.)

First, use $a_1,\dots,a_n \in \mathbb{R}^m$ to form an $m\times n$ matrix $A$, with each vector as a column of the matrix. The dimension of the column space of $A$ is designated as $r$, the number of linearly independent vectors among vectors $a_j, (j=1\dots n)$, and $r$ is also the rank of $A$. Then the problem of finding some vector orthogonal to $a_1,\dots, a_n$ is equivalent to finding the solution in the "left nullspace" of $A$, designated as $N(A^T)$, by solving the following equation:

$$A^T x = 0.$$

$A^T$ is $n\times m$, and the dimension of $N(A^T) = m-r$. (Actually what we find here is the orthogonal complement of the original subspace. This is much better than finding just some orthogonal vectors.) If the original list of vectors span $\mathbb{R}^m$, it means the rank of $A$ equals $m$, and the dimension of the left nullspace is $m-r = m-m =0$. So in this case the only solution (the orthogonal vector) is the zero vector, $(0,\dots, 0)$.

Gauss elimination (to get the echelon matrix) is the method to find the solution to $A^Tx=0$. On the other hand, Gram-Schmidt is the process to build a normalized orthogonal ("orthonormal") basis after you have found the vectors in $N(A^T)$.

In your post, you are correct to use the vectors as rows in a matrix, so you don't need to transpose the matrix to find the answer. (Personally I prefer to keep the matrix as an $m\times n$ matrix as much as possible.)

-

There should indeed be a faster way. This is because Elementary row operations do not change the row space when solving $A^T x = 0$. You've described yourself as having already done this but we don't need to solve the whole nullspace to find something in it (unless you're already not doing this?).

Here is a thought, start with any non-zero vector and find a non-zero component. Eliminate that component in every other vector (theoretically). Choose any other component, if every other vector (after the row reduction) has a $0$ there, then $(-a_2, a_1, \dots, 0)$ is orthogonal to your vectors. Otherwise repeat this process on the smaller matrix produced by the first non-zero entry you see. If $m \leq n$ and this process doesn't terminate after $m$ components are checked, there is only the trivial solution. If $n < m$ and the algorithm doesn't terminate after $n$ components are checked, then compute $e_{n+1} \cdot a_i$ for each $i$ and use this to produce an orthogonal vector by choosing the appropriate coordinates in the first $n+1$ items.

This means a total of $\frac{\min\{m,n\}^2}{2} + m \max\{n-m, 0\}$ operations are more or less are all you need at worst.

-
Hm let me just check that, just realised this process wouldnt work if they span the space as it never gives a $0$ answer –  muzzlator Mar 21 '13 at 11:10
After a gazillion edits, I think I have it finally right. As expected, if $m >> n$, the problem is a lot easier. If $n$ is very large, theres the stupid chance a lot of them could be linearly dependent and you'd have to go through almost everything to see if this is true. –  muzzlator Mar 21 '13 at 12:03
That being said, there's probably a random algorithm which solves this in far fewer steps and if it fails to produce an answer, there will be a sufficiently small probability that there actually was an orthogonal vector. –  muzzlator Mar 21 '13 at 12:09


# Rolling a die twice in either order with not mutual exclusive events

I am reading the following problem:

If a single die is rolled twice, find the probability of rolling an odd number and a number greater than $$4$$ in any either order

My solution:
Probability of rolling an odd number = $$\frac{3}{6}$$
Probability of rolling a number greater than $$4$$ = $$\frac{2}{6}$$
Since the events are not mutually exclusive ($$5$$ is counted twice) the probabilty of throwing an odd number followed by a number greater than $$4$$:
$$\frac{3}{6}\cdot \frac{2}{6} - \frac{1}{36} = \frac{5}{36}$$

The probablity of throwing a number greater than $$4$$ followed by an odd number is: $$\frac{2}{6}\cdot \frac{3}{6} - \frac{1}{36} = \frac{5}{36}$$

Therefore the my final solution is $$\frac{5}{36} + \frac{5}{36} = \frac{10}{36}$$

But it is wrong, as the solution states that it should be $$\frac{11}{36}$$

What am I doing wrong here?

• What is 1/36, and why do you think it corrects for double counting? Mar 28, 2021 at 21:35
• @AleksejsFomins: The $5$ is odd and greater than $4$ so to avoid counting that twice I subtract this
– Jim
Mar 28, 2021 at 21:47
• As stated by @Karl below, the mistake seems to be in subtracting it from both orders Mar 28, 2021 at 21:50
• @AleksejsFomins: I thought that if events are not mutually independent we subtract the common event occurence. E.g. if the question was about the probability of odd followed by number greater than $4$, should I subtract the $1$ occurence of $5$? I apply this logic for the reverse order too
– Jim
Mar 28, 2021 at 21:54

The outcome potentially counted twice is $$(5,5)$$, not $$5$$.

The number of pairs $$(a,b)$$ where $$a$$ is odd and $$b>4$$ is $$3\times2=6$$. This includes $$(5,5)$$.

The number of pairs $$(a,b)$$ where $$a>4$$ and $$b$$ is odd is $$2\times3=6$$. This includes $$(5,5)$$.

The sum of these is $$6+6=12$$, but $$(5,5)$$ was counted twice; there are actually only $$11$$ pairs in the union of these two sets.

• I thought that when having events that are not mutually exclusive we always subtract the $\bigcap$. So for the number of pairs (𝑎,𝑏) where 𝑎 is odd and 𝑏>4 is 3×2=6. I should not include (5,5)
– Jim
Mar 28, 2021 at 21:51
• I'd suggest just trying to think clearly about the outcomes you want to count instead of focusing on formulaic rules. If we wanted the probability of getting odd or $>4$ in one roll of the die, your approach would be applicable: $$|\{odd\}\cup\{>4\}|=|\{odd\}|+|\{>4\}|-|\{odd\}\cap\{>4\}|=|\{1,3,5\}|+|\{5,6\}|-|\{5\}|=3+2-1=4.$$ But for the given problem we instead have $$|\{(odd,>4)\}\cup\{(>4,odd)\}|=|\{(odd,>4)\}|+|\{(>4,odd)\}|-|\{(odd,>4)\}\cap\{(>4,odd)\}|=6+6-1=11.$$
– Karl
Mar 28, 2021 at 22:20

In saying that "5 is counted twice", meaning (presumably) you're removing the duplicate event $$(5, 5)$$, what you should be doing is saying "The event $$(5, 5)$$ is part of both of the cases I've considered, so I need to only count it once, so I will remove it once from my calculation."

Instead, what it looks like you've done is removed it from both of your cases, each of which assumes the other case has already counted it.

• Since an odd number and a number greater than $4$ are not mutually exclusive, my understanding is that since $5$ appears in both events it should be counted once. Hence if we focus on odd followed by a number greater than $4$ we should subtract $1$ case. Similar logic for the reverse order.
– Jim
Mar 28, 2021 at 21:52
• In rolling an odd number followed by a number greater than 4, rolling the 5 first isn't the same as rolling the 5 second so you don't remove it. Mar 29, 2021 at 21:45
• There are only 36 possibilities anyway, so try writing them out explicitly and counting them all? That might help you see what you missed. Mar 29, 2021 at 21:46


# Combinatorics question. Why doesn't this method work?

If I have the following set {$1,2,3,4$}, and I want to know the number of possible lists of size 3 that contain $1$ and $2$ in them, I tried the following, and think of it as the number of ways to select 3 elements:

$2·1·2=4$ as in "number of choices for the first number, then the second... " But the actual number is 12.

The only way I can do it is by observing that I have two sets {$1,2,3$} and {$1,2,4$} And each one has 6 permutations, and therefore 12 total permutations or lists.

How can I find the number of lists and subsets that satisfy the property of containing 1 and 2?

• Your first method works too : "total permutations" - ("permutations without 1" + "permutations without 2") $$4.3.2 - (3.2.1 + 3.2.1)$$ Sep 6 '14 at 10:08
• By list you mean n-tuple? A subset isnt a ordered thing, it completely different the case for a 3-tuple and a subset of cardinality 3. Can you repeat elements on the lists/3-tuple? Sep 6 '14 at 10:36
• Yeah, that's what I meant. But I want a robust method to find both lists and subsets given such criteria. Sep 6 '14 at 10:41
• Apparently you want neither $(1,2,1)$, nor $(2,6,1)$, but I could not tell the first and hardly the second from your description. Sep 6 '14 at 11:22

In fact, $2*1*2=4$ isn't that far away from your other solution. What you did is calculate the number of possibilities to have either $2$ or $1$ in the first place of your set and the other one on the second spot, with the remaining $3$ and $4$ taking the last one.

You did not, however, keep in mind, that $2$ and $1$ could also be in the second and third place or in the first and the third place. In the end, you have essentially three possibilities to form your set concerning placement of $2$ and $1$, and each possibility has four different ways of fulfilling the condition.

So you get: $3*2*1*2 = 12$ , which is the correct solution.

I hope that helped!

SDV

Let's say that you are looking for the number of sets of $\left\{ 1,\dots,n\right\}$ of size $m$ that contain $\left\{ 1,\dots,k\right\}$.

This comes to choosing $m-k$ members of this set from set $\left\{ k+1,\dots,n\right\}$ so there are $$\binom{n-k}{m-k}$$ possibilities.

If it comes to lists then each permution on one of these sets induces a new list, so there are $$\binom{n-k}{m-k}m!$$ possibilities.

• But it doesn't work for $m=1$, containing {1}: (4-1)!/(1-1)!= 6 Sep 6 '14 at 11:02
• @Hex4869 It also workes for $m=1=k$. Note that $\binom{n-1}{0}=1$ for each $n\geq1$. Do not confuse it with $\frac{(n-1)!}{0!}$ Sep 6 '14 at 11:44


# Summation of expectation

Lets suppose we are in a casino, having two slot machines. Our strategy is to flip a coin to decide which machine to start on. (Without loss of generality, we say that we play the slot one first with probability $c_1$ and play the slot two first with probability $1-c_1$)

Then, we play on that machine until losing one game, then we switch to another slot machine to continue playing, we play a total n games (n is finite here).

Suppose the probability to win in slot one and slot two is i.i.d $Bernoulli(p_1)$ and $Bernoulli(p_2)$, respectively, and each win just gain 1 dollar, and each loss just get nothing.

Then, what should be the expected earning using this strategy???

I approached it by iteration (drawing a tree), hoping that there will be some pattern and if we find the expected winning in each turn, then we can sum the n rounds up because the trials are independent.

The expected winning in round 1 is: $$c_1\cdot p_1 + (1-c_1) \cdot p_2$$

The expected winning in round 2 is: $$c_1 \cdot[p_1^2+(1-p_1)\cdot p_2]+ (1-c_1)\cdot[p_2^2+(1-p_2)\cdot p_1]$$

The expected winning in round 3 is: $$c_1 \cdot \Big[p_1^3 + p_1(1-p_1) p_2 +(1-p_1)p_2^2 + (1-p_1)(1-p_2)p_1\Big] + (1-c_1) \Big[p_2^3 + p_2(1-p_2) \cdot p_1 + (1-p_2)p_1^2+(1-p_2)(1-p_1)p_2\Big]$$

I counted the expected winning up till round 4, which is: $$c_1 \cdot \Big[p_1^4 + p_1^2(1-p_1)p_2 + p_1(1-p_1) p_2^2 + p_1(1-p_1)(1-p_2)p_1 +(1-p_1)p_2^3 + (1-p_1)p_2(1-p_2)p_1 + (1-p_1)(1-p_2)p_1^2 + (1-p_1)^2(1-p_2)p_2\Big]$$ $$+ (1-c_1) \cdot \Big[p_2^4 + p_2^2(1-p_2)p_1 + p_2(1-p_2) p_1^2 + p_2(1-p_2)(1-p_1)p_2 +(1-p_2)p_1^3 + (1-p_2)p_1(1-p_1)p_2 + (1-p_2)(1-p_1)p_2^2 + (1-p_2)^2(1-p_1)p_1\Big]$$

This calculation seems endless so it does not work well. How could I find the expected winning in this case?

• Oh it is the former, n is the number of times I pull a slot machine's lever~~ We switch only if we lose one game – son520804 Dec 5 '17 at 20:54
• Let $X_1$ be the number of winning pulls on machine 1 before a losing pull. So $X_1 - 1$ is your payoff if you were to play machine 1. What is the expectation of $X_1$? And do any of these formulas for sums of a series help you compute the expectation of $X_1$? – Matthew Gunn Dec 5 '17 at 22:36
• I could not easily compute the number of winning on each slot. We choose to play at slot 1 first by probability $c_1$ and play at slot 2 first by probability $c_2$. Then we play at the slot continuously, until lose 1 game and then play the another slot. (And the slot 1 and slot 2 each has winning probability $p_1$ and $p_2$) – son520804 Dec 5 '17 at 22:42

Consider $d$ machines numbered $1,2,\ldots, d$, each with chance $p(d)$ of winning. Let's find the expectation of beginning with machine $1$, playing until a loss, proceeding to machine $2$, etc, and cycling around from machine $d$ to machine $1$ if necessary until $n$ games have been played. The question concerns the case $d=2$, but the analysis (and computation) isn't any harder for larger $d$.

Let $e_j(k)$ denote the expected winnings from playing $k$ games beginning with machine $j$. Because each game is either a win (gaining $1$ dollar) with probability $p(j)$ or a loss with probability $1-p(j)$, leaving $k-1$ games to go, the rules of conditional expectation imply

$$e_j(k) = p(j)(e_j(k-1) + 1) + (1-p(j))(e_{(j \operatorname{mod} d)+1}(k-1))$$

when $k \ge 1$ and otherwise $e_j(k)=0$.

This is a simple dynamic program requiring $O(dn)$ computational effort and $O(dn)$ storage: in other words, it's a quick easy computation. You can even do it by hand.

As an example, here is an R implementation. The argument p is an array of probabilities $p(j)$. It returns a $d\times n+1$ array indexed by machine and number of games (from $0$ through $n$).

expectation <- function(p, n=10) {
d <- length(p)
P <- matrix(0, d, n+1, dimnames=list(Machine=names(p), Plays=0:n))
if (n > 0)
for (i in 1:n) {
for (j in 1:d) {
P[j, i+1] <- p[j] * (P[j, i] + 1) + (1-p[j]) * P[j%%d + 1, i]
}
}
return(P)
}

Given an initial probability distribution $c(1), c(2),\ldots, c(d)$ for the choice of which machine to start with, the rules of conditional expectation state that the expected winnings will be the sum of $c(j)e_j(n)$. This answers the question.

Intuitively, machines that tend to fail will rarely be operated and those that tend to win are allowed to run. The $e_j(n)$ therefore will rapidly tend to a common value approximately equal to the $p$-weighted average of the $e_j(n)$ as $n$ grows, and the differences among the $e_j(n)$ will be no greater than the differences among the raw probabilities $p(j)$. Here are some examples for $d=2$.

The panel headings list the probabilities for machine "a" and machine "b" in order.

It's always good to check probability calculations. I carried out simulations as shown in this R program:

p <- c(a=0.5, b=0.2)
set.seed(17) # Comment this out when repeating simulations!
sim <- replicate(1e4, n - sum(cumsum(rgeom(n, 1-p) + 1) <= n))

It exploits the fact that the number of wins obtained from a machine has a geometric distribution, allowing the simulation to proceed fairly quickly. (The computation actually amounts to counting how many machines were tried in turn, rather than counting the wins directly.)

The output is an array of winnings, one for each iteration of the scenario. Because this dataset is large and not too skewed, we may compare its mean to the theoretical calculation using a Z-test.

m <- mean(sim)
s <- sd(sim)
mu <- expectation(p, n)[1,n+1]
c(Simulation=m, Calculation=mu, Z=(m - mu)/s * sqrt(length(sim)))

The output in this (reproducible) case is

 Simulation Calculation           Z
3.950       3.930       0.889

It says the average among the (10,000) simulations was 3.95, the calculation of the expectation came out to 3.93, and the Z-score is 0.889 (which is not a significant difference). Repeated simulations for different $p$ and $n$ continue to agree with the calculations, providing assurance the calculations are correct.


# Applying the vec operator

How to apply the $\operatorname{vec}$ operator in Mathematica? For example, how can I transform a $2 \times 2$ matrix into a $1 \times 4$ matrix as follows? $$\operatorname{vec}\left( \begin{bmatrix} a_{1,1} & a_{1,2} \\ a_{2,1} & a_{2,2} \end{bmatrix} \right) = \begin{bmatrix} a_{1,1} \\ a_{2,1} \\ a_{1,2} \\ a_{2,2} \end{bmatrix}$$

• vector and matrix are vague terms in Mathematica so please add input and expected output in terms of Mathematica code in order to make the question clear. – Kuba Feb 16 '17 at 10:31
• Thanks for the Accept. Please see the additional example of Flatten that I added afterward. – Mr.Wizard Feb 16 '17 at 13:59

Use Flatten to do this in a single operation.

in = Array[a, {2, 2}]

Flatten[in, {2, 1}]

{{a[1, 1], a[1, 2]}, {a[2, 1], a[2, 2]}}

{a[1, 1], a[2, 1], a[1, 2], a[2, 2]}

In Mathematica there are only vectors (lists), not column vectors and row vectors. However if you wish to convert a vector into an array with rows of length one for output the computationally fastest method is typically Partition:

Partition[{a[1, 1], a[2, 1], a[1, 2], a[2, 2]}, 1]

{{a[1, 1]}, {a[2, 1]}, {a[1, 2]}, {a[2, 2]}}

If that is your goal from the start you can also do that in a single operation using Flatten:

Flatten[{in}, {3, 2}]     (* note the extra {} around in *)

{{a[1, 1]}, {a[2, 1]}, {a[1, 2]}, {a[2, 2]}}

• Unless OP sees column vector as: List /@ {a[1, 1], a[2, 1], a[1, 2], a[2, 2]} – Kuba Feb 16 '17 at 13:34
• @Kuba Good point. There is no such thing as a column vector in Mathematica as you know, but that doesn't mean the OP doesn't potentially want a series of one element rows... – Mr.Wizard Feb 16 '17 at 13:37
{{1, 2}, {4, 5}} // MatrixForm

\begin{bmatrix} 1 & 2 \\ 4 & 5 \end{bmatrix}

ArrayReshape[Transpose[%], {4, 1}] // MatrixForm

\begin{bmatrix} 1 \\ 4\\ 2\\ 5 \end{bmatrix}

Thanks to @cyrille.piatecki for the use of Transpose[].

I propose this simple module

vec[mat_] :=
Module[{a = mat},
ArrayReshape[Transpose[
a], {Dimensions[mat][[1]] Dimensions[mat][[2]], 1}]]

apply with

aa = Table[Subscript[a, i, j], {i, 1, 2}, {j, 1, 2}]

this gives the expected result

vec[aa] // MatrixForm


# Does minimal ideal always imply principal ideal?

First, let me specify two definitions i will use.

$$[1.]$$ A (right/ left/ both) ideal $$I$$ of a ring $$R$$ (unity not assumed) is minimal if $$(1.) \; I\neq (0)$$ and $$(2.)$$ If $$J$$ is any nonzero (right/ left/ both) ideal of $$R$$ containied in $$I$$, then $$J=I$$

$$[2.]$$ If $$x \in R$$, then $$(x)$$ is the intersection of all (left/ right/ both) ideals of $$R$$ containing $$x$$.

Consider the following propostition and its proof:

$$\textbf{A [right / left / both] ideal I of a ring R is minimal iff}$$

$$\textbf{ I is generated by any of its nonzero elements x \in I }$$

Proof:

$$1.(\Rightarrow)$$ Suppose $$I$$ is minimal and and $$x \in I$$ is nonzero. Consider the ideal $$J:=(x)$$ generated by $$x$$. By construction, $$J \neq (0)$$ since $$x \in J$$. Now, $$J \subseteq I$$, since by definition $$J$$ is the smallest ideal containing $$x$$. But then , by minimality of $$I$$ we must have $$I=J$$, so $$I$$ is generated by $$x$$.

$$2.(\Leftarrow)$$ Suppose $$I=(x)$$ for any $$x \in I$$, and that $$J$$ is any nonzero ideal of $$R$$ with $$J \subseteq I$$. Let $$y$$ be any nonzero element of $$J$$. Then $$y \in I$$, and by hypothesis we have $$I=(y)$$. But then we must have $$J=I$$, because $$(y)$$ is the smallest ideal of $$R$$ containing $$y$$.

My question is:

$$\textbf{Does this also prove that any minimal ideal is principal? }$$

• (2) is not correct. That $I$ is principal does not mean $I = (y)$ for every $y \in I$, it means $I = (y)$ from some $y \in I$.
– Jim
Oct 6, 2019 at 13:36
• (1) is correct though, all minimal ideals are principal and for minimal ideals it actually is true that $I = (y)$ for every $y \in I$. That condition is actually equivalent to the principal ideal being minimal.
– Jim
Oct 6, 2019 at 13:37
• Then you have read incorrectly. I'm not saying that I is principal. I'm saying that I is an ideal which has the property that it is generated by any of its elements. Oct 6, 2019 at 13:37
• Oh, actually you're right! I did read what you were proving incorrectly, my bad.
– Jim
Oct 6, 2019 at 13:39
• In that case both (1) and (2) are correct.
– Jim
Oct 6, 2019 at 13:39

Yes essentially, although I think it is safest to word it as “a left (resp, right/twosided) ideal is minimal if and only if it is generated by any of its nonzero elements as a left (resp, right/twosided) ideal.”

The fact that minimals are generated by a single element follows a fortiori from the $$\implies$$ direction.

Let $$I$$ be a minimal right ideal of a ring $$R$$. By definition, $$I$$ being a principal right ideal means that $$\exists x \in R \, (I=xR)$$.

In fact, $$\forall x \in I \setminus \{0\} \, (I=xR)$$. Indeed, for any nonzero element $$x$$ of $$I$$, $$xR \subseteq I$$ (because $$I$$ is a right ideal of $$R$$) and $$0 \neq x \in xR$$, so $$xR=I$$ because $$I$$ is assumed to be a minimal right ideal.

Similarly, if $$I$$ is a minimal left (resp. two-sided) ideal of $$R$$, then $$\forall x \in I \setminus \{0\} \, (I=Rx)$$ (resp. $$\forall x \in I \setminus \{0\} \, (I=RxR)$$).

More generally, any simple module is cyclic. Two-sided ideals of $$R$$ are the same as the right $$R^{op} \otimes_{\mathbb{Z}} R$$-submodules of $$R$$.

I agree with the former part of your proof, but I do not with the latter part. (I missed the word ANY.)

To be specific, consider $$R = \mathbb Z$$ and an ideal $$I = (n)$$ with $$n \neq 0$$. Obviously, it contains a non-zero proper ideal $$(n) \supset (2n) \supset (0).$$ Hence, a principal ideal generated by a non-zero element needs not to be minimal. (Indeed, this argument shows that $$\mathbb Z$$ has no minimal ideals.)

• Yes, it does. (You've proved it, right?)
– Orat
Oct 6, 2019 at 13:42
• Well, I'm not sure, because I can't find the statement mentioned on the web. On the wikipedia page of minimal ideal, en.wikipedia.org/wiki/Minimal_ideal , they mention briefly that for a ring R with unity, this in neccesarily true for right ideals .. . Oct 6, 2019 at 13:47
• Well, what you've done is basically the same as the argument shown on that wikipedia page. Depending on what type of ideals you're considering (right/left/two-sided), considering an ideal of the form ($xR$/$Rx$/$RxR$) is the key, anyway. BTW, many people may reserve the symbol $(x)$ to denote $RxR$ only.
– Orat
Oct 6, 2019 at 13:53
• Well, the fact that I=xR / I=Rx / I=RxR for principal ideals is only the case if R has unity, which isn't assumed... Oct 6, 2019 at 13:56
• You're right; as I usually deal with unital rings, I didn't pay much attention to that. Anyway the former part of your proof is correct as it only uses the minimality, and does not use something like $xR$.
– Orat
Oct 6, 2019 at 14:02


# Calculating $e$

If I calculate $e$ using the following formula.

$$e = \sum_{k=0}^{\infty}{\frac{1}{k!}}$$

Is it possible to predict how many correct decimal places I get when I stop summing at $n$ terms?

-
There is a subtlety in the contrast between "correct decimal places" and accuracy. Most of us had interpreted "$n$ correct decimal places as within $10^{-n}$, but as Dan Brumleve points out, you could be very close. If the correct answer is $1.9999$, an error of $10^{-4}$ can change the ones digit. Having a string of $9$'s is rare, but if you care about it you need to check. – Ross Millikan Nov 10 '12 at 4:37

If we use $n$ terms, the last term used is $\dfrac{1}{(n-1)!}$. The missing "tail" is therefore $$\frac{1}{n!}+\frac{1}{(n+1)!}+\frac{1}{(n+2)!}+\frac{1}{(n+3)!}\cdots.\tag{1}$$ Note that $(n+1)!=n!(n+1)$ and $(n+2)!\gt n!(n+1)^2$, and $(n+3)!\gt n!(n+1)^3$ and so on. So our tail $(1)$ is less than $$\frac{1}{n!}\left(1+\frac{1}{n+1}+\frac{1}{(n+1)^2}+\frac{1}{(n+1)^3}+\cdots \right).$$ Summing the geometric series, we find that the approximation error is less than $$\frac{1}{n!}\left(1+\frac{1}{n}\right).$$

-
This is a good answer, why was it downvoted? – robjohn Nov 9 '12 at 19:45
To end the error vs correct digits discussion: If you calculate $e_n:=\sum_{k=0}^n\frac1{n!}$ and $e_n+\frac1{n!}(1+\frac1n)$ and both agree on $d$ decimals, then both estimates are correct to (at least) $d$ decimals. – Hagen von Eitzen Nov 9 '12 at 20:39
@DanBrumleve How about instead of just downvoting (something that can't be undone after a few minutes) 10 (a slight exaggeration) different answers without a single comment (until after someone asked why), leave a comment and clarify. Then, if it turns out you misunderstood, you haven't just downvoted 10 different answers incorrectly. – Graphth Nov 9 '12 at 22:41
@DanBrumleve Well, obviously many other people (everyone who answered?) believe otherwise. So, is it possible that at the very least it's just your preference? And, if so, is it really worth downvoting? – Graphth Nov 9 '12 at 23:31
@DanBrumleve While this is more of a meta issue, IMHO there is a difference between 'this is not how I would have answered the question' or even 'this is not what I consider a complete answer to the question' and 'this is an unhelpful answer to the question' - I would consider the latter to be a minimal standard for downvoting (as opposed to simply not voting), and the FAQ seems to agree: 'Use your downvotes whenever you encounter an egregiously sloppy, no-effort-expended post, or an answer that is clearly and perhaps dangerously incorrect.' This answer is hardly egregious or dangerous. – Steven Stadnicki Nov 10 '12 at 1:08

You can use the remainder term in Taylor's expansion

-
To what function are we applying Taylor's theorem? – robjohn Nov 9 '12 at 19:49
@robjohn the definition of $e$ given by OP is actually the Taylor series for $e^x$ centered at $x=0$, evaluated at $x=1$. – Logan Stokols Nov 9 '12 at 23:48
@Logan: As I mentioned in a comment to glebovg, since $f$ was not specified in the question, it would be good to mention it in the answer. – robjohn Nov 10 '12 at 0:04

In this answer, it is shown, by comparison to a geometric series, that $$0\le n!\left(e-\sum_{k=0}^n\frac1{k!}\right)\le\frac1n$$ Therefore, the error after $n+1$ terms is at most $\frac1{nn!}$ .

To $n$ decimal places:

When asking for a number to $n$ decimal places, there are two common meanings

1. the error is less than $\frac12\times10^{-n}$.

2. the value is correct when rounded to $n$ decimal places. As has been pointed out, if a number is very close to $10^{-n}\left(\mathbb{Z}+\frac12\right)$, rounding to $n$ decimal places might require computing more decimal places to know the actual $n^{\mathrm{th}}$ digit of the rounded number. This is not as easy to use as meaning 1, so it is not as commonly used.

-
That was a fast downvote. Care to comment? – robjohn Nov 9 '12 at 20:21
Is someone just downvoting for free? – Pedro Tamaroff Nov 10 '12 at 0:24
@PeterTamaroff: nah... it still costs 1 rep to downvote an answer (afaik). – robjohn Nov 10 '12 at 0:26

The series converges rapidly. If you stop at $\frac 1{ k!}$ you can bound the error by $\frac 1{k(k!)}$ by bounding the remaining terms with a geometric series.

-
Why was this downvoted? It seems a bit scant, but valid. – robjohn Nov 9 '12 at 19:43
I downvoted for the same reason as most of the others: the question asks about the number of correct leading digits in the partial sum and this upper bound on the error term doesn't lead to any obvious answer to that question. – Dan Brumleve Nov 10 '12 at 4:29

The $n$-th Taylor polynomial is $${P_n}(x) = f(0) + \frac{{f'(0)}}{{1!}}x + \frac{{f''(0)}}{{2!}}{x^2} + \cdots + \frac{{{f^{(n)}}(0)}}{{n!}}{x^n}$$ (in this case $f(x)$ is simply $e$) and the error we incur in approximating the value of $f(x)$ by $n$-th Taylor polynomial is exactly $$f(x) - {P_n}(x) + \frac{{{f^{(n + 1)}}(c)}}{{(n + 1)!}}{x^{n + 1}}$$ where $0 < c < x$. This form of the remainder can be used to find an upper bound on the error. If the difference above is positive, then the approximation is too low, and likewise if the error is negative, then the approximation is too high. We only need to find an appropriate $c$.

-
To what function are we applying Taylor's theorem? – robjohn Nov 9 '12 at 19:50
@robjohn In this case $e^x$ for $x = 1$, but it works in general. – glebovg Nov 9 '12 at 20:17
Why downvote? Please comment. – glebovg Nov 9 '12 at 20:17
I downvoted because it doesn't address the distinction between the error term and the number of correct digits in the partial sum. (Also consider simplifying or clarifying: the question asks only about $e$ not $e^x$.) – Dan Brumleve Nov 9 '12 at 20:21
@glebovg: Since $f$ was not specified in the question, it would be good to mention it in the answer. – robjohn Nov 9 '12 at 22:49


# What distribution models number of trials needed for given number of successes and success rate?

Case scenario: a retro-virus infects a healthy cell. The virus programs the cell to brew little viruses, at a rate of 0.5 per-sec, until finally the cell bursts when the number of virus inside it is 5. How to model this?

In Binomial, the random variable represents the number of successful trials obtained when throwing a coin a certain number of trials, at a certain probability of success per trial.

I want a distribution whose random variable is the number of trials (coin tosses) that were necessary to perform, given a certain number of successful trials and a certain probability per trial.

I am not even sure how I would write down the probability mass function.

Is there such a distribution? Nothing rings a bell here: https://en.wikipedia.org/wiki/Category:Discrete_distributions

There are related questions to this one --- such as this one: How many trials until I each my desired outcome --- but no-one mentioned a distribution, or if any exists.

Just to make it clear, the random generator for a random variable of such a distribution would look like this in R:

rmy <- function(s, p) {
i <- n <- 0
while(i != s) {
i <- i+rbinom(1,1,p)
n <- n+1
}
n
}

Thank you ! ps: sorry if the text was a little flowery, but it helps me think, since I am a junior mathematician hehe.

• Let me see if I understand the process. Each second I flip a (fair) coin to see if I produce a virus. Since I have a $1/2$ probability of producing a single new virus, the average virus production rate is $1/2$. I stop when I produce five viruses. And you want to know the expected number of coin flips, is that right? – Brian Tung Apr 14 '15 at 22:23
• Have you looked at Poisson Distribution? – rightskewed Apr 14 '15 at 22:46
• @BrianTung, I want to know if there is a theoretical distribution. Expected value is easy, it is E=m/p=5/0.5=10, in this case, where m is number of successful trials and p is probability of success. – rpmcruz Apr 15 '15 at 8:05
• @rightskewed, hmm what do you have in mind exactly? Using $\lambda=m/p$; testing in R rpois(10, 5/0.5) shows it sampling values below <5, which is impossible in this model. – rpmcruz Apr 15 '15 at 8:08
• Just to make it clear: I want to know if there is already a popular theoretical distribution for what I want. If anyone works to work out the probability mass function that would be superb too. :P Might make sense to migrate it to: stats.stackexchange.com . I did not remember about the statistics forum ... – rpmcruz Apr 15 '15 at 8:12

I figure this one out. :)

I can model it using a Negative Binomial: https://en.wikipedia.org/wiki/Negative_binomial_distribution

First, let us change the values of my case scenario, just to make it clearer. "Case scenario: a retro-virus infects a healthy cell. The virus programs the cell to brew little viruses, at a rate of 0.2 per-sec, until finally the cell bursts when the number of virus inside it is 5. How to model this?"

We can model number of failures $Y$ as $Y\sim\mathcal{NB}(5,0.2)$. That answers the question, how many failed trails do we have, when we need 5 successful at a probability rate of 0.2. But we do not want failed trials, we want total trials, and total trials = failed trials + successful trials. We know successful trials, which is 5, so our random variable $X$ is such that $X\sim5+\mathcal{NB}(5,0.2)$.

In fact, comparing the random generator function I proposed in the question with the negative binomial random generator (with this adjustment):

par(mfrow=c(1,2))
hist(sapply(1:1e5, function(x) rmy(5, 0.2)))
hist(5+rnbinom(1e5, 5, 0.2))

All functions mean, sd and summary are consistent as well.

My 2 cents here :

Using a Negative Binomial distribution can be a very good approximation. However :

1) You totally remove the case r=0 (No failures).

2) Also, you're not answering your initial question. You're computing the distribution of the #trials before achieving the known #fails (or #success). It's different than #trials knowing the #fails (or #success), as you can have fails following the last success !

I believe the right answer involves Bayesian probabilities :

• We consider that N is a random variable describing the # of trials (# of Bernoulli trials). Let's assume that N is following an Exponential Distribution $$N \thicksim Exp(\lambda)$$
• We then consider that X is a random variable describing the number of successes after N=n trials, following a Binomial distribution $$N \thicksim Binom(p, N)$$

Let's compute $$P(n|k)$$ thanks to the Bayes formula :

$$\frac{1}{P(N=n|X=k)} = \frac{P(X=k)}{P(X=k|N=n)P(N=n)}$$

And by writing $$P(k) = \sum_{m=k}^{\infty}{P(X=k|N=m)P(N=m)}$$

$$= \sum_{m=k}^{\infty}\frac{P(X=k|N=m)P(N=m)}{P(X=k|N=n)P(N=n)}$$

And because $$P(X=k|N=n)$$ and $$P(X=k|N=m)$$ are just Binomial distributions :

$$= \sum_{m=k}^{\infty}\frac{m!k!(n-k)!}{n!k!(m-k)!} \frac{p^k}{p^k} \frac{(1-p)^{m-k}}{(1-p)^{n-k}} \frac{e^{-\lambda.m}}{e^{-\lambda.n}}$$

$$= \sum_{m=k}^{\infty}{[e^{-\lambda}(1-p)]^{m-n}}$$

And by re-indexing the Serie with $$l=m-k <=> m=l+k$$

$$= \sum_{l=0}^{\infty}{[e^{-\lambda}(1-p)]^{l+k-n}}$$

$$\frac{1}{P(N=n|X=k)} = \frac{[e^{-\lambda}(1-p)]^{k-n}}{1 - e^{-\lambda}(1-p)}$$

$$P(N=n|X=k) = \frac{1 - e^{-\lambda}(1-p)}{[e^{-\lambda}(1-p)]^{k-n}}$$

And now you have a probability $$P>0$$ for $$k=0$$ ;-)

Edit: The choice of the prior (Exponential) is totally arbitrary and leads to a lot of simplifications. If anyone wants to attempt the calculation with another prior, feel free :-)


# Why are $X \sim U(-1,1)$ and $Y=X^2$ dependent?

Suppose we have two continuous random variables $$X \sim U(-1,1)$$ and $$Y=X^2$$. I don't understand why they are dependent.

$$E[X] = 0$$ $$E[Y] = \int_{-1}^{1} x^2 dx = 2/3$$ $$E[XY] = \int_{-1}^{1} x^3 dx = 0$$

They are independent to me because $$E[XY]=E[X]E[Y]$$, so why they are dependent?

• Plotting simulated values of $X$ and $Y$ will be enlightening, but you can also work out the density of $Y$ via a change of variables from $X$ in order to compare the probabilities in terms of definition of statistical independence. Feb 4 at 4:15
• I find it challenging to find any function $h$ for which $X$ and $h(X)$ are independent.
– whuber
Feb 4 at 15:55
• @whuber: one such function $h$ is $h(x)=0$. Another one is $h(x)=5$. Feb 4 at 17:25
• @Kjetil Certainly. Not very interesting, are they? ;-)
– whuber
Feb 4 at 18:00
• For specific distributions more interesting functions can be possible. For instance, $Y = \sin(2\pi X)$ is independent from $X$ if the domain of $X$ is integer values only. But yes, it will still be the not so interesting map where all values in the domain of $X$ need to be mapped to a single point. It is because $f(X)$ given $X=x$ is a singular distribution in the point $f(x)$. Independence requires that the distribution of $f(X)$ is the same distribution for every value of $X$, $f(x)$ must be a single value for every $x$. Feb 4 at 20:55

Let me write this in a generic manner:

Two random variables for which the expectation of the product is equal to the product of expectations need not be independent.

Let $$X\sim \mathcal U(-a, a)$$ where $$a\in\mathbb R_+$$ and let $$Y\sim X^2.$$ Then as noted $$\mathbb E[XY]=\mathbb E[X^3] =0=\mathbb E[X]\mathbb E[Y].$$ But they are definitely not independent.

## Reference:

$$\rm [I]$$ Counterexamples in Probability and Statistics, Joseph P. Romano, Andrew F. Siegel, Wadsworth, $$1986,$$ ex. $$4.15.$$

Since $$Y = X^2$$, $$[-1/2 \leq X \leq 0] \cap [Y > 1/4] = \varnothing$$, hence $$P[-1/2 \leq X \leq 0, Y > 1/4] = 0$$. On the other hand, $$P[-1/2 \leq X \leq 0] = 1/4 > 0, P[Y > 1/4] = 1/2 > 0$$. Hence the independence defining relation $$P(A \cap B) = P(A)P(B)$$ for all $$A \in \sigma(X), B \in \sigma(Y)$$ fails to hold for $$A = [-1/2 \leq X \leq 0]$$ and $$B = [Y > 1/4]$$, i.e., $$X$$ and $$Y$$ are not independent.

Above is a formal proof. Intuitively, since $$Y$$ is a deterministic function of $$X$$, knowing the value of $$X$$ means knowing the value of $$Y$$, hence $$Y$$ and $$X$$ of course cannot be independent (the heuristic definition of independence between $$X$$ and $$Y$$ requires that observing the information provided by $$X$$ does not increase the information of $$Y$$).

It is worth emphasizing that $$E[XY] = E[X]E[Y]$$ is a necessary condition, rather than a sufficient condition for the independence of $$X$$ and $$Y$$. If you really want to express the independence of $$X$$ and $$Y$$ in terms of expectations, it should be stated as

$$X$$ and $$Y$$ are independent $$\iff$$ $$E[f(X)g(Y)] = E[f(X)]E[g(Y)]$$ for all Borel measurable functions $$f$$ and $$g$$.

Evidently, the condition $$E[f(X)g(Y)] = E[f(X)]E[g(Y)]$$ is much stronger than the condition $$E[XY] = E[X]E[Y]$$. The former is a system of infinitely many equations, while the latter is a single equation.

You need to distinguish between the concepts of uncorrelatedness, which involves the decomposition of the expectation of a product, and independence, which involves the decomposition of a joint probability distribution. What you're calling independence is actually uncorrelatedness. What happens, as the other answers show, is that independence is a stronger condition than uncorrelatedness, that is, independence implies uncorrelatedness but the vice versa is not true.

And your example is exactly one example that is used to show that uncorrelatedness does not imply independence.

They are clearly not independent: if you know the value $$X$$ then this gives you information about the value of $$Y$$ and indeed allows you to calculate it precisely.

You have correctly said independence means $$P(X\le a, Y\le b)=P(X\le a) P(Y\le b)$$, so for example consider $$a=\frac13$$ and $$b=\frac 14$$.

• $$X \le \frac 13$$, i.e. when $$-1 \le X \le \frac13$$, has probability $$\frac23$$
• $$Y \le \frac 14$$, i.e. when $$-\frac12 \le X \le \frac12$$, has probability $$\frac12$$
• $$X \le \frac 13, Y \le \frac 14$$ together, i.e. when $$-\frac12 \le X \le \frac13$$, has probability $$\frac5{12}$$

but $$\frac23 \times \frac12 \not=\frac5{12}$$ so they are not independent. Try other examples with $$-1 < a < 1$$ and $$0 < b < 1$$.

$$E[XY] = E[X]E[Y]$$ is a condition for zero covariance and so zero correlation, but this on its own does not imply independence. The bottom row of Wikipedia's chart illustrating correaltion has other examples of this; in your question you would get a parabolic U-shaped chart.

• Note that zero covariance is sufficient for independence if $X$ and $Y$ are jointly Gaussian, but not necessarily (or maybe ever) for other distributions. That it works for multivariate Gaussian distributions might be the source of the confusion.
– Dave
Feb 4 at 14:03

Here is a simulation of how the joint distribution looks like:

It shows clearly that the two variables are not independent.

Your formula is more generally (including dependent variables).

$$\text{E}[XY] = \text{E}[X]\text{E}[Y] + \text{COV}(X,Y)$$

So when you compute $$\text{E}[XY] = \text{E}[X]\text{E}[Y]$$ then it must mean that $$\text{COV}(X,Y) = 0$$. But that doesn't imply independence. This makes your case an example of: Why zero correlation does not necessarily imply independence

• It is not clear where you got the idea for the product $\text{E}[XY] = \text{E}[X]\text{E}[Y]$. Possibly you are confusing it for a description of independence as $P(A \text{ and } B) = P(A) \cdot P(B)$ Feb 4 at 19:27


# Component of a vector along another vector.

Tags:
1. Oct 22, 2014

### Hijaz Aslam

1. The problem statement, all variables and given/known data
Given $\vec{A}=2\hat{i}+3\hat{j}$ and $\vec{B}=\hat{i}+\hat{j}$.Find the component of $\vec{A}$ along $\vec{B}$.

2. Relevant equations
$\vec{A}.\vec{B}=ABcosθ$ where θ is the angle between both the vectors.

3. The attempt at a solution
I attempted the question as follows:
Let the angle between $\vec{A}$ and $\vec{B}$ be 'θ'. So the component of $\vec{A}$ along $\vec{B}$ is given by $Acosθ\hat{B}$ => $Acosθ(\frac{\vec{B}}{B})$

As $\vec{A}.\vec{B}=ABcosθ$ => $[( 2\hat{i}+3\hat{j})(\hat{i}+\hat{j})]/B=Acosθ$ => $\frac{5}{\sqrt{2}}=Acosθ$

Therefore the component is : $\frac{5}{\sqrt{2}}(\frac{\hat{i}+\hat{j}}{\sqrt{2}})$ => $\frac{5}{2}({\hat{i}+\hat{j}})$

But my text produces the solution as follows:
$A_B=(\vec{A}.\vec{B})\hat{B}=\frac{5}{\sqrt{2}}(\hat{i}+\hat{j})$.

2. Oct 22, 2014

### RUber

I usually see this process broken down into basis components.
That is $\hat B =\sqrt{2}/2 \hat i + \sqrt{2}/2 \hat j.$
Then the component is $A\cdot \hat B_i \hat i + A\cdot \hat B_j \hat j$.
Somewhere in your process, you divided by the magnitude of B twice.

3. Oct 23, 2014

### willem2

You're right and the book is wrong. The book answer as well as the formula for AB they use.
The length of your answer is smaller than the length of A as it should be. The book answer is larger.
The projection of A on B should only depend on the direction of B, not the magnitude. The formula used for AB in the book does depend on the magnitude of B.

4. Oct 23, 2014

### Delta²

Book is wrong . We can verify this by standard euclidean geometry easily because by the definition of cosine, it will be cos(θ)=(component of A along B)/A hence Acos(θ)=(component of A along B). And we have to multiply this by the unit vector of B to get the required result.


# Different results with quotient rule

1. May 26, 2013

### mike82140

I have been trying to figure out the derivative of (X²-1)/X. When I use the quotient rule, the result I get is 1-1/X². However, when I simplify the expression first, then take the derivative, I get 1+1/X²

Why are the results different?

2. May 26, 2013

### Hypersphere

3. May 26, 2013

### mike82140

Can you show how you evaluate it? I tried both ways, but get different results.

4. May 26, 2013

### Hypersphere

Alright, for a function
$$f(x) = \frac{g(x)}{h(x)}$$
the quotient rule says
$$f'(x) = \frac{g'(x)h(x)-g(x)h'(x)}{h^2(x)}$$

In your case, $g(x)=x^2-1$ and $h(x)=x$. Thus $g'(x)=2x$ and $h'(x)=1$. Then you get
$$\frac{\mathrm{d}}{\mathrm{dx}}\frac{x^2-1}{x}=\frac{2x\cdot x - \left( x^2 -1 \right) \cdot 1}{x^2}=\frac{2x^2-x^2+1}{x^2}=1+\frac{1}{x^2}$$
Are you sure you included the $g'(x)$ term?

Simplifying first,
$$\frac{\mathrm{d}}{\mathrm{dx}}\frac{x^2-1}{x} = \frac{\mathrm{d}}{\mathrm{dx}} \left( x - \frac{1}{x} \right) = 1- \frac{-1}{x^2}=1+\frac{1}{x^2}$$

5. May 26, 2013

### mike82140

Where did +1 come from when you were multiplying x²-1 with 1?

6. May 26, 2013

### Hypersphere

It was also multiplied by -1, from the quotient rule formula.

7. May 26, 2013

### mike82140

I'm sorry for asking so many questions, and this may sound stupid, but, what -1?

Edit: It appears as though I have made a mistake. The -1 is the minus part that is in front of the x²-1, so the negative, or minus, distributes itself.

Thank you for the help, I appreciate it.

8. May 26, 2013

### Hypersphere

You see the minus sign in front of $\left( x^2 -1 \right) \cdot 1$, right? That is just short notation for

$$- \left( x^2 -1 \right) \cdot 1=\left( -1 \right) \cdot \left( x^2 -1 \right)= (-1) \cdot x^2 + (-1) \cdot (-1) = -x^2+1$$

Agreed? Or are you pulling my leg here?

EDIT: Ah, good. I was almost giving up for a while there.

9. May 26, 2013

### SteamKing

Staff Emeritus
Look at the formula for the quotient rule.

If h(x) = x, what is h'(x)?


# Order is Preserved on Positive Reals by Squaring

## Theorem

Let $x, y \in \R: x > 0, y >0$.

Then:

$x < y \iff x^2 < y^2$

## Proof 1

### Necessary Condition

Assume $x < y$.

Then:

 $\ds x < y$ $\implies$ $\ds x \times x < x \times y$ Real Number Ordering is Compatible with Multiplication $\ds x < y$ $\implies$ $\ds x \times y < y \times y$ Real Number Ordering is Compatible with Multiplication $\ds$ $\leadsto$ $\ds x^2 < y^2$ Real Number Ordering is Transitive

So:

$x < y \implies x^2 < y^2$

$\Box$

### Sufficient Condition

Assume $x^2 < y^2$.

Then:

 $\ds x^2$ $<$ $\ds y^2$ $\ds \leadsto \ \$ $\ds 0$ $<$ $\ds y^2 - x^2$ Real Number Ordering is Compatible with Addition $\ds \leadsto \ \$ $\ds \paren {y - x} \paren {y + x}$ $>$ $\ds 0$ Difference of Two Squares $\ds \leadsto \ \$ $\ds \paren {y - x} \paren {y + x} \paren {y + x}^{-1}$ $>$ $\ds 0 \times \paren {y + x}^{-1}$ as $x + y > 0$ $\ds \leadsto \ \$ $\ds y - x$ $>$ $\ds 0$ $\ds \leadsto \ \$ $\ds x$ $<$ $\ds y$

So:

$x^2 < y^2 \implies x < y$

$\blacksquare$

## Proof 2

From Real Numbers form Ordered Field, the real numbers form an ordered field.

The result follows from Order of Squares in Ordered Field.

$\blacksquare$

## Proof 3

From Real Numbers form Ordered Field, the real numbers form an ordered field.

By definition, an ordered field is a totally ordered ring without proper zero divisors.

The result follows from Order of Squares in Totally Ordered Ring without Proper Zero Divisors.

$\blacksquare$

## Proof 4

### Necessary Condition

Let $x < y$.

Then:

 $\ds x < y$ $\implies$ $\ds x \times x < x \times y$ Real Number Ordering is Compatible with Multiplication $\ds x < y$ $\implies$ $\ds x \times y < y \times y$ Real Number Ordering is Compatible with Multiplication $\ds$ $\leadsto$ $\ds x^2 < y^2$ Real Number Ordering is Transitive

So:

$x < y \implies x^2 < y^2$

$\Box$

### Sufficient Condition

Let $x^2 < y^2$.

Aiming for a contradiction, suppose $x \ge y$.

Then:

 $\ds x \ge y$ $\implies$ $\ds x \times x \ge x \times y$ Real Number Ordering is Compatible with Multiplication $\ds x \ge y$ $\implies$ $\ds x \times y \ge y \times y$ Real Number Ordering is Compatible with Multiplication $\ds$ $\leadsto$ $\ds x^2 \ge y^2$ Real Number Ordering is Transitive

But this contradicts our assertion that $x^2 < y^2$.

Hence by Proof by Contradiction it follows that:

$x < y$

$\blacksquare$