# Probability Examples And Solutions

For example, in a large number of coin tosses, heads and tails will occur each about 50% of the time. The solutions are not intended to be as polished as the proofs in the book, but are supposed to give enough of the details so that little is left to the. The above facts can be used to help solve problems in probability. We request all visitors to read all examples carefully. Ch4: Probability and Counting Rules Santorico – Page 105 Event – consists of a set of possible outcomes of a probability experiment. Something with a probability of 0 is something that could never possibly happen. Aptitude Made Easy - Probability – 7 Tricks to solve problems on Balls and bags – Part 1 - Duration: 6:57. Spector and Mazzeo examined the effect of a teaching method known as PSI on the performance of students in a course, intermediate macro economics. If a woman does not have breast cancer, the probability is 7 percent that she will still have a positive mammogram. Show Step-by-step Solutions. Probability Theory and Examples - Durrett. The at least once rule gives us the probability of at least one flood in 100 years: P(ALO in 100 years)=1-[P(not flood in one year)]100 =1-[0. Referring to the earlier example (from Unit 3 Module 3) concerning the National Requirer. Plus, get practice tests, quizzes, and personalized coaching to help you succeed. There 2 numbers that are odd and less than 5: 1 and 3. You use probability in daily life to make decisions when you don't know for sure what the outcome will be. For example, one way to partition S is to break into sets F and Fc, for any event F. ) the second time will be the same as the first (i. 1 of winning. As a member, you'll also get unlimited access to over 79,000 lessons in math, English, science, history, and more. When we flip a coin there is always a probability to get a head or a tail is 50 percent. In the case of a coin, there are maximum two possible outcomes – head or tail. The continuous random variables deal with different kinds of distributions. Rick Durrett Probability Theory And Examples Solution Manual. This video shows examples of using probability trees to work out the overall probability of a series of events are shown. ) and finding about the probability of two things happening in that one task. Exercise 15. An example for non-mutually exclusive events could be: E 1 = students in the swimming team. Solution: The chances of landing on blue are 1 in 4, or one fourth. NCERT Solutions for Class 12 Maths Chapter 13 Exercise 13. For example, when rolling a number cube 600 times, predict that a 3 or 6 would be rolled roughly 200 times, but probably not exactly 200 times. The pictures below depict the probability distributions in space for the Hydrogen wavefunctions. The binomial probability calculator will calculate a probability based on the binomial probability formula. Solutions will be gone over in class or posted later. Are passing these subjects dependent on each other? @312; Hallow): was, Ptmrk): (My etchm GMI’k): 011 NW Newman-m): mun-4: 2-045”. The Best NCERT Books , CBSE Notes , Sample Papers and NCERT Solutions PDF Free Download. For example, in a function machine, a number goes in, something is done to it, and the resulting number is the output: probability: The measure of how likely it is for an event to occur. The denominator 10 because there are 10 fruits in the basket (the total number of outcomes). We can use a bar chart, called a probability distribution histogram , to display the probabilities that X lies in selected ranges. Answer: The probability of being able to exercise outdoors every day of the year where Sam now lives is (:99)365 ˇ:0255 ˇ3% so there is about a 97% probability of not being able to exercise outdoors one or more days of the year. In the "die-toss" example, the probability of event A, three dots showing, is P(A) = 1 6 on a single toss. Suppose a coin tossed then we get two possible outcomes either a 'head' ( H ) or a 'tail' ( T ), and it is impossible to predict whether the result of a toss will be a. Denote by #Adenote the number of point in A. Class 11 Maths Probability Ex 16. The solutions to these problems are at the bottom of the page. Let E = Event of drawing 2 balls, none of which is blue. This video shows examples of using probability trees to work out the overall probability of a series of events are shown. First we find the probability of each event. So before seeing the patient I'm already able to identify the two most likely diagnoses and assign an initial probability for each. The solutions given to the questions for the in between exercises and exercises given at the end of the chapter are prepared by our subject matter experts in a simple and lucid language. Team A wins the series in two games with probability 1/4. All NCERT Questions, Examples and Exercises are solved with step-by-step answers to all questions explained in detail. Answers and links to explanations to these these GMAT probability problems are at the end of set. 2 List the elements of the following sets. Introduction to Conditional Probability Some Examples A "New" Multiplication Rule Conclusion Conditional Probability Here is another example of Conditional Probability. In reality, I'm not particularly interested in using this example just so that you'll know whether or not you've been ripped off the next time you order a hamburger! Instead, I'm interested in using the example to illustrate the idea behind a probability density function. Therefore, both the events will have half probability. On inﬁnite sums19 6. Not all Markov chains. Hope you like them and do not forget to like , social share and comment at the end of the page. Bayes' theorem is a mathematical equation used in probability and statistics to calculate conditional probability. 1 of the bags is selected at random and a ball is drawn from it. Get Free NCERT Solutions for Class 11 Maths Chapter 16 Probability. Theoretical probability is an approach that bases the possible probability on the possible chances of something happen. Probability: Theory and Examples. Expected Value 7. If none of the possible outcomes are favorable for a certain event (a favorable outcome is impossible), the probability is 0. ) the second time will be the same as the first (i. The problem is: we want 1 novel and 1 reference work, but we don’t care which one was picked first. These notes can be used for educational purposes, pro-vided they are kept in their original form, including this title page. Probability concept includes some terms. 1 Probability Spaces. Measure Theory 1. Even though we discuss two events (usually labeled A and B), we’re really talking about performing one task (rolling dice, drawing cards, spinning a spinner, etc. Find the Standard Deviation of a random variable X whose probability density function is given by f(x) where: Solution. develop the theory, we will focus our attention on examples. Listed in the following table are problem sets and solutions. P(AjB) is read The probability of A given B. a Show that $$f\left( x \right)$$ is a probability density function. The mean is $100(7) + 200(4) = 1,500$ and the standard deviation is. Walpole Raymond H. The probability distribution given is discrete and so we can find the variance from the following: We need to find the mean μ first: Then we find the variance: Example 2. Instead of events being labeled A and B, the norm is to use X and Y. EXAMPLE: Suppose that three slips of paper have the names a, b, c. Here different types of examples will help the students to understand the problems on probability with playing cards. Plus, get practice tests, quizzes, and personalized coaching to help you succeed. Return from Examples of Probability Problems to Free Math Videos Online or to 8th Grade CTCT Math. The geometric probability is the area of the desired region (or in this case, not so desired), divided by the area of the total region. com Jobs & Careers 874,804 views 6:57. com or just starting a probability unit, you may want to take a look at the introductory probability lesson or the lesson on independent events. We randomly select 5 balls. Readers with a solid background in measure theory can skip Sections 1. random variables that take a discrete set of values. Kroese School of Mathematics and Physics The University of Queensland c 2018 D. Conditional probability is the probability of one event occurring with some relationship to one or more other events. This solutions manual provides answers for the even-numbered exercises in Probability and Statistical Inference, 8th edition, by Robert V. It is also suitable for self-study. Probability and statistics, the branches of mathematics concerned with the laws governing random events, including the collection, analysis, interpretation, and display of numerical data. If it isn't a trick coin, the probability of each simple outcome is the same. Example: toss a coin 100 times, how many Heads will come up? Probability says that heads have a ½ chance, so we can expect 50 Heads. Bonferroni's inequalities28 9. All Chapter 25 - Probability Exercise Questions with Solutions to help you to revise complete Syllabus and Score More marks. For example activity H here, we have the same exact thing, expected duration of 3 plus 4 times 6 plus 9 all divided by 6 to give you 6. Answers and links to explanations to these these GMAT probability problems are at the end of set. com or just starting a probability unit, you may want to take a look at the introductory probability lesson or the lesson on independent events. mathematics of probability theory, but also, through numerous examples, the many diverse possible applications of this subject. As we study a few probability problems, I will explain how "replacement" allows the events to be independent of each other. Probability calculator is a online tool that computes probability of selected event based on probability of other events. A life insurance salesman sells on the average 3 life insurance policies per week. These NCERT solutions play a. What is the probability to get a 6 when you roll a die? A die has 6 sides, 1 side contain the number 6 that give us 1 wanted outcome in 6 possible outcomes. Problems like those Pascal and Fermat solved continuedto influence such early researchers as Huygens, Bernoulli, and DeMoivre in establishing a mathematical theory of probability. Probability Distribution: A probability distribution is a statistical function that describes all the possible values and likelihoods that a random variable can take within a given range. Ma 162 Spring 2010 Ma 162 Spring 2010 April 21, 2010 Problem 1. It is known that probability that a randomly selected student who plays football also plays baseball is 0. Example: At a car park there are 100 vehicles, 60 of which are cars, 30 are vans and the remainder are lorries. The general situation, then, is the following: given a sequence of random variables,. probability with a view toward data science applications. Probability is finding the possible number of outcomes of the event occurrence. On inﬁnite sums19 6. Suppose you toss a fair coin. the basic concepts of a probability model and the axioms commonly assumed of probability models. Conditional Probability Homework Solutions 1. Example: the probability that a card is a four and red =p(four and red) = 2/52=1/26. This problem asked us to find some probabilities involving a spinner. You can think of this as a binomial with all failures. Spector and Mazzeo examined the effect of a teaching method known as PSI on the performance of students in a course, intermediate macro economics. a) We first construct a tree diagram to represent all possible distributions of boys and girls in the family. Example Questions Using Probability Formulas. If every vehicle is equally likely to leave, find the probability of: a) van leaving first. Probability can be expressed in a variety of ways including a mathematically formal way such as using percentages. Since there are 13 spades in the deck, the probability of drawing a spade is. (a) In how many ways can a committee of ﬁve consisting of 3 girls and 2 boys be chosen? (b) What is the probability that a committee of ﬁve, chosen at random from the class, consists of three girls and two boys? (c) How many of the possible committees of ﬁve have no boys?(i. Instructors may obtain all of the solutions by writing to either of the authors, at [email protected] For example, the length of time a person waits in line at a checkout counter or the life span of a light bulb. Example of Binomial Distribution and Probability This Tutorial will explain the Binomial Distribution, Formula, and related Discrete Probabilities Suppose you toss a coin over and over again and each time you can count the number of “Heads” you get. Just keep in mind that what conditional probability does for us is to adjust the denominator of our probability fraction to account for what we KNOW has already occurred. Probability is a branch of mathematics, and a lot of people have trouble with math. A college survey shows that 10% of freshmen, 15% of sophomores, 60% of juniors, and 85% of seniors like Probability. Compound event – an event with more than one outcome. Sometimes it can be computed by discarding part of the sample space. Sketch a graph. A first look at rigorous probability theory. This situation and all the problems any student faces nowadays became a reason to find a solution and create a website where students could find college homework help for the price they could afford. The meaning (interpretation) of probability is the subject of theories of probability. Exercises with both a short answer and a full solution are marked with and those with only a short answer are marked with (when more appropriate, for example, in "Show that " exercises, the short answer provides a hint to the key step). Example 2: Coin-A is tossed 200 times, and the relative occurrence of Tails is 0. Instead, we can usually define the probability density function (PDF). You can also get free sample papers, Notes, Important Questions. If it was, the probability of picking a red ball (etc. Theory of Probability (MATH230A/STAT310A, Fall 2007/08) The first quarter in a yearly sequence of probability theory. Identifying when a probability is a conditional probability in a word problem. , 10 trials), and the probability of getting "heads" was 0. This is COMPLETE Solution Manual for Probability and Statistics for Engineers and Scientists, 9th edition Ronald E. Find the z-scores that correspond to 33 minutes and 60 minutes. This presentation will be about examples of this form of mathematics in real life. The left side of the binomial probability function is written f(3|10,0. To determine whether to accept the shipment of bolts,the manager of the facility randomly selects 12 bolts. For example, if a traﬃc management engineer looking at accident rates wishes to. Find the z-scores that correspond to 33 minutes and 60 minutes. Read and learn for free about the following article: Conditional probability and independence If you're seeing this message, it means we're having trouble loading external resources on our website. For example, one way to partition S is to break into sets F and Fc, for any event F. Solution: No, we cannot, because the experiment (tossing the coin) may have been repeated a very small number of times, and thus the relative occurrence in such a scenario will not give the true probability. Free PDF download of NCERT Solutions for Class 10 Maths Chapter 15 - Probability solved by Expert Teachers as per NCERT (CBSE) Book guidelines. Exercise :: Probability - General Questions. We write P(AjB) = the conditional probability of A given B. Example: The door prize at a party with 25 people is given by writing numbers 1 through 25 on the bottom of the paper plates used. If a woman does not have breast cancer, the probability is 7 percent that she will still have a positive mammogram. n (E) = Number of ways of drawing 2 balls out of (2 + 3) balls. For Example, cancer is related to age, and then using Bayes theorem, a person’s age can be used to more accurately assess the probability that they have cancer, compared to the assessment of the probability of cancer made without knowledge of the person’s age. The coin toss is nothing but experimenting with tossing a coin. Spector and Mazzeo examined the effect of a teaching method known as PSI on the performance of students in a course, intermediate macro economics. Consider the coin flip experiment described above. Example: If a dice is thrown twice, find the probability of getting two 5's. Solution to Example 1. Theoretical probability is an approach that bases the possible probability on the possible chances of something happen. Probability and playing cards is an important segment in probability. Also, remember that you are comparing the number of ways the outcome can occur to the number of ways the outcome cannot occur (not the total outcomes). In statistics, the normal distributions are used to represent real-valued random variables with unknown distributions. If the joint probability of relaxed import restrictions and a price war is 0. Then we can apply the appropriate Addition Rule: Addition Rule 1: When two events, A and B, are mutually exclusive, the probability that A or B will occur is the sum of the probability of each event. The probability of a sample point is a measure of the likelihood that the sample point will occur. GMAT Advanced Probability Problems By Mike MᶜGarry on January 3, 2014 , UPDATED ON October 30, 2015, in GMAT Math In the following probability problems, problems #1-3 function as a set, problems #4-5 are another set, and problems #6-7 are yet another set. Normal Distribution Examples and Solutions. A probability distribution is a table or an equation that links each outcome of a statistical experiment with its probability of occurrence. Student's Solutions Guide for Introduction to Probability, Statistics, and Random Processes by Hossein Pishro-Nik | Jun 20, 2016 4. The series would last at most 4 games before either Team A wins two games or loses (to Team B) three games. troductory engineering courses in probability theory. P(freshman or sophomore) = 30/101 + 41/101 = 71/101. Coin-B is tossed an unknown number of times, but it. Thus the marginal probability distribution for A gives A's probabilities unconditional on B, in a margin of the table. The function f ( x ) is called a probability density function for the continuous random variable X where the total area under the curve bounded by the x -axis is equal to `1. Instead, we can usually define the probability density function (PDF). Formula for the probability of A and B (independent events): p(A and B) = p(A) * p(B). The problem is: we want 1 novel and 1 reference work, but we don’t care which one was picked first. 1 of the bags is selected at random and a ball is drawn from it. Probability distributions can, however, be applied to grouped random variables which gives rise to joint probability distributions. We can write this statement mathematically as follows: P(10≤ X ≤ 20) =. Durrett Probability: Theory and Examples 4th Edition. This solution contains questions, answers, images, explanations of the complete Chapter 15 titled Probability of Maths taught in Class 10. In probability theory and applications, Bayes' theorem shows the relation between a conditional probability and its reverse form. In the National Lottery, 6 numbers are chosen from 49. In what follows, S is the sample space of the experiment in question and E is the event of interest. You use probability in daily life to make decisions when you don't know for sure what the outcome will be. All Probability Exercise Questions with Solutions to help you to revise complete Syllabus and Score More marks. Distributions 3. On inﬁnite sums19 6. The graphs below show the radial wave functions. July 1, 2015. Therefore, both the events will have half probability. Binomial distribution problems for practice Binomial distribution practice problems Binomial distribution problem 1 Question (Binomial distribution problems): Expected value of a binomial random variable X is 10 and the probability of. We always give back probability in to all our clients, whether you are our long-term client or simply ordering for the first time. It is assessed by considering the event's certainty as 1 and impossibility as 0. We try to provide all types of shortcut tricks on probability problem on balls here. An event is an occurrence that can be determined by a given level of certainty. It includes the list of lecture topics, lecture video, lecture slides, readings, recitation problems, recitation help videos, tutorials with solutions, and a problem set with solutions. Introduction: Probability (from the Latin probare to prove, or to test) is a number between zero and one that shows how likely a certain event is. Probability distribution tables In this tutorial I show you how to construct probability distribution tables for a discrete random variable for three different type examples. Such random variables generally take a finite set of values (heads or tails, people who live in London, scores on an IQ test), but they can also include random. If the ball drawn is red, find the probability that it is drawn from the third bag. There are six ways to roll a 7 and two ways to roll an 11, so the probability of a natural is (6 + 2)/36 = 8/36 = 2/9. Scroll down the page for more examples and solutions of word problems that involve the probability of independent events. 11 If we toss a coin 1000 times and find that it comes up heads 532 times, we estimate the probability of a head coming up to be 532 1000 0. Binomial distribution problems for practice Binomial distribution practice problems Binomial distribution problem 1 Question (Binomial distribution problems): Expected value of a binomial random variable X is 10 and the probability of. An urn contains 5 red balls and 2 green balls. These NCERT solutions play a. This Aptitude Test Questions sections presents "Probability" solved problems. If it was, the probability of picking a red ball (etc. Examples of using the formula to find conditional probability In some situations, you will need to use the following formula to find a conditional probability. \ 1 P(5) 6 =. This sampling method is based on the fact that every member in the population has an equal chance of getting selected. What is the probability that the survey will show a greater percentage of. in Teachers. Distributions 3. probability of the event given that the other event has occurred. You can find several more examples here: Probability of A and B. 5L; also, on c, be careful about using the same set sizes to calculate the probability that the second student is taking a language class, since you’ve already chosen the first. An examples from ecology: How are species abundance estimates determined from small samples? To summarize: There are at least two uses for statistics and probability in the life sciences. Statistics Solutions is the country’s leader in probability and dissertation statistics. Statistics Solutions is the country's leader in probability and dissertation statistics. In other words, it is used to calculate the probability of an event based on its association with another event. problems included are about: probabilities, mutually exclusive events and addition formula of probability, combinations, binomial distributions, normal distributions, reading charts. In what follows, S is the sample space of the experiment in question and E is the event of interest. The mathematical and probability models of lottery provide information that players should know before they launch into a long-run play. Independence of three or more events34 12. 12 that she has exactly these two risk factors (but not the other). Probability concept includes some terms. It is less than 10 dollar. A team with equal numbers of men and women will have three men and three women. Binomial Distribution. P(AjB) is read The probability of A given B. 7) Anita randomly picks 4 cards from a deck of 52-cards and places them back into the deck ( Any set of 4 cards is equally likely ). Hoping that the book would be a useful reference for people who apply probability in their work, we have tried to emphasize the results that are important for applications, and illustrated their use with roughly 200 examples. org are unblocked. Step-by-step solutions provided. Student's Solutions Guide for Introduction to Probability, Statistics, and Random Processes - Kindle edition by Hossein Pishro-Nik. Student's Solutions Guide for Introduction to Probability, Statistics, and Random Processes by Hossein Pishro-Nik | Jun 20, 2016 4. Plus, get practice tests, quizzes, and personalized coaching to help you succeed. Introduction to Probability with Examples and Solutions Probability is a section of math that is essential in various aspects of life. The number of rainy days, Xcan be represented by a binomial distribution with n= 31trials (the number of days in the month of October), success probability p= 0:16(representing a rainy day) and failure probability q= 1 p= 0:84. It is not too much to say that the path of mastering statistics and data science starts with probability. Discrete probability distributions give the probability of getting a certain value for a discrete random variable. Visitors are requested to carefully read all shortcut examples. A simple example is the tossing of a fair (unbiased) coin. The pictures below depict the probability distributions in space for the Hydrogen wavefunctions. Binomial probability concerns itself with measuring the probability of outcomes of what are known as Bernoulli Trials, trials that are independent of each other and that are binary — with two possible outcomes. What is the probability of the occurrence of a number that is odd or less than 5 when a fair die is rolled. The results are summarised in the table below. The concept is very similar to mass density in physics: its unit is probability per unit length. There are two ways for it to win in three games: LWW or WLW; both occur with probability 1/8 so that the probability that Team A wins in exactly 3 games is also 1/4. In probability theory and applications, Bayes' theorem shows the relation between a conditional probability and its reverse form. Anyone has the right to use this work for any purpose, without any conditions, unless such conditions are required by law. Random Variables 4. So the probability of getting 2 blue marbles is: And we write it as "Probability of event A and event B equals the probability of event A times the probability of event B given event A" Let's do the next example using only notation:. Examples involving conditional probability Math 30530, Fall 2013 September 5, 2013 Math 30530(Fall 2012) Conditional examples September 5, 20131 / 5. Both the classical and frequency approaches have serious drawbacks, the first because the words "equally. For any two of the three factors, the probability is 0. example, what probability should we assign to the customer choosing soup and then the meat? If 8/10 of the customers choose soup and then 1/2 of these choose meat, a proportion 8=10 ¢1=2=4=10 of the customers choose soup and then meat. b) Find the mean and standard deviation of X. We provide examples on Probability problem on Balls shortcut tricks here in this page below. When we flip a coin there is always a probability to get a head or a tail is 50 percent. Joint Probability Distributions. Read and learn for free about the following article: Conditional probability and independence If you're seeing this message, it means we're having trouble loading external resources on our website. It provides mathematically complete proofs of all the essential introductory results of probability and measure theory. It shows the exact probabilities for a particular value of the random variable. This presentation will be about examples of this form of mathematics in real life. This is typically possible when a large number of random eﬀects cancel each other out, so some limit is involved. Conditional probability and independence31 11. The probability distribution given is discrete and so we can find the variance from the following: We need to find the mean μ first: Then we find the variance: Example 2. Genetics for Probability To provide a scientific context for our probability problems, we will use examples from genetics. Chapter 5: Normal Probability Distributions - Solutions Note: All areas and z-scores are approximate. Suppose you are a teacher at a university. Probability can be expressed in a variety of ways including a mathematically formal way such as using percentages. The solutions to these problems are at the bottom of the page. Formula sheet also available. However, there is a probability greater than zero than X. In addition, there are 6 outcomes that. A random variable, X, is a function from the sample space S to the real. Chapter 5: Normal Probability Distributions - Solutions Note: All areas and z-scores are approximate. Compound event – an event with more than one outcome. Find the Standard Deviation of a random variable X whose probability density function is given by f(x) where: Solution. Explore more on other related concepts @ BYJU'S. Suppose the reaction times of teenage drivers are normally distributed with a mean of 0. This course will guide you through the most important and enjoyable ideas in probability to help you cultivate a more quantitative worldview. Compute the probability of randomly drawing five cards from a deck and getting exactly two Aces. Plus, get practice tests, quizzes, and personalized coaching to help you succeed. You win if the 6 balls you pick match the six balls selected by the machine. Schaum's Outline of Probability and Statistics EXAMPLE 2. It provides mathematically complete proofs of all the essential introductory results of probability and measure theory. Suppose a simple random sample of 100 voters are surveyed from each state. \ 1 P(5) 6 =. And then in the next segment we'll look at Bayes theorem. Applied Problem Solving in a Workplace Contents Introduction 5 Theme A – Approaches to problem Solving 6 Recognising Complex Problems 6 Activity 1a Identifying complex problems. Therefore, both the events will have half probability. Enter the trials, probability, successes, and probability type. 5th edition correct mistakes in previous editions and has some more beautiful examples. This means that the probability of the coin landing on heads would be ½. A sample space (S) is a non empty set whose elements are called outcomes. The results are summarised in the table below. Ma 162 Spring 2010 Ma 162 Spring 2010 April 21, 2010 Problem 1. Independence 2. Probability: Theory and Examples Solutions Manual The creation of this solution manual was one of the most important im-provements in the second edition of Probability: Theory and Examples. What is the probability that a randomly chosen person in the class will weigh more than 160 lbs. • Probability of an event E = p(E) = (number of favorable outcomes of E)/(number of total outcomes in the sample space) This approach is also called theoretical probability. Solution; Determine the value of $$c$$ for which the function below will be a probability density function. This lesson describes how hypergeometric random variables, hypergeometric experiments, hypergeometric probability, and the hypergeometric distribution are all related. What is the probability that an. ©The McGraw-Hill Companies, Inc. The solutions given to the questions for the in between exercises and exercises given at the end of the chapter are prepared by our subject matter experts in a simple and lucid language. Answers and links to explanations to these these GMAT probability problems are at the end of set. Show that the solution $$X_t$$ of SDE examples, Stochastic Calculus The Probability Workbook is powered by WordPress at Duke WordPress Sites. Theoretical probability is an approach that bases the possible probability on the possible chances of something happen. P(B|A) is also called the "Conditional Probability" of B given A. We randomly select 5 balls. 1-9 A red die has face numbers {2, 4, 7, 12, 5, 11}. Here $Y=g(X)$, where $g$ is a differentiable function. E 2 = students in the debating team. 7) Anita randomly picks 4 cards from a deck of 52-cards and places them back into the deck ( Any set of 4 cards is equally likely ). If it isn't a trick coin, the probability of each simple outcome is the same. Students can get a fair idea on the probability questions which are provided with the detailed step-by-step answers to every question. Solution: No, we cannot, because the experiment (tossing the coin) may have been repeated a very small number of times, and thus the relative occurrence in such a scenario will not give the true probability. 2 Normal Distributions: Finding Probabilities If you are given that a random variable Xhas a normal distribution, nding probabilities. How is Chegg Study better than a printed A First Course In Probability 9th Edition student solution manual from the bookstore? Our interactive player makes it easy to find solutions to A First Course In Probability 9th Edition problems you're working on - just go to the chapter for your book. For this example, since the mean is 8 and the question pertains to 11 fires. All Probability Exercise Questions with Solutions to help you to revise complete Syllabus and Score More marks.


# Logarithmic Differentiation for Multivariable functions?

I was wondering if, and how exactly logarithmic differentiation may be applied to a multivariate function.

For example, I have been working with the function

$$f(x,y)=\frac{x-y}{x+y}$$

Does the following process hold? Specifically, does the chain rule step with del f hold?

$$\ln(f(x,y))=\ln(x-y)-\ln(x+y)$$

$$\Rightarrow \frac{1}{f(x,y)} \nabla f = \langle \frac{2y}{x^2-y^2} , \frac{-2x}{x^2-y^2} \rangle$$

Solving for $\nabla f$, does give me the correct answer. I'm wondering is my notation would be correct, and if this will ever not work.

Thanks for any help.

• If you are ok, you can accept the answer and set as solved. Thanks! – user Jan 4 '18 at 20:17

You define

$$g(x,y)=\ln(f(x,y))=\ln(x-y)-\ln(x+y)$$

and thus

$$\nabla g=\left(\frac{1}{f(x,y)}f_x,\frac{1}{f(x,y)}f_y\right)=\frac{1}{f(x,y)}\left(f_x,f_y\right)=\frac{1}{f(x,y)}\nabla f$$

• Ahhh, Okay, this seems very obvious now. Sorry if that was a dumb question. Thank you. – Kyle B Jan 3 '18 at 22:15
• @KyleB You are welcome! Bye – user Jan 3 '18 at 22:22

You could take a simpler function and checked whether it holds. The usual differentiation rules hold true for the gradient as well: sum, difference, product and quotient. For instance, $\nabla(fg)=g\nabla f+f\nabla g$, $\nabla(\frac{f}{g})=\frac{g\nabla f-f\nabla g}{g^2}$, $\nabla(\ln f)=\frac{\nabla f}{f}$.

Yes I really believe your result as well as your notation are correct. May be you just need to put it in a more general setting. I would suggest you to proceed as follows.

Suppose that $f:\mathbb{R}^n\to\mathbb{R}$, which is differentiable and strictly positive in a certain open set $U\subset\mathbb{R}^n$. Then the function $F=\ln\circ f$ is also differntiable on $U$ with: $\nabla F(x)=\ln'(f(x))\cdot \nabla f(x)=\frac{1}{f(x)}\cdot\nabla f(x)$ (chain rule). Hence we can solve for $\nabla f(x)$, as we are in vector space $\mathbb{R}^n$ and get the answer right.

Remember the chain rule statement: If $G$ and $H$ are differentianble functions and $F=H\circ G$ is well defined, then $F$ is also differentiable with $\nabla F(x)=\nabla H(G(x))\cdot\nabla G(x)$.


# Math Help - Complex roots of a quadratic equation

1. ## Complex roots of a quadratic equation

The question:

Use the properties of the complex conjugate to show that if the complex number 'z' is a root of a quadratic equation $ax^2 + bx + c = 0$ with a, b, c being real coefficients, then so is the conjugate of 'z'.

My attempt:

Let z = $z_{1} \pm z_2i$

$\frac{-b \pm \sqrt{b^2 - 4ac}}{2a} = z_{1} \pm z_2i$

$\frac{1}{2a}(-b \pm \sqrt{b^2 - 4ac}) = z_{1} \pm z_2i$

Basically, I changed the quadratic formula to look like a complex number in Cartesian form. Is this an acceptable answer? My textbook doesn't have solutions for 'show' and 'prove' questions.

Thanks!

2. The roots of $ax^2 + bx + c = 0$ are

$x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}$.

If $b^2 - 4ac < 0$ then that means $\sqrt{b^2 - 4ac}$ is imaginary. So we can say $\sqrt{b^2 - 4ac} = ni$, where $n$ is some multiple of $i$.

So $x = \frac{-b \pm n i}{2a}$

$= -\frac{b}{2a} \pm \left(\frac{n}{2a}\right)i$.

So the two roots are complex conjugates.

3. Ahh, thanks. So would my solution be acceptable, or should I simplify it like yours?

4. Originally Posted by Glitch
Ahh, thanks. So would my solution be acceptable, or should I simplify it like yours?
To be honest, I can't really follow your solution...

5. It's pretty much the same as yours, except you replaced the square root with 'ni'. I was trying to show that the general form of a complex number is equivalent to a simplified quadratic formula.

6. Originally Posted by Glitch
The question:
Use the properties of the complex conjugate to show that if the complex number 'z' is a root of a quadratic equation $ax^2 + bx + c = 0$ with a, b, c being real coefficients, then so is the conjugate of 'z'.
The standard way of proving the is to use properties of the complex conjugate.
If $a$ is a real number then $\overline{a}=a$.
The conjugate of a sum is the sum of conjugates.
Therefore we have:

$\overline {az^2 + bz + c} = \overline 0 = 0\, \Rightarrow \,a\overline z ^2 + b\overline z + c = 0$

7. Originally Posted by Glitch
The question:

Use the properties of the complex conjugate to show that if the complex number 'z' is a root of a quadratic equation $ax^2 + bx + c = 0$ with a, b, c being real coefficients, then so is the conjugate of 'z'.

My attempt:

Let z = $z_{1} \pm z_2i$

$\frac{-b \pm \sqrt{b^2 - 4ac}}{2a} = z_{1} \pm z_2i$

$\frac{1}{2a}(-b \pm \sqrt{b^2 - 4ac}) = z_{1} \pm z_2i$
But at this point you haven't yet said that $\sqrt{b^2- 4ac}$ is an imaginary number!

Basically, I changed the quadratic formula to look like a complex number in Cartesian form. Is this an acceptable answer? My textbook doesn't have solutions for 'show' and 'prove' questions.

Thanks!

8. Originally Posted by Plato
The standard way of proving the is to use properties of the complex conjugate.
If $a$ is a real number then $\overline{a}=a$.
The conjugate of a sum is the sum of conjugates.
Therefore we have:

$\overline {az^2 + bz + c} = \overline 0 = 0\, \Rightarrow \,a\overline z ^2 + b\overline z + c = 0$
...and it is true for every polynomial...

9. Fair point. So if I add:

When $b^2 - 4ac < 0$, $\sqrt{b^2 - 4ac} = ni, n \in R$

And replace the square root with the imaginary part 'n', would that suffice?

10. Hello, Glitch!

I have a very primitive solution . . .

Use the properties of the complex conjugate to show that
if the complex number $z$ is a root of a quadratic equation
$f(x) \:=\:ax^2 + bx + c = 0$ with $a, b, c$ real coefficients,
then so is the conjugate of $z.$

We are told that $z \:=\:p + qi$ is a solution of the quadratic.

. . Hence: . $a(p+qi)^2 + b(p+qi) + c \:=\:0$

This simplifies to: . $(ap^2 - aq^2 + bp + c) + q(2ap + b)i \;=\;0$

. . And we have: . $\begin{Bmatrix}ap^2 - aq^2 + bp + c \;=\;0 \\ q(2ap + b) \;=\;0 \end{Bmatrix}$

The conjugate of $z$ is: . $\overline z \:=\:p - qi$

Consider $f(\overline z) \;=\;a(p-qi)^2 + b(p-qi) + c$

. . . . . . . $f(\overline z) \;=\;\underbrace{(ap^2 - aq^2 + bp + c)}_{\text{This is 0}} - \underbrace{q(2ap + b)}_{\text{This is 0}}i$

$\text{Therefore: }\:f(\overline z) \,=\,0\:\text{ and }\:\overline z\text{ is also a solution.}$


# How to find precise value in terms of $\pi$

I've some argument like:

$$\arctan(\sqrt3 + 2)$$ and as explained here How to calculate $\arctan(\sqrt3-2)$ to be $-15°$ by hand? i made an assumption and found that it should be $\frac{5\pi}{12}$. I found the exact value of $\sqrt3 + 2$ then by table i found it's equal to $\tan(75^{\circ})$ and finally i found $\arctan(\tan(75^{\circ}))$ But what if i have something more complicated to do assumption on like:

$$\arccos({\frac{\sqrt{\sqrt3+2}}{2}})$$

So i'm interesting if there is any sequence of operations on argument itself to convert it into fraction of $\pi$ without guessing about how many it should be?

The best bet is to "unravel" the expression, try to simplify it by getting rid of roots and recognizing patterns:

$$\phi=\arccos\frac{\sqrt{\sqrt{3}+2}}{2}$$ $$\cos\phi=\frac{\sqrt{\sqrt{3}+2}}{2}$$ $$4\cos^2\phi=\sqrt{3}+2$$ $$2(2\cos^2\phi-1)=\sqrt{3}$$ $$2\cos2\phi=\sqrt{3}$$ $$\cos2\phi=\frac{\sqrt{3}}{2}$$ $$2\phi=\arccos\frac{\sqrt3}{2}=\frac{\pi}{6}$$ $$\phi=\frac{\pi}{12}$$

You'll always get some sort of polynomial in trigonometric functions. The goal is to reduce the degree of polynomial by using multiple angle formulas. If you don't recognize them yourself, you can take a look at Chebyshev polynomials of the first kind which tell you the multiple angle formulas: $\cos n\phi= T_n(\cos\phi)$. In this case, we recognized $T_2(x)=2x^2-1$.

Depending on how well twisted the expression is, you may have to get creative. There may be more than just multiple angle tricks: possibly, you have to use addition theorems as well, recognizing $\cos(x+y)$ where $x$ and $y$ are not equal, and so on. But the main trick is still just "undoing" the operations that you don't want to see.

• Yes, that's exactly what i was looking for. Thanks a lot! Dec 6 '17 at 9:06
• very nice derivation !
– user
Dec 6 '17 at 9:10

As $2+\sqrt3=\dfrac{(\sqrt3+1)^2}2$

$$\dfrac{\sqrt{2+\sqrt3}}2=\dfrac{\sqrt3+1}{2\sqrt2}=\cos30^\circ\cos45^\circ+\sin30^\circ\sin45^\circ=\cos(45^\circ-30^\circ)$$


# How to find this limit?

1. Mar 4, 2006

### pivoxa15

Find the limit as (x,y)->(0,0) for (yx^2)/(x^2+y^2)

If do this literally, I get 0/0 hence no limit but a limit does exist for this function. How do I get it? What is the general way to find the limits of multi variable functions?

2. Mar 4, 2006

### VietDao29

Ehh???
Who tells you that 0 / 0 means the limit does not exist there? It's one of the Indeterminate forms.
Generally, to find a limit of a 2 variable function, one can change it to polar co-ordinate, and go from there: $$x = r \cos \alpha \quad \mbox{and} \quad y = r \sin \alpha$$
Now (x, y) -> (0, 0) means that r -> 0, and $$\alpha$$ can take whatever value. So if you can show that when r -> 0, the expression will tend to some value independent of $$\alpha$$, then the limit exists there.
---------------
Example:
$$\lim_{\substack{x \rightarrow 0 \\ y \rightarrow 0}} \frac{x ^ 2 + y ^ 2}{xy}$$
Change it to polar form, we have:
$$\lim_{\substack{x \rightarrow 0 \\ y \rightarrow 0}} \frac{x ^ 2 + y ^ 2}{xy} = \lim_{r \rightarrow 0} \frac{r ^ 2}{r ^ 2 \sin \alpha \cos \alpha} = \lim_{r \rightarrow 0} \frac{1}{\cos \alpha \sin \alpha}$$
That means the limit of that expression does depend on $$\alpha$$, hence the limit does not exist at (0, 0).
Can you get this? :)

3. Mar 4, 2006

### moose

The way I would think about this one is that if x and y are approaching the same thing, why not set y equal to x? That way you would have x^3/2x^2
Now you can think about which one is changing faster, etc.

4. Mar 5, 2006

### pivoxa15

I see. It is clever. Is it the standard way of evaluating multivariable limits? What other ways are there?

5. Mar 5, 2006

### pivoxa15

Your method does not work in most cases.

6. Mar 5, 2006

### devious_

Other ways include approaching the point from various lines, e.g. if you're looking at (x,y) -> (0,0) then sometimes letting (x,y) approach the origin from the x-axis or the y-axis ((x,0) or (y,0)) can help you prove the limit doesn't exist.

7. Mar 5, 2006

### benorin

So we may, upon trying the limit along various curves such as y=x, y=x^2, the x-axis (e.g. y=0), the y-axis (e.g. x=0) which all give the value of the limit to be 0, conjecture the value of the limit to be 0. Now we must prove it:

To prove that $$\lim_{(x,y)\rightarrow (0,0)} \frac{yx ^ 2}{x^2 + y^2}=0,$$ we require that

$$\forall\epsilon >0, \exists \delta >0 \mbox{ such that } 0<\sqrt{x^2 + y^2}<\delta\Rightarrow \left| \frac{yx ^ 2}{x^2 + y^2}-0\right| < \epsilon$$

(and in case you didn't know, the symbol $$\forall$$ is read "for every", the symbol $$\exists$$ is read "there exists", and the symbol $$\Rightarrow$$ is read "implies".)

The proof is this: We will need the following inequality

$$0\leq y^2\Rightarrow x^2\leq x^2+y^2\Rightarrow \frac{x^2}{x^2+y^2}\leq 1.$$

Let us work the absolute value term contained in the $$\epsilon ,\delta$$ definition of the limit described above, we have

$$\left| \frac{yx ^ 2}{x^2 + y^2}-0\right| =\frac{|y|x ^ 2}{x^2 + y^2} =|y|\frac{x ^ 2}{x^2 + y^2} \leq |y| = \sqrt{y^2} \leq \sqrt{x^2+y^2} <\delta$$

we want to choose $$\delta$$ so that the absolute value term we just worked with is always less than $$\epsilon$$ given that $$0<\sqrt{x^2+y^2} <\delta .$$ Evidently, we may choose $$\delta =\epsilon$$ to this end, and the proof is complete upon stating this formally.

I know that PF does not permit full solutions to be posted, however it is understood that proofs of this sort are quite tricky to construct, examples are few in texts that require them, and I will have rendered sufficient pedagogical substance by even successfully relating it.

--Ben

EDIT: Thanks VietDao29, all that short-hand is Greek to me.

Last edited: Mar 5, 2006
8. Mar 5, 2006

### VietDao29

One more way is to use the inequality:
$$x ^ 2 + y ^ 2 \geq 2|xy|$$, one can prove it by doing a little rearrangement, and noticing the fact that: (|x| + |y|)2 >= 0.
I'll give one example that's similar to your problem.
----------------
Example:
Find:
$$\lim_{\substack{x \rightarrow 0 \\ y \rightarrow 0}} \frac{x ^ 3 y ^ 3}{x ^ 2 + y ^ 2}$$
Now using the inequality above, we have:
$$\left| \frac{x ^ 3 y ^ 3}{x ^ 2 + y ^ 2} \right| \leq \left| \frac{x ^ 3 y ^ 3}{2xy} \right| = \frac{1}{2} |x ^ 2 y ^ 2| = \frac{1}{2} x ^ 2 y ^ 2$$
Now as (x, y) tends to (0, 0),
$$\frac{1}{2} x ^ 2 y ^ 2 \rightarrow 0$$, hence $$\left| \frac{x ^ 3 y ^ 3}{x ^ 2 + y ^ 2} \right| \rightarrow 0$$, thus $$\frac{x ^ 3 y ^ 3}{x ^ 2 + y ^ 2} \rightarrow 0$$, so we can conclude that:
$$\lim_{\substack{x \rightarrow 0 \\ y \rightarrow 0}} \frac{x ^ 3 y ^ 3}{x ^ 2 + y ^ 2} = 0$$
Can you get this? :)
--------------
EDIT:
By the way, benorin:
That symbols is read Delta, the symbol that is read "there exists" should be $$\exists$$ .

Last edited: Mar 5, 2006
9. Mar 5, 2006

### pivoxa15

The method you used in your example looked a bit suspect.

If we follow your way and do the limit(x->0, y->0) of (xy)/(x^2+y^2)
we get the limit being smaller than 1/2 which is wrong since it should have no limit at all.

10. Mar 5, 2006

### Benny

Sorry to intrude on your topic but I would like to know if using polar coordinates is a valid method when the limit is (x,y) -> (0,0). Yes, the angle is arbitrary but each combination of a (r,angle) as r approaches zero corresponds to taking the limit along the straight line. Ie. not every single path is considered.

I can see that converting to polar coordinates is sufficient to verify that the limit does not exist. But is it sufficient to show that a limit exists? I apologise if I missed anything.

11. Mar 5, 2006

### HallsofIvy

Staff Emeritus
No, that's perfectly valid. You do not have to assume the angle is constant as r goes to 0. The point is that, in polar coordinates, the distance from the origin is measured by a single variable, r. r is completely independent of the angle. That was the point VietDao29 made in his first post- the limit, as r goes to 0, depended upon the angle and so the limit itself does not exist.

In your problem, $\frac{xy^2}{x^2+ y^2}$, changing to polar coordinates gives $\frac{r^3cos(\theta)sin^2(\theta)}{r^2}= r cos(\theta)sin^2(\theta)$. What does that go to as r goes to 0? Does it depend on $\theta$?

12. Mar 5, 2006

### Benny

Ok, that's good. Thanks for the clarification.

13. Mar 5, 2006

### VietDao29

Yes, the limit of:
$$\lim_{\substack{x \rightarrow 0 \\ y \rightarrow 0}} \frac{xy}{x ^ 2 + y ^ 2}$$ does not exist at (0, 0).
So by using the inequality x2 + y2 >= 2|xy|. We have:
$$\left| \frac{xy}{x ^ 2 + y ^ 2} \right| \leq \frac{1}{2} \left| \frac{xy}{xy} \right| = \frac{1}{2}$$
So that means:
$$-\frac{1}{2} \leq \frac{xy}{x ^ 2 + y ^ 2} \leq \frac{1}{2} \quad (*)$$. Hence, no conclusion can be drawn by looking at the inequality (*). Why? Because we don't know if the expression does converge to some value between -1 / 2, and 1 / 2; or it just diverges.
It's like the limit: $$\lim_{x \rightarrow \infty} \sin x$$ does not exist, although we know that: -1 <= sin(x) <= 1. It's because sin(x) does not tend to any specific number (i.e converges to any value) as x tends to infinity.
---------------
However, if we have $$\lim_{x \rightarrow \alpha} |f(x)| = 0$$, then we also have: $$\lim_{x \rightarrow \alpha} f(x) = 0$$. Why?
It's because $$\forall \varepsilon > 0, \exists \delta > 0 : 0 < |x - \alpha| < \delta \Rightarrow ||f(x)| - 0| = |f(x)| = |f(x) - 0| < \varepsilon$$. Now according to the definition of limit, we also have:
$$\lim_{x \rightarrow \alpha} f(x) = 0$$. Can you get this?
You can do the same to prove that if:
$$\lim_{\substack{x \rightarrow \alpha \\ y \rightarrow \beta}} |f(x, y)| = 0$$ then $$\lim_{\substack{x \rightarrow \alpha \\ y \rightarrow \beta}} f(x, y) = 0$$.
Can you get this? :)
---------------
Now just read my last post again to see if you can understand it.
:)

14. Mar 5, 2006

### benorin

Having verified it, I submit in passing that

$$-\frac{1}{2} \leq \frac{xy}{x ^ 2 + y ^ 2} \leq \frac{1}{2}$$

are the best bounds possible.

15. Mar 5, 2006

### pivoxa15

I see your point. Using polar coords to find limits of multivariable functions is better than your first principles method.

Where did you learn evaluating limits of multivarialbe functions using polar coords? I did not see them in calculus textbooks.

16. Mar 6, 2006

### VietDao29

Yes, using polar co-ordinate is far better, and easier than the second way. :)
And guess what? I learnt how to do it at this site, too... :tongue:

17. Mar 6, 2006

### HallsofIvy

Staff Emeritus
Yes, but that tells you nothing about whether the limit at (0,0) exists.

18. Mar 6, 2006

### benorin

Like I said, "in passing".

19. Mar 7, 2006

### pivoxa15

Are the functions we have been discussing 3D or 2D?

20. Mar 7, 2006

### benorin

Recall that z=f(x,y) is a surface, and hence 3-D.


# How to discuss coefficients in big-O notation

What notation is used to discuss the coefficients of functions in big-O notation?

I have two functions:

• $f(x) = 7x^2 + 4x +2$
• $g(x) = 3x^2 + 5x +4$

Obviously, both functions are $O(x^2)$, indeed $\Theta(x^2)$, but that doesn't allow a comparison further than that. How do I discuss the the coefficients 7 and 3. Reducing the coefficient to 3 doesn't change the asymptotic complexity but it still makes a significant difference to runtime/memory usage.

Is it wrong to say that $f$ is $O(7x^2)$ and $g$ is $O(3x^2)$ ? Is there other notation that does take coefficients into consideration? Or what would be the best way to discuss this?

• It's not wrong, it's just redundant, because $O(7 x^2) = O(x^2)$. – Oli Charlesworth Oct 7 '13 at 23:17
• See also our reference question. – Raphael Oct 28 '13 at 7:35

Big-$O$ and big-$\Theta$ notations hide coefficients of the leading term, so if you have two functions that are both $\Theta(n^2)$ you cannot compare their absolute values without looking at the functions themselves. It's not wrong per se to say that $7x^2 + 4x + 2 = \Theta(7x^2)$, but it's not informative because $7x^2 + 4x + 2 = \Theta(3x^2)$ is also true (and, in fact, it's $\Theta(kx^2)$ for any positive constant $k$).

There are other notations you might want to use instead. For example, $\sim$ notation is a much stronger claim than big-$\Theta$:

$\qquad \displaystyle f(x) \sim g(x) \iff \lim_{x \to \infty} \frac{f(x)}{g(x)} = 1$

For example, $7x^2 + 4x + 2 \sim 7x^2$, but the claim $7x^2 + 4x + 2 \sim 3x^2$ would be false. You can think of tilde notation as $\Theta$ notation that preserves the leading coefficients, which seems to be what you're looking for if you do care about the leading coefficient of the dominant growth term.

• Tilde notation is what I'm looking for. I was sure there was something I just couldn't recall what it was called and searches proved fruitless. Thanks! – El Bee Oct 7 '13 at 23:48

The tilde is one approach. If you want to stick with $O$, you could say

$\qquad f(x) = 7x^2 + O(x)$ and

$\qquad g(x) = 3x^2 + O(x)$.

• Even better: say f(x) = 7x^2 + o(x^2), using little-o notation to clarify that what's left is asymptotically smaller than x^2. – templatetypedef Oct 9 '13 at 4:06
• O(x) is strictly smaller than o(x^2), so using that would be less clear than using big-O. On the other hand, using little-o is definitely more common when you want to say that you've got the right first term, because then you don't need to worry about the next term. (And if we're wanting to be completely clear, then we would need to explain why we don't just write down 7x^2+4x+2 in the first place, since it is exactly correct. – Teepeemm Oct 9 '13 at 4:43
• You're absolutely right... my apologies! – templatetypedef Oct 9 '13 at 17:56
• Note that the rigorous way of writing this would be "$f(x) = 7x^2 + g(x)$ with $g(x) \in O(x)$". In any case, this is very useful if you want to fix more than the "first" constant; you can say "$f(x) = 7x^2 + 4x + O(1)$" which you can not do with $\sim$. – Raphael Oct 28 '13 at 7:29


# Permutations: How many outcomes have a 1 in them if P(n,k) = P(13,3) and the probability it will occur if randomly generated?

There is a set of numbers {1,2,3,4,5,6,7,8,9,10,11,12,13}. I am trying to find out how many subsets I can form that have 3 numbers in them and also the amount of subsets that will have a number 1 in them. Also, if I was to randomly generate a single outcome, what is the probability it will have a 1 in it if all outcomes have equal chance of occurring?

I know that the probability can be calculated from (Number of subsets that have 1 in them)/(Total number of permutations)

I figured out the Total total number of permutations = 13!/(13-3)! = 1716

But I can't figure out how to determine how many subsets will have a 1 in them. In addition to this, is there a way to generalise the method? For example, what if I would like to find out the number of subsets that have a number 1 and a number 2 in them for the same n and k parameters?

• For subsets do you mean ignoring order, which is usual, or considering order, which seems to be implied by your use of permutations? – Ross Millikan Feb 22 '18 at 15:49
• Oh in this problem I do want to consider order. So 1,2,3 is different from 1,3,2 and so on. – Lobster Feb 22 '18 at 16:04
• That is what I considered in my answer. You are then selecting three element permutations from thirteen, not a subset. As I commented on the other answer, the fraction that include $1$ is the same either way. – Ross Millikan Feb 22 '18 at 16:11

It looks like instead of subsets you mean three element permutations that include $1$. You can count those by choosing first the location of the $1$, which gives three choices, then the first other element, $12$, and the second other element, $11$ for a total of $3 \cdot 12 \cdot 11=396$. You are correct that the chance a random permutation includes a $1$ is $\frac {396}{1716}=\frac 3{13}$ This is not surprising as you are choosing three elements from thirteen.

To have both $1$ and $2$ you have three places to put the $1$, two places for the $2$, and $11$ choices for the third number.

• Thanks! This was a great help! – Lobster Feb 22 '18 at 16:16

This is not actually a case of permutation, but rather a case of combination. Because in a subset, the arrangement of the numbers are not important. Therefore it is the use of combinations and not permutations.

Subset 3 numbers in them = 13C3 = 286 - choosing 3 numbers out of 13

Subset 3 numbers with 1 in them = 12C2 = 66 - choosing 2 numbers given one of the number is 1 (there is only 12 numbers to pick, because 1 is chosen by default)

• You can use either permutations or combinations as long as you are consistent. The probability of having a $1$ comes out $\frac 3{13}$ eitherj way, as it should. There are $3!$ times more total permutations and $3!$ times more that include a $1$. – Ross Millikan Feb 22 '18 at 15:56
• Welcome to MSE. Please use MathJax. – José Carlos Santos Feb 22 '18 at 16:01
• Oh right, i forgot to answer the probability. You are absolutely right about the consistency part, and both method works. My only concern is about technicality especially with subsets, because with other question (not the probability one), the answer may be different, due to order being considered. – Zirc Feb 22 '18 at 16:02


Question

# The chance that Doctor A will diagonise disease X correctly is $$60\%$$. The chance that a patient will die by his treatment after correct diagnosis is $$40\%$$ and the chance of death after wrong diagnosis is $$70\%.$$ A patient of Doctor A who had disease X died. The probability that his disease was diagonised correctly is

A
513
B
613
C
213
D
713

Solution

## The correct option is D $$\dfrac{6}{13}$$Let us define the following events.$${ E }_{ 1 }:$$ Disease $$X$$ is diagnosed correctly by doctor $$A$$.$${ E }_{ 2 }:$$ Disease $$X$$ is not diagnosed correctly by doctor $$A$$.$$B:$$ A patient (of doctor $$A$$) who has disease $$X$$ dies.Then, we are given, $$P({ E }_{ 1 })=0.6$$,$$P({ E }_{ 2 })=1-P({ E }_{ 1 })=1-0.6=0.4$$and $$\displaystyle P\left( \frac { B }{ { E }_{ 1 } } \right) =0.4$$, $$\displaystyle P\left( \frac { B }{ { E }_{ 2 } } \right) =0.7$$By Bay's Theorem$$\displaystyle P\left( \frac { { E }_{ 1 } }{ B } \right) =\frac { P\left( { E }_{ 1 } \right) P\left( \frac { B }{ { E }_{ 1 } } \right) }{ P\left( { E }_{ 1 } \right) P\left( \frac { B }{ { E }_{ 1 } } \right) +P\left( { E }_{ 2 } \right) P\left( \frac { B }{ { E }_{ 2 } } \right) }$$$$\displaystyle=P\left( \frac { { E }_{ 1 } }{ B } \right) =\frac { 0.6\times 0.4 }{ 0.6\times 0.4+0.4\times 0.7 } =\frac { 0.24 }{ 0.24+0.28 } =\frac { 0.24 }{ 0.52 } =\frac { 6 }{ 13 }$$Mathematics

Suggest Corrections

0

Similar questions
View More

People also searched for
View More


# In $\mathbb{R}^4$, let $U=$ span$\{(1,1,0,0),(1,1,1,1)\}$.

(a) Compute an orthonormal basis for $U$.

(b) Find $u\in U$ such that the Euclidean distance $||u-(1,2,3,4)||$ is as small as possible.

Here's what I have:

(a) To find an orthonormal basis, we'll use the Gram-Schmidt Algorithm. The process is as follows:

Given $k$ basis vectors $v_1,v_2,\cdots,v_k$, we apply the following steps:

1. Let $q_1=\frac{1}{||v_1||}v_1$.
2. For $i=2$ to $k$, repeat steps 3 and 4.
3. Let $w_i=v_i-\langle q_1,v_i\rangle q_i-\langle q_2,v_i\rangle q_2-\cdots-\langle q_{i-1},v_i\rangle q_{i-1}$
4. Let $q_i=\frac{1}{||w_i||}w_i$

The vectors $q_1,\cdots q_k$ are our orthonormal basis. Now, we apply these steps to the given problem. $$q_1=\frac{1}{||v_1||}v_1=\frac{1}{\sqrt{2}}v_1=(\frac{1}{\sqrt{2}},\frac{1}{\sqrt{2}},0,0)$$ $$w_2=v_2-\langle q_1,v_2\rangle q_1=(1,1,1,1)-(\frac{1}{\sqrt{2}}+\frac{1}{\sqrt{2}})(\frac{1}{\sqrt{2}},\frac{1}{\sqrt{2}},0,0)=(0,0,1,1)$$ $$q_2=\frac{1}{\sqrt{2}}w_2=(0,0,\frac{1}{\sqrt{2}},\frac{1}{\sqrt{2}})$$ So $\{q_1,q_2\}$ is an orthonormal basis for $U$.

(b) I recognize this as a least squares problem, but I'm a bit lost on how to actually set it up, because we don't have something with the form $Ax\approx b$. I mean, I know that $b=(1,2,3,4)$ and $u$ somehow represents $Ax$, but we don't have a matrix $A$, and $u$ is just an element of the span of $2$ vectors.

• Hint: the underlying mechanism of the solution to the least-squares problem you’re familiar with is orthogonal projection onto a vector space. – amd Jan 7 '18 at 4:47

Your proof for part (a) is correct. For part (b) let $$u=(\alpha , \alpha ,\beta ,\beta)$$ You need to minimize $$(\alpha -1)^2+( \alpha -2)^2 + (\beta -3)^2+ (\beta-4)^2.$$ Partial derivatives are zero at $\alpha = 3/2$ and $\beta =7/2$. Thus $u=(3/2, 3/2, 7/2,7/2)$is the desired vector.

• Do you think you could elaborate on this a bit? Is the choice that $u=(\alpha,\alpha,\beta,\beta)$ from the fact that the vectors that span $U$ have the same first two entries? – Atsina Jan 7 '18 at 5:06
• Sure. From your part (a), you have found a basis in form of (1,1,0,0) and (0,0,11). $u=(\alpha,\alpha,\beta,\beta)=\alpha (1,1,0,0)+\beta (0,0,1,1)$ – Mohammad Riazi-Kermani Jan 7 '18 at 5:20

Because you have an orthonormal basis, things become increasingly easy.

The least squares problem is solved by

$$x_{ls} = (A^TA)^{-1}(A^Tb)$$

Where $A$ is a matrix which has your basis as columns and $b$ is $<1,2,3,4>$. Solve this for $x_{ls}$ and then the solution is $Ax_{ls}$.

• This is more along the lines of what I was searching for, but Mohammad's solution is slightly less computationally intensive. I wish I could accept multiple answers. – Atsina Jan 7 '18 at 6:02
• @Atsina Because there is an orthonormal basis for the subspace, things are even easier than what been written here: $A^TA=I_2$, so your equation reduces to $x_{ls}=A^Tb$ and $u=AA^Tb=(u_1^Tb)u_1+(u_2^Tb)u_2$, i.e., it’s the sum of the orthogonal projections onto the basis vectors. – amd Jan 11 '18 at 1:10

The shortest distance to $U$ is measured along a direction orthogonal to it, therefore the element of $U$ that minimizes the distance to a given vector $b$ is the orthogonal projection of $b$ onto $U$, that is, the component of $b$ that lies in $U$.

There are various ways to compute this projection, but since you’ve already constructed an orthonormal basis for $U$, the easiest thing to do is to compute the individual projections onto the basis vectors and combine them. In fact, this is exactly what you do at each step of the Gram-Schmidt process: you compute the orthogonal projection of the current vector onto the space spanned by the orthonormal basis vectors generated up to that point and subtract that projection from the vector to get its component that doesn’t lie in that span. So, using that projection formula from the Gram-Schmidt process, \begin{align} u = (u_1^Tb)u_1+(u_2^Tb)u_2 &= \frac3{\sqrt2}\left(\frac1{\sqrt2},\frac1{\sqrt2},0,0\right)+\frac7{\sqrt2}\left(0,0,\frac1{\sqrt2},\frac1{\sqrt2}\right) \\ &= \left(\frac32,\frac32,\frac72,\frac72\right). \end{align}

The connection to finding a least-squares solution to the possibly-inconsistent linear system $Ax=b$ is that you essentially replace $b$ with its orthogonal projection onto the column space of $A$.

Muhammad gave you a nice way using partial derivative so I'll just throw out here another way without using derivatives

The shortest distance to a plane create angle of $\pi/2$, so let's create the vector $\vec v=\begin{bmatrix}1-a\\2-a\\3-b\\4-b\end{bmatrix}$, this vector is the vector from the point $(1,2,3,4)$ to an arbitrary point on the plane.

I want that this arbitrary point on the plane will minimize $\vec v$, so I'll check when the vector create angle of $\pi/2$ to the plane($\langle\cdot,\cdot\rangle$ is the dot product):$$\langle\vec v,(1,1,0,0)\rangle=0\\\langle\vec v,(0,0,1,1)\rangle=0$$here I get 2 equations: $(1-a)1+(2-a)1=0\implies a=1.5$ and $(3-b)1+(4-b)1=0\implies b=3.5$ thus the answer is $u=(1.5,1.5,3.5,3.5)$


Question

# Find the vector equation of the plane passing through the points $$(2, 1, -1)$$ and $$(-1, 3, 4)$$ and perpendicular to the plane $$x - 2y + 4z = 10.$$ Also show that the plane thus obtained contains the line $$\vec{r} = -\hat{i} + 3\hat{j} + 4\hat{k} + \lambda(3 \hat{i} - 2\hat{j} - 5\hat{k}).$$

Solution

## Let the equation of plane through $$(2, 1, -1)$$ be$$a(x - 2) + b(y - 1) + c(z + 1) = 0 ....(i)$$$$\because (i)$$ passes through $$(-1, 3, 4)$$$$\therefore a (-1 - 2) + b (3 - 1) + c (4 + 1) = 0$$$$\Rightarrow -3a + 2b + 5c = 0 ...(ii)$$Also plane (i) is perpendicular to plane $$x - 2y + 4z = 10$$$$\Rightarrow \vec{n_1} \perp \vec{n_2} \Rightarrow \vec{n_1}. \vec{n_2} = 0$$$$\therefore 1a - 2b + 4c = 0 ...(iii)$$From (ii) and (iii), we get$$\dfrac{a}{8 + 10} = \dfrac{b}{5 + 12} = \dfrac{c}{6 - 2} \Rightarrow \dfrac{a}{18} = \dfrac{b}{17} = \dfrac{c}{4} = \lambda (say)$$$$\Rightarrow a = 18\lambda, b = 17\lambda, c = 4\lambda$$Putting the value of a, b, c in (i), we get$$18\lambda (x - 2) + 17\lambda (y - 1) + 4\lambda (z + 1) = 0$$$$\Rightarrow 18x - 36 + 17y - 17 + 4z + 4 = 0$$$$\Rightarrow 18x + 17y + 4z = 49$$$$\therefore$$ Required vector equation of plane is$$\vec{r}. (18\hat{i} + 17\hat{j} + 4\hat{k}) = 49 ...(iv)$$Obviously plane (iv) contains the line$$\vec{r} = (-\hat{i} + 3\hat{j} + 4\hat{k}) + \lambda (3\hat{i} - 2\hat{j} - 5\hat{k}) ....(v)$$Since, point $$(-\hat{i} + 3\hat{j} + 4\hat{k})$$ satisfy equation (iv) and vector $$(18\hat{i} + 17\hat{j} + 4\hat{k})$$ is perpendicular to, $$(3\hat{i} - 2\hat{j} + 5\hat{k}),$$ as $$(-\hat{i} + 3\hat{j} + 4\hat{k}). (18\hat{i} + 17\hat{j} + 4\hat{k}) = -18 + 51 + 16 = 49$$ and $$(18\hat{i} + 17\hat{j} + 4\hat{k} ). (3\hat{i} - 2\hat{j} - 5\hat{k}) = 54 - 34 - 20 = 0$$Therefore, (iv) contains line (v).Mathematics

Suggest Corrections

0

Similar questions
View More

People also searched for
View More


Riemann Sum Approximations: When are trapezoids more accurate than the middle sum?

We can approximate a definite integral, $\int_a^b f(x)dx$, using a variety of Riemann sums. If $T_n$ and $M_n$ are the nth sums using the trapezoid and midpoint (middle) sum methods and if the second derivative of $f$ is bounded on $[a, b]$ then does the following theorem imply that $M_n$ "tends to be more accurate" then $T_n$?

If $f''$ is continuous on $[a, b]$ and $|f''(x)| \leq K$, $\forall$ $x \in [a, b]$. Then,

$\left| \int_a^b f(x)dx - T_n \right| \leq K\frac{(b-a)^3}{12n^2}$

and

$\left| \int_a^b f(x)dx - M_n \right| \leq K\frac{(b-a)^3}{24n^2}$

For this question let, $E_{T_n} = \left| \int_a^b f(x)dx - T_n \right|$ and $E_{M_n} = \left| \int_a^b f(x)dx - T_n \right|$

The theorem is presented (without proof) in a calculus 2 book. It only really seems to imply that, we can with 100% certainly bound E_{M_n} smaller than we can bound E_{T_n}. But, that says nothing about the actual values of E_{T_n} or E_{M_n}.

So, isn't it possible to customize a function so that $E_{T_n} < E_{M_n}$ for a particular n? Could we even make a function so that $E_{T_n} < E_{M_n}$ $\forall n$?

• For a particular $n$, absolutely: that's equivalent to doing it for $n=1$ and replicating the function across multiple intervals. Just consider any function satisfying $f(0)=f(1)=0$ and $\int_0^1 f(x)\, dx = 0$, but $f(1/2) \ne 0$. Then $E_T = 0$ but $E_M$ can be as large as you want (by rescaling $f$). May 4, 2016 at 8:40
• This shows $T = 0$, not $E_T = 0$.
– RRL
May 5, 2016 at 2:20
• Although the Midpoint Rule is typically more accurate, it should be said that the Trapezoid Rule can be used to get $guaranteed$ upper and lower bounds for integrals of concave and convex functions respectively, which cannot be said for the Midpoint Rule.
– user123641
Oct 30, 2017 at 15:56

As you observed, the midpoint method is typically more accurate than the trapezoidal method. This is suggested by the composite error bounds, but they don't rule out the possibility that the trapezoidal method might be more accurate in some cases.

We can get a better understanding by examining the local errors for single-segment rules. Consider an interval $[a,b]$ and define interval length $h = b-a$ and midpoint $c = (a+b)/2.$ Note that $b-c = c-a = (b-a)/2 = h/2.$

The midpoint error is

$$E_M = f(c)h - \int_a^b f(x) \, dx = \int_a^b [f(c) - f(x)] \, dx.$$

Using a second-order Taylor approximation,

$$f(c) = f(x) + f'(x)(c-x) + \frac{1}{2} f''(\xi_x)(x-c)^2,$$

we see

$$E_M = -\int_a^b f'(x)(x-c) \, dx + \frac{1}{2}\int_a^b f''(\xi_x)(x-c)^2 \, dx.$$

Applying integration by parts to the first integral on the RHS we get

$$\int_a^b f'(x)(x-c) = \left.(x-c)f(x)\right|_a^b - \int_a^b f(x) \, dx = \frac{h}{2}[f(a) + f(b)] - \int_a^b f(x) \, dx .$$

Note that this result gives us the error $E_T$ for the trapezoidal method.

Hence,

$$E_M = -E_T + \frac{1}{2}\int_a^b f''(\xi_x)(x-c)^2 \, dx.$$

It is actually not that easy to find examples where $|E_T| < |E_M|$. Using the above result, we can surmise that this could happen when the midpoint method overestimates, $E_M > 0$, the trapezoidal method underestimates $E_T < 0,$ and we have high curvature in a small neighborhood of a point in the interval.

Here is a somewhat contrived example.

Consider the following function that meets those requirements. Note that the second derivative is piecewise continuous but bounded -- which does not degrade the composite $O(n^{-2})$ accuracy.

$$f(x) = \begin{cases} 0.25 + 0.75\exp(-200 x^2), &\mbox{if } -1 \leqslant x \leqslant 0 \\ 0.99 + 0.01 \cos(\pi x), &\mbox{if } \,\,\,\,\,\,\, 0 < x \leqslant 1 \end{cases}.$$

Then

\begin{align}\int_{-1}^1 f(x) \, dx &\approx 1.2870\\ M &\approx 2 \\ T &\approx 1.2300 \\ E_M &\approx 0.7130 \\ E_T &\approx 0.0570 \end{align}

• I think you can use periodic smooth functions to get non-contrived examples.
– Ian
May 5, 2016 at 2:49


+0

# If three runners receive medals how many ways can the three medalists be chosen out of a field of 28?

0
457
3
+8

Is it 28 x 27 x 26?

peacemantle  May 2, 2015

### Best Answer

#2
+92749
+10

Badinage, you are right.

There are 28 ways for the first, 27 ways for the second and 26 ways for the 3rd   That is 28*27*26

BUT it doesn't matter what order they are chosen.  so you have to divide by 3! = 6

$${\frac{{\mathtt{28}}{\mathtt{\,\times\,}}{\mathtt{27}}{\mathtt{\,\times\,}}{\mathtt{26}}}{{\mathtt{6}}}} = {\mathtt{3\,276}}$$

this is how I would normally do it

28C3

$${\left({\frac{{\mathtt{28}}{!}}{{\mathtt{3}}{!}{\mathtt{\,\times\,}}({\mathtt{28}}{\mathtt{\,-\,}}{\mathtt{3}}){!}}}\right)} = {\mathtt{3\,276}}$$

Melody  May 2, 2015
#1
+520
+8

Yes, that's the answer your teacher is seeking.

However,  as a challenge extension you could extend this to include ties, e.g., from 2 up to 28 ties for first, up to 27 ties for second, etc.     I'm not sure how to do this, though, and it sounds complicated.

# 🌹  🌹  🌹  🌹  🌹  🌹  🌹  🌹

.

Badinage  May 2, 2015
#2
+92749
+10
Best Answer

Badinage, you are right.

There are 28 ways for the first, 27 ways for the second and 26 ways for the 3rd   That is 28*27*26

BUT it doesn't matter what order they are chosen.  so you have to divide by 3! = 6

$${\frac{{\mathtt{28}}{\mathtt{\,\times\,}}{\mathtt{27}}{\mathtt{\,\times\,}}{\mathtt{26}}}{{\mathtt{6}}}} = {\mathtt{3\,276}}$$

this is how I would normally do it

28C3

$${\left({\frac{{\mathtt{28}}{!}}{{\mathtt{3}}{!}{\mathtt{\,\times\,}}({\mathtt{28}}{\mathtt{\,-\,}}{\mathtt{3}}){!}}}\right)} = {\mathtt{3\,276}}$$

Melody  May 2, 2015
#3
+520
+5

Yes, you are right, Melody. The question doesn't say 1st, 2nd and 3rd places. Maybe there are 3 runners who are to be awarded a medal for being a comically costumed competitor for St Patrick's Day, or some such.

Badinage  May 3, 2015

### New Privacy Policy

We use cookies to personalise content and advertisements and to analyse access to our website. Furthermore, our partners for online advertising receive information about your use of our website.
For more information: our cookie policy and privacy policy.


# Math Help - recurrence relations

1. ## recurrence relations

1)
Find a recurrence relation for the number of bit string of length n that contain three consecutive 0's
What are the initial conditions? how many bit strings of length 7 contain three consecutive 0's?

2)
Give the recursive algorithm for finding the minimum of a finite set of
integers.

3)
Find the solution to the following recurrence relation and initial
condition:
xn+2 = 4xn; n = 0, 1, 2, ... x0 = 2, x1 = 1.

4)
Give the recursive algorithm for finding the sum of the first n odd
positive integers.

5)
Find the solution to the following recurrence relation and initial
condition:
xn+2 = 2xn+1 + 3xn; n = 0, 1, 2, ... x0 = 1, x1 = -1.

2. Hello, narbe!

5) Find the solution to the following recurrence relation and initial condition:

. . $x_{n+2} \:= \:2x_{n+1} + 3x_n\qquad x_0 = 1,\;\;x_1 = \text{-}1$
Crank out the new few terms . . .

. . $\begin{array}{ccccc} x_2 &=&2(\text{-}1) + 3(1) &=& 1 \\
x_3 &=& 2(1) + 3(\text{-}1) &=& \text{-}1 \\
x_4 &=& 2(\text{-}1) + 3(1) &=& 1 \\
x_5 &=& 2(1) + 3(\text{-}1) &=& \text{-}1 \\
\vdots & & \vdots & & \vdots \end{array}$

Got it?

3. ## yeah but ...

yes I got the solution! but how can I demonstrate it as a function ??????

4. Originally Posted by narbe
1)
Find a recurrence relation for the number of bit string of length n that contain three consecutive 0's
What are the initial conditions? how many bit strings of length 7 contain three consecutive 0's?
I think it's easiest to count the number of strings of length n that do not contain three consecutive zeros. Call this number $y_n$.

We can get a string of length n+1 without three consecutive zeros in three ways: (1) take such a string of length n and add a 1 at the end, (2) take such a string of length n-1 and add 10 at the end, (3) take such a string of length n-2 and add 100 at the end. Therefore $y_{n+1} = y_n+y_{n-1}+y_{n-2}$.

Now let $x_n$ denote the number of strings of length n that do contain three consecutive zeros. There are altogether $2^n$ strings of length n, so $x_n = 2^n-y_n$. It easily follows from the relation for the y's that $x_{n+1} = x_n+x_{n-1}+x_{n-2}+2^{n-2}$. The initial conditions are $x_1=x_2=0,\ x_3=1$. From there, you can use the recurrence relation to work your way up to 7. (I get the answer $x_7=47$, but don't rely on my arithmetic.)

5. Hello, narbe!

It's easy . . .

Look at the terms:

. . $\begin{array}{ccccc}x_0 &=& 1 \\ x_1 &=& \text{-}1 \\ x_2 &=& 1 \\ x_3 &=& \text{-}1 \\ \vdots \\ x_n &=& (\text{-}1)^n & \Leftarrow &\text{There!}\end{array}$

6. Originally Posted by narbe
3) Find the solution to the following recurrence relation and initial
condition:
x_{n+2}= 4x_{n}; n = 0, 1, 2, ... x_{0} = 2, x_{1} = 1.
This is a second order difference equation with a constant coefficient, there is a very simple way for this equation.
Such equations have solution of the type $x(n)=c_{1}\lambda_{1}^{n}+c_{2}\lambda_{2}^{n}$ for $n\in\mathbb{N}$, where $c_{1},c_{2}$ are arbitrary constants.
Just substitute this value into the solution and solve $\lambda_{1}$ and $\lambda_{2}$, then use these values together with the initial conditions to find the desired solution.

However, here, I would like to show you a different solution way for this equation.
First set, $y(n):=x(2n)$ for $n\in\mathbb{N}$, then from the equation, we get
$y(n+1)=x(2n+2)=4x(2n)=4y(n)$ or simply $y(n+1)=4y(n)$ for $n\in\mathbb{N}$.
It is easy to solve this equation and we get $y(n)=c_{1}4^{n}$ for all $n\in\mathbb{N}$, where $c_{1}$ is an arbitrary constant.
Since $y(0)=x(0)=2$, we see that $c_{1}=2$.
Thus, we have $x(n)=24^{n/2}=2^{n+1}$ is a solution of the equation.

Next, set $z(n):=x(2n-1)$ for $n\in\mathbb{N}$ and solve $z(n+1)=x(2(n+1)-1)=x(2n+1)=4x(2n-1)=z(n)$ or simply $z(n+1)=4z(n)$ for $n\in\mathbb{N}$ with $z(1)=x(1)=1$.

Finally, sum these results.


# How and How Not to Compute a Relative Error

The relative error in a scalar $y$ as an approximation to a scalar $x$ is the absolute value of $e = (x-y)/x$. I recently came across a program in which $e$ had been computed as $1 - y/x$. It had never occurred to me to compute it this way. The second version is slightly easier to type, requiring no parentheses, and it has the same cost of evaluation: one division and one subtraction. Is there any reason not to use this parenthesis-free expression?

Consider the accuracy of the evaluation, using the standard model of floating point arithmetic, which says that $fl(x \mathbin{\mathrm{op}} y) = (x \mathbin{\mathrm{op}} y)(1+\delta)$ with $|\delta| \le u$, where $\mathrm{op}$ is any one of the four elementary arithmetic operations and $u$ is the unit roundoff. For the expression $e_1 = (x-y)/x$ we obtain, with a hat denoting a computed quantity,

$\widehat{e_1} = \displaystyle\left(\frac{x-y}{x}\right) (1+\delta_1)(1+\delta_2), \qquad |\delta_i| \le u, \quad i = 1, 2.$

It follows that

$\left| \displaystyle\frac{e - \widehat{e_1}}{e} \right| \le 2u + u^2.$

Hence $e_1$ is computed very accurately.

For the alternative expression, $e_2 = 1 - y/x$, we have

$\widehat{e_2} = \left(1 - \displaystyle\frac{y}{x}(1+\delta_1)\right) (1+\delta_2), \qquad |\delta_i| \le u, \quad i = 1, 2.$

After a little manipulation we obtain the bound

$\left| \displaystyle\frac{e - \widehat{e_2}}{e} \right| \le u + \left|\displaystyle\frac{1-e}{e}\right|(u + u^2).$

The bound on the relative error in $\widehat{e_2}$ is of order $|(1-e)/e|u$, and hence is very large when $|e| \ll 1$.

To check these bounds we carried out a MATLAB experiment. For 500 single precision floating point numbers $y$ centered on $x = 3$, we evaluated the relative error of $y$ as an approximation to $x$ using the two formulas. The results are shown in this figure, where an ideal error is of order $u \approx 6\times 10^{-8}$. (The MATLAB script that generates the figure is available as this gist.)

As expected from the error bounds, the formula $1-y/x$ is very inaccurate when $y$ is close to $x$, whereas $(x-y)/x$ retains its accuracy as $y$ approaches $x$.

Does this inaccuracy matter? Usually, we are concerned only with the order of magnitude of an error and do not require an approximation with many correct significant figures. However, as the figure shows, for the formula $|1-y/x|$ even the order of magnitude is incorrect for $y$ very close to $x$. The standard formula $|x-y|/|x|$ should be preferred.

## 2 thoughts on “How and How Not to Compute a Relative Error”

1. Raúl Martínez says:

Nick,

Thank you for delving into this. Your result is certainly far from obvious and I find it very helpful. In my own work, I don’t recall computing the relative error using 1–y/x (though I cannot be certain), but I have sometimes used the latter expression in writing. After reading your note, I can see that such usage could mislead a reader into using that expression for computation, so I’ll be mindful not to use it in the future.

Sincerely,

Raúl Martínez

2. For interested parties I converted Nick’s gist above to Python:

This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters

 # Based on the code by Nick Higham # Compares relative error formulations using single precision and compared to double precision N = 501 # Note: Use 501 instead of 500 to avoid the zero value d = numpy.finfo(numpy.float32).eps * 1e4 a = 3.0 x = a * numpy.ones(N, dtype=numpy.float32) y = [x[i] + numpy.multiply((i – numpy.divide(N, 2.0, dtype=numpy.float32)), d, dtype=numpy.float32) for i in range(N)] # Compute errors and "true" error relative_error = numpy.empty((2, N), dtype=numpy.float32) relative_error[0, :] = numpy.abs(x – y) / x relative_error[1, :] = numpy.abs(1.0 – y / x) exact = numpy.abs( (numpy.float64(x) – numpy.float64(y)) / numpy.float64(x)) # Compute differences between error calculations error = numpy.empty((2, N)) for i in range(2): error[i, :] = numpy.abs((relative_error[i, :] – exact) / numpy.abs(exact)) fig = plt.figure() axes = fig.add_subplot(1, 1, 1) axes.semilogy(y, error[0, :], '.', markersize=10, label="$|x-y|/|x|$") axes.semilogy(y, error[1, :], '.', markersize=10, label="$|1-y/x|$") axes.grid(True) axes.set_xlabel("y") axes.set_ylabel("Relative Error") axes.set_xlim((numpy.min(y), numpy.max(y))) axes.set_ylim((5e-9, numpy.max(error[1, :]))) axes.set_title("Relative Error Comparison") axes.legend() plt.show()


# Thread: The centroid of a triangle with coordinates

1. ## The centroid of a triangle with coordinates

Triangle DEF has vertices D(1,3) and E(6,1), and centroid at C(3,4). Determine the coordinates of point F.

I know that the medians in a triangle intersect at the centroid and that the centroid divides each median in a ration of 2:1. Also, I know that each median intersects a side at its midpoint with the shorter part of the median. What I did was find the midpoint between point E and F by taking half of the line D to C and adding onto C to give point G. The coordinates of point G was found to be (4, 4.5). Since I knew that the change in the coordinates between points E and G, (-2, 3.5), was only half of the line EF I doubled it and added it point E to give the answer (2, 8). I wanted to know if there was an easier way to do this.

2. Originally Posted by darksoulzero
Triangle DEF has vertices D(1,3) and E(6,1), and centroid at C(3,4). Determine the coordinates of point F.

I know that the medians in a triangle intersect at the centroid and that the centroid divides each median in a ration of 2:1. Also, I know that each median intersects a side at its midpoint with the shorter part of the median. What I did was find the midpoint between point E and F by taking half of the line D to C and adding onto C to give point G. The coordinates of point G was found to be (4, 4.5). Since I knew that the change in the coordinates between points E and G, (-2, 3.5), was only half of the line EF I doubled it and added it point E to give the answer (2, 8). I wanted to know if there was an easier way to do this.
Read Centroid - AoPSWiki

3. ## centroid of triangle

Hi darksoulzero,

Your solution is confusing.Here is a suggested method.

connect M midpoint of DE and C (centroid) with extended lenght.F lies on this line. FC = 2CM. Slope diagram of C and M = 2/1/2.Slope diagram of FC is twice that or 4/1. Working from point C one point left and 4 points up gives F (2,8)

bjh

4. If ABC is a triangle with $\displaystyle $$A\left( {{x_1},{y_1}} \right),B\left( {{x_2},{y_2}} \right),C\left( {{x_3},{y_3}} \right)$$$ then its centroid is
$\displaystyle $$G\left( {\tfrac{{{x_1} + {x_2} + {x_3}}}{3},\tfrac{{{y_1} + {y_2} + {y_3}}}{3}} \right)$$$

5. Hello, darksoulzero!

$\displaystyle \text{Triangle }D{E}F\text{ has vertices: }D(1,3)\text{ and }E(6,1)\text{, and centroid at }C(3,4).$
$\displaystyle \text{Determine the coordinates of point }F.$
Code:

1
F o-----+
\    :
\   :4
\  :
\ :
\:0.5
(3,4)o---+
D       C\  :
o         \ :2
(1,3)   *    \:
M o
(3.5,2)   *     E
o
(6,1)

We have vertices $\displaystyle D(1,3)$ and $\displaystyle E(6,1)$, and centroid $\displaystyle C(3,4).$

The midpoint of $\displaystyle DE$ is: $\displaystyle M(3\tfrac{1}{2},\,2).$

The median to side $\displaystyle DE$ starts at $\displaystyle \,M$, passes through $\displaystyle \,C,$
. . and extends to $\displaystyle \,F$, where: .$\displaystyle FC \,=\,2\!\cdot\!CM.$

Going from $\displaystyle \,M$ to $\displaystyle \,C$, we move up 2 and left $\displaystyle \frac{1}{2}$
Hence, going from $\displaystyle \,C$ to $\displaystyle \,F$, we move up 4 and left 1.

Therefore, we have: .$\displaystyle F(2,8).$


# Find angle(s) of intersection between circle and line segment on circle

I have a circle (given a center and radius) and a line segment (given a coordinate for both points). The line segment passes through the circle and intersects with the circle in one or two points (one if the segment is tangential or if it ends inside the circle).

How can I find the angle or the two angles where the line segment intersects the circle, relative to the top of the circle?

Please provide an example. Unrelated to the diagram below, a set of points to use in an example are as follows: circle radius $1.5$ with center $(3, 4)$. Line segment from $(3, 3)$ to $(6, 7)$.

If it's easier, it's acceptable to find both points by treating the line segment as a line and ignoring a tangential intersection

I am trying to find the angle shown as ?° in the diagram below. The answer in this case is 57°

• What is the other point that you're using to define this angle? Yes, the angle in the image may be 57 degrees, but what is the significance of the other point that you're measuring from? What I'm saying is: the point seems arbitrary. So I could pick any point on the circle and have any angle that I want. – foobar1209 Mar 16 '14 at 23:40
• The point is just the top of the circle. It could be anything, but the top makes the most sense. – Keavon Mar 16 '14 at 23:41

Set the center of the circle to be $\left(0,0\right)$. Then the set of points on the circle are those such that $x^2+y^2=r^2$ and the set of points on the line segment are solutions to $y=mx+b$ from some $m$ and $b$ (these are easily found given the two endpoints of the line segment). Substituting, we have $$x^2+(mx+b)^2=r^2\Longleftrightarrow (m^2+1)x^2+2mbx+(b^2-r^2)=0$$ Then this is just a quadratic you can solve with the quadratic formula giving you $x$, and you can get $y$ by $y=mx+b$. However, this gives you two solutions; you must pick the right one (find which is between the two endpoint). Fortunately finding the angle after this is pretty easy: it's just simple trigonometry. If $(x,y)$ is the solution, $\tan^{-1}\left(\frac{y}{x}\right)$ gives you the angles measure counterclockwise from the $x$-axis. You asked for the angle from the $y$-axis, which is then $\frac{\pi}{2}-\tan^{-1}\left(\frac{y}{x}\right).$

A worked example

I'll work out the example you have given. We have radius $r=\frac{3}{2}$, center $\left(3,4\right)$ and a line segment from $(3,3)$ to $(6,7)$. First we'll move the center to $(0,0)$. We do this by subtracting $(3,4)$ from each point. This gives us the center (as desired) of $(0,0)$, and a line segment from $(0,-1)$ to $(3,3)$. Then the line between the two points is $y=\frac{4}{3}x-1$. The equation for the circle is $x^2+y^2=\frac{9}{4}$. Substituting the equation for the line in, we have $$x^2+\left(\frac{4}{3}x-1\right)^2=\frac{25}{9}x^2-\frac{8}{3}x+1=\frac{9}{4}$$ which gives the quadratic $$\frac{25}{9}x^2-\frac{8}{3}x-\frac{5}{4}=100x^2-96x-45=0$$ Then the quadratic equation gives $x=\frac{96\pm \sqrt{96^2+4\cdot 100\cdot 45}}{200}=-0.345,1.305$. We're going to want the solution with positive $x$, so $x=1.305$. Then $y=\frac{4}{3}(1.305)-1=0.740$. To find the desired angles, we merely take $90-\tan^{-1}\left(\frac{0.740}{1.305}\right)=90-29.56=60.44$. I'm not sure what the discrepancy between my answer and the one you provided is; it could be rounding errors, but it is more likely I just made a calculation error somewhere (please do point it out if you see it).

I know it seems like a lot, but the technique is relatively straight forward, the calculation is just some hard work. I hope this answer has shed some light on the process for you.

• You made no error. The example I provided is different from the diagram provided in the question. Since this is a detailed and easy to understand answer I will mark it as accepted, but wait a few days before awarding you the bounty. – Keavon Mar 17 '14 at 2:03
• Sounds good. Glad i could help :) – cderwin Mar 17 '14 at 2:26

Hint: First, for convenience - transform the circle's to $(0,0)$ and normalize (so the radius of the given circle is now 1). The circle's equation is $x^2+y^2=1$

Now, we are given $(x_1, y_1)$, $(x_2,y_2)$. Denote $f(x)=mx+n$, the line that accepts those two points.

Assuming intersection, $x^2+(mx+n)^2=1\Leftrightarrow x^2+m^2x^2+2mnx+n^2=1$

• Please provide an example with circle radius $1.5$ with center $(3,4)$ and line segment from $(3,3)$ to $(6,7)$. – Keavon Mar 17 '14 at 0:37
• First, transform to (0,0) and normalize, by the transofrmation T(x,y)=(x-3,y-4)/(1.5). Transform all the points with T and you'll get a new problem with the same answer you're looking for. After transforming, find the line and circle equations and continue from there. – Astro Nauft Mar 17 '14 at 7:45

Hint:

1. Find the equation of the circle and line. The circle should be easy, use the line slope and a point to find the equation.

2. Find the intersection. This is solving for either variable and then plugging it in to get coordinates.

3. Draw a right triangle using a diagonal radius to the intersection and a horizontal line. Based on what you know about slope and tangents, this should help you find an angle that is complementary to your angle.


# Show that $\left( 1 + \frac{x}{n}\right)^n$ is uniformly convergent on $S=[0,1]$. [duplicate]

Show that $\left( 1 + \frac{x}{n}\right)^n$ is uniformly convergent on $S=[0,1]$.

Given $f_n(x)=\left( 1 + \frac{x}{n}\right)^n$ is a sequence of bounded function on $[0,1]$ and $f:S \rightarrow \mathbb R$ a bounded function , then $f_n(x)$ converges uniformly to $f$ iff

$$\lim\limits_{n \rightarrow \infty} ||f_n - f|| = \lim\limits_{n \rightarrow \infty}\left(\sup |f_n(x) - f(x)| \right)= 0$$

As $$f(x) = \lim\limits_{n \rightarrow \infty} \left( 1 + \frac{x}{n}\right)^n = e^x$$

We have

$$\begin{split} \lim\limits_{n \rightarrow \infty} \left\|\left( 1 + \frac{x}{n} \right)^n - e^x\right\| &= \lim\limits_{n \rightarrow \infty} \left|\sup_{x \in S}\left[\left( 1 + \frac{x}{n}\right)^n - e^x \right ]\right|\\ &= \lim\limits_{n \rightarrow \infty} \left|\left( 1 + \frac{1}{n} \right)^n - e^1 \right|\\ &= \lim\limits_{n \rightarrow \infty} |e-e| \\ &= 0 \end{split}$$

I am new to sequence. Is this appropriate to show convergence?

Going back to the definition, How can I show that:

1. "$f_n(x)=\left( 1 + \frac{x}{n}\right)^n$ is a sequence of bounded function on $[0,1]$"?

2. $f:S \rightarrow \mathbb R$ a bounded function?

• Continuous functions are bounded on closed intervals. For any $n$, $f_n(x)$ expands to a polynomial, which is continuous anywhere. – IntegrateThis Aug 14 '17 at 0:15
• The third line in your last calculation is wrong: shouldn't have a limit in front of $|e-e|$. – symplectomorphic Aug 14 '17 at 1:23
• @Will Fisher: well, sure, as written it doesn't make a difference. But the point is that it in preserving the limit from the second to the third line it looks like the student is arguing that $|(1+1/n)^n-e|$ equals $|e-e|$. – symplectomorphic Aug 14 '17 at 1:27
• @Will Fisher: no, you have misunderstood the OP. The OP is proving that $f_n\to f$ uniformly by invoking hypotheses, and the questions at the bottom are about how to show the hypotheses hold. – symplectomorphic Aug 14 '17 at 1:29
• Have you shown that the sup obtains when $x=1$? It is true, but it seems to me to require proof (and you have the absolute value in the wrong place: as it stands - the absolute value of the sup of the difference-, the sup is 0 at $x=0$; you want the sup of the absolute value of the difference instead). – NickD Aug 14 '17 at 1:51

If you don't want to verify the precise maximum you can bound as

$$0 \leqslant e^x - \left(1 + \frac{x}{n} \right)^n =e^x \left[1 - \left(1 + \frac{x}{n} \right)^ne^{-x}\right] \\ \leqslant e^x \left[1 - \left(1 + \frac{x}{n} \right)^n \left(1 - \frac{x}{n} \right)^n\right] \\ = e^x \left[1 - \left(1 - \frac{x^2}{n^2} \right)^n \right],$$

since $e^{x/n} > 1 + x/n$ which implies $e^{x} > (1 + x/n)^n$ for $x \in (-n,\infty).$

By Bernoulli's inequality, $(1 - x^2/n^2)^n \geqslant 1 - x^2/n$ and

$$0 \leqslant e^x - \left(1 + \frac{x}{n} \right)^n \leqslant \frac{e^xx^2}{n} \leqslant \frac{e}{n},$$

which enables you to prove uniform convergence on $[0,1]$.

Let's write explicitly the difference $$e^x - ( 1 + \frac{x}{n})^n = \sum_{ k \ge 0} \frac{x^k}{k!} - \sum_{k = 0}^n \binom{n}{k}\left(\frac{x}{n}\right )^k=\\ =\sum_{k\ge 0} \frac{[1-\prod_{l=1}^{k-1}(1- l/n)] x^k}{k!}$$. Since every coefficient $1- \prod_{l=1}^{k-1} (1-\frac{l}{n})$ is $\ge 0$ ( and $0$ for $k \ge n+1$ ) we conclude that

$$0 < e^x - (1+ \frac{x}{n})^n\le e^1 - (1 + \frac{1}{n})^n$$ for all $n \ge 0$ and $x\in [0,1]$.

Now, it's only necessary to check ( or use ) that $(1+\frac{1}{n})^n \to e$.

As shown in inequality $(2)$ of this answer, $\left(1+\frac xn\right)^n$ is increasing in $n$. Thus, for $x\ge0$, \begin{align} \frac{\mathrm{d}}{\mathrm{d}x}\left(e^x-\left(1+\frac xn\right)^n\right) &=e^x-\left(1+\frac xn\right)^{n-1}\\ &\ge e^x-\left(1+\frac xn\right)^n\\[3pt] &\ge0 \end{align} So on $[0,1]$, $$0\le e^x-\left(1+\frac xn\right)^n\le e-\left(1+\frac1n\right)^n$$

The logarithm $\ln:[1,e]\to[0,1]$ is uniformly continuous on this interval, so it is a uniform homeomorphism, and it suffices to show that $\ln f_n(x)=n\ln (1+x/n)$ is uniformly convergent on $[0,1]$. But this follows immediately from Taylor's theorem: $$n\ln(1+x/n)-x=O(x^2/n).$$


# What type of bifurcation is this?

Consider the dynamical system

$$dx/dt = -\cos(r)\sin(x)$$

Clearly $$x=0$$ and $$x=\pi$$ are two fixed points of this system. The stability of these two fixed points change as r is varied. Starting from $$r=0$$, the zero fixed point is initially stable but becomes unstable at $$r=\pi/2$$ and the opposite happens for the other fixed point.

Is this a transcritical bifurcation? I have so far only seen systems where one of the fixed point approaches the other fixed point and their stability switch as they cross each other.

However in my system, the fixed points remain at the same values of $$x$$. Only stability changes. If not transcritical, what type of bifurcation is this?

TL;DR: I don't believe the system displays a transcritical bifurcation.

Your stability analysis is correct. For instance, for $$r=0$$, $$\dot{x}$$ is simply a negative sine function, so positive $$x\approx 0$$ values have negative derivatives (and decrease, i.e., move towards zero) and negative values have positive derivatives (so increase and also move towards zero), i.e., $$x=x^*=0$$ is stable for $$r<\pi/2$$. See figure below:

And the system does go through a bifurcation as $$r$$ is varied — though not one of the simple ones, due to the singular nature of the system at $$r=r^*=\pi/2$$: For this value of $$r$$ all points $$x\in[0,2\pi]$$ are (neutrally stable) fixed points, since the system is simply $$dx/dt=0$$. That's how I'd sketch its bifurcation diagram:

It looks like we could say there's a collision on $$r^*=\pi/2$$ and the fixed points "exchange stabilities — just like in a transcritical bifurcation, however, I think we have something different here, for two reasons:

I. If we check the formal conditions for the system $$\dot{x}=f_r(x)$$ to go through a transcritical bifurcation (e.g., Guckenheim & Holmes or Wolfram MathWorld), we'll see they are: \begin{align} f_r(x)\Bigr|_{\forall r, x=x^*}=0 \tag{equilibria}\\ \frac{\partial f_r}{\partial x}\Bigr|_{r=r^*, x=x^*} = 0 \tag{null eigenvalue}\\ \frac{\partial^2 f_r}{\partial r\partial x}\Bigr|_{r=r^*, x=x^*} \ne 0 \tag{TC1}\\ \frac{\partial^2 f_r}{\partial^2 x}\Bigr|_{r=r^*, x=x^*} \ne 0 \tag{TC2} \label{TC2} \end{align} where TC stands for transversality condition. And it's clear that our $$f_r(x)$$ fails to satisfy \ref{TC2}.

II. By changing variables, $$r \mapsto -r + \pi/2$$, the system becomes $$f_r(x)=-\sin(r)\sin(x)$$ and $$r^*=0$$. If we then try to put $$f_r(x)$$ in a algebraic normal form, by Taylor expanding it around $$(r^*,x^*)$$ we obtain, after a new change of variables $$r\mapsto r-r^3/6$$, $$f_r(x) = rx -r\frac{x^3}{6} +O(5)$$ which I don't believe can be put in the normal form for the transcritical bifurcation, nor any of the other simple ones: \begin{align} \dot{x} &= r - x^2 \tag{saddle-node}\\ \dot{x} &= rx - x^2 \tag{transcritical}\\ \dot{x} &= r - x^3 \tag{pitchfork} \end{align} Which is perhaps not that surprising, given the system's bifurcation diagram.

• I missed out a negative sign in the equation. Thanks for pointing it out. If not transcritical, does this type of bifurcation have some name to it that I can search for? May 17 at 18:47
• @SnehaSrikanth Not that I know, maybe we could call it transcritical-like? :) May 17 at 18:50
• @SnehaSrikanth I'm now convinced the system doesn't display a transcritical bifurcation, check my updated answer. May 18 at 19:24
• Thanks for such a clear detailed answer! I still want to keep the question open for anyone who might be able to pinpoint what kind of bifurcation this is. I am new to StackExchange.. do I edit this post and change the question or make a new question? I do not want your answer to become irrelevant. May 19 at 11:44
• Ok will make that change! I am actually unable to upvote yet (I need 15 reputations for that). I'll surely upvote when I hit 15 reputations :D May 19 at 16:14


# Proof that $\forall k\in\mathbb Z^+$, $\lfloor\log_2(2k+1)\rfloor=\lfloor\log_2(2k)\rfloor$

I wrote a proof for this but am not completely sure if this is valid. Specifically, can I go from $$m\leq k+0.5$$ to $$m\leq k$$ because $$m,k\in\mathbb Z^+$$ with no further explanation? Any feedback would be greatly appreciated!

Proof. Let $$n=\lfloor\log_2(2k+1)\rfloor$$. Then, \begin{align*} n&\leq\log_2(2k+1)\lt n+1&&\text{(since \forall x\in\mathbb R, \lfloor x\rfloor\leq x\lt x+1),}\\ \implies2^n&\leq2k+1\lt2^{n+1}&&\text{(by algebra).}\\ \end{align*} Observe that $$2^n\in2\mathbb Z^+$$ so $$2^n=2m$$ for some $$m\in\mathbb Z^+$$. Thus, \begin{align*} 2m&\leq2k+1&&\text{(since 2m=2^n\leq2k+1),}\\ \implies m&\leq k+0.5&&\text{(by algebra),}\\ \implies m&\leq k&&\text{(since m,k\in\mathbb Z^+),}\\ \implies 2m&\leq2k&&\text{(by algebra),}\\ \implies 2^n&\leq2k&&\text{(since 2^n=2m),}\\ \implies 2^n&\leq2k\lt2^{n+1}&&\text{(since 2k+1\lt2^{n+1}\rightarrow2k\lt2^{n+1}),}\\ \implies n&\leq\log_2(2k)\lt n+1&&\text{(by algebra),}\\ \therefore n&=\lfloor\log_2(2k)\rfloor&&\text{(since \forall x\in\mathbb R, \lfloor x\rfloor\leq x\lt x+1).} \end{align*} $$\tag*{\blacksquare}$$

• In your latter paragraph it seems you can just go from line $1$ to lines $4/5$ Dec 3, 2019 at 21:29
• Your proof looks good to me! Dec 3, 2019 at 21:37

Note that for all $$n \in \mathbb{N_{>0}}$$ there exist $$m \in \mathbb{N}$$ such that $$\begin{eqnarray*} 2^m \leq n < 2^{m+1}. \end{eqnarray*}$$ This value $$m$$ is $$\lfloor\log_2(n)\rfloor$$ And $$n$$ increases passed a power of $$2$$ the value $$m$$ will increase by $$1$$.
If $$n$$ increases (by $$1$$) from an even value to an odd value the $$m$$ will not change (provided $$n>1$$). So $$\begin{eqnarray*} \lfloor\log_2(2k+1)\rfloor = \lfloor\log_2(2k)\rfloor. \end{eqnarray*}$$