(ebook) matlab - mathematics for business, science, and technology with matlab and spreadsheet...

600
M T H A Mathematics for Business, Science, and Technology With MATLAB®and Spreadsheet Applications Steven T. Karris x y 100 200 300 400 500 2,000 4,000 6,000 8,000 10,000 0 Units Sold 12,000 14,000 Revenue Cost Break-Even Point Profit $ Includes a Comprehensive Treatment of Probability and Statistics Illustrated with Numerous Real-World Examples SECOND EDITION Orchard Publications www.orchardpublications.com

Upload: pratik-dhage

Post on 27-Jul-2015

507 views

Category:

Documents


6 download

TRANSCRIPT

Page 1: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

M THA

Mathematicsfor Business, Science,

and TechnologyWith MATLAB®and Spreadsheet Applications

Steven T. Karris

x

y

100 200 300 400 500

2,000

4,000

6,000

8,000

10,000

0

Units Sold

12,000

14,000

Revenue

Cost

Break-Even Point

Profit

$

Includes a

Comprehensive

Treatment of Probability

and Statistics Illustrated

with Numerous

Real-World Examples

SECONDEDITION

Orchard Publicationswww.orchardpublications.com

Page 2: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

How to go to your page:

In this eBook, each chapter or section has its own page numbering scheme, made up of an identifier and page number, separated by a hyphen. For example, to go to page 4 of Chapter 2, enter 2-4 in the “page #” box at the top of the screen and click “Go”. To go to page 4 of Appendix A, enter A-4, and so forth.

Page 3: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

This text includes the following chapters and appendices:

• Numbers and Arithmetic Operations • Elementary Algebra • Intermediate Algebra • Fundamentals of Geometry • Fundamentals of Plane Trigonometry • Fundamentals of Calculus •Mathematics of Finance and Economics • Depreciation, Impairment, and Depletion• Introduction to Probability and Statistics • Random Variables • Common Probability Distributionsand Tests • Curve Fitting, Regression, and Correlation • Analysis of Variance (ANOVA) • Introductionto MATLAB • The Gamma and Beta Functions and Distributions • Introduction to Markov Chains

Each chapter contains numerous practical applications supplemented with detailed instructions forusing MATLAB and Microsoft Excel obtain quick answers.

Orchard PublicationsVisit us on the Internet

www.orchardpublications.comor email us: [email protected]

Mathematicsfor Business, Science, and Technology

With MATLAB® and Spreadsheet Applications

SECOND EDITION

Students and working professionals will find that our Mathematics for Business, Science, andTechnology, Second Edition, is a concise and easy-to-read text for a variety of basic and advancedmathematical topics. This book contains all necessary material for the successful completion of adegree in business or technology.FEATURES• There are no prerequisites for the content of this book.• Presents a methodological approach in learning the basic mathematical concepts through variouspractical examples• Presents a unique approach to verify lengthy computations with computer software packages.

ISBN 0-9744239-0-4

Steven T. Karris is the president and founder of Orchard Publications. He earned a bachelors degreein electrical engineering at Christian Brothers University, Memphis, Tennessee, a masters degree inelectrical engineering at Florida Institute of Technology, Melbourne, Florida, and has done post-masterwork at the latter. He is a registered professional engineer in California and Florida. He has over 30years of professional engineering experience in industry. In addition, he has over 25 years of teachingexperience that he acquired at several educational institutions as an adjunct professor. He is currentlywith UC Berkeley Extension.

$39.95 U.S.A.

Page 4: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematicsfor Business, Science, and Technology

Second EditionWith MATLAB®and Spreadsheet Applications

Steven T. Karris

Orchard Publicationswww.orchardpublications.com

Page 5: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second EditionWith MATLAB® and Spreadsheet Applications

Copyright 2003 Orchard Publications. All rights reserved. Printed in the United States of America. No part of thispublication may be reproduced or distributed in any form or by any means, or stored in a data base or retrievalsystem, without the prior written permission of the publisher.

Direct all inquiries to Orchard Publications, 39510 Paseo Padre Parkway, Fremont, California 94538, U.S.A.URL: http://www.orchardpublications.com

Product and corporate names are trademarks or registered trademarks of the MathWorks , Inc., and MicrosoftCorporation. They are used only for identification and explanation, without intent to infringe.

Library of Congress Cataloging-in-Publication Data

Library of Congress Control Number: Pending. Contact [email protected] for updated information.

Copyright Number TX-5-471-563

ISBN 0-9744239-0-4

Disclaimer

The publisher has used his best effort to prepare this text. However, the publisher and author makes no warranty of anykind, expressed or implied with regard to the accuracy, completeness, and computer codes contained in this book, andshall not be liable in any event for incidental or consequential damages in connection with, or arising out of, theperformance or use of these programs.

Page 6: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Preface

This book is different from others of the same subject. It goes from one extreme to another; startswith junior high math material and ends with college graduate material.

It is written for

a. high school graduates preparing to take business or science courses at community colleges oruniversities

b. working professionals who feel that they need a math review from the very beginning

c. young students and working professionals who are enrolled in continued educationinstitutions, and majoring in business related topics, such as business administration andaccounting, and those pursuing a career in science, electronics, and computer technology.

Chapter 1 begins with basic arithmetic operations, introduces the SI system of units, and discussesdifferent types of graphs.

Chapter 2 is an introduction to the basics of algebra.

Chapter 3 is a continuation of Chapter 2 and presents some practical examples with systems oftwo and three equations.

Chapters 4 and 5 discuss the fundamentals of geometry and trigonometry respectively. Thesetreatments are not exhaustive; these chapters contain basic concepts that are used in science andtechnology.

Chapter 6 is an abbreviated, yet a practical introduction to calculus.

Chapters 7 and 8 are new for this edition. They serve as an introduction to the mathematics offinance and economics and the concepts are illustrated with numerous real-world applicationsand examples.

Chapters 9 through 13 are devoted to probability and statistics. Many practical examples aregiven to illustrate the importance of this branch of mathematics. The topics that are discussed,are especially important in management decisions and in reliability. Some readers may findcertain topics hard to follow; these may be skipped without loss of continuity.

In all chapters, numerous examples are given to teach the reader how to obtain quick answers tosome complicated problems using computer tools such as MATLAB®and Microsoft Excel.®

Appendix A is intended to teach the interested reader how to use MATLAB. Many practicalexamples are presented. The Student Edition of MATLAB is an inexpensive software package; itcan be found in many college bookstores, or can be obtained directly from

Page 7: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

The MathWorks™ Inc., 3 Apple Hill Drive, Natick, MA 01760-2098Phone: 508 647-7000, Fax: 508 647-7001http://www.mathworks.come-mail: [email protected]

Appendix B introduces the gamma and beta functions. These appear in the gamma and betadistributions and find many applications in business, science, and engineering. For instance, theErlang distributions, which are a special case of the gamma distribution, form the basis of queuingtheory.

Appendix C is an introduction to Markov chains. A few practical examples illustrate theirapplication in making management decisions.

All feedback for typographical errors and comments will be most welcomed and greatlyappreciated.

New to the Second Edition

This is an refined revision of the first edition. The most notable changes are the addition of thenew Chapters 7 and 8, chapter-end summaries, and detailed solutions to all exercises. The latter isin response to many students and working professionals who expressed a desire to obtain theauthor’s solutions for comparison with their own.

The chapter-end summaries will undoubtedly be a valuable aid to instructors for the preparationof presentation material.

The last major change is the improvement of the plots generated by the latest revisions of theMATLAB® Student Version, Release 13.

Orchard Publicationswww.orchardpublications.cominfo@orchardpublications.com

Page 8: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition iOrchard Publications

Table of ContentsChapter 1

Numbers and Arithmetic Operations

Number Systems .......................................................................................................................... 1-1Positive and Negative Numbers .................................................................................................. 1-1Addition and Subtraction ........................................................................................................... 1-2Multiplication and Division ........................................................................................................ 1-7Integer, Fractional, and Mixed Numbers .................................................................................. 1-10Reciprocals of Numbers............................................................................................................. 1-11Arithmetic Operations with Fractional Numbers..................................................................... 1-12Exponents .................................................................................................................................. 1-21Scientific Notation .................................................................................................................... 1-24Operations with Numbers in Scientific Notation ..................................................................... 1-26Square and Cubic Roots ............................................................................................................ 1-28Common and Natural Logarithms ............................................................................................ 1-30Decibel....................................................................................................................................... 1-32Percentages ................................................................................................................................ 1-32International System of Units (SI) ............................................................................................ 1-33Graphs ....................................................................................................................................... 1-37Summary.................................................................................................................................... 1-41Exercises .................................................................................................................................... 1-46Solutions to Exercises ................................................................................................................ 1-47

Chapter 2

Elementary Algebra

Introduction................................................................................................................................. 2-1Algebraic Equations .................................................................................................................... 2-2Laws of Exponents....................................................................................................................... 2-5Laws of Logarithms...................................................................................................................... 2-8Quadratic Equations.................................................................................................................. 2-11Cubic and Higher Degree Equations......................................................................................... 2-13Measures of Central Tendency ................................................................................................. 2-13Interpolation and Extrapolation................................................................................................ 2-15Infinite Sequences and Series.................................................................................................... 2-18Arithmetic Series....................................................................................................................... 2-19Geometric Series........................................................................................................................ 2-19Harmonic Series ........................................................................................................................ 2-21

Page 9: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

ii Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

Proportions ................................................................................................................................. 2-23Summary..................................................................................................................................... 2-24Exercises ..................................................................................................................................... 2-28Solutions to Exercises................................................................................................................. 2-30

Chapter 3

Intermediate Algebra

Systems of Two Equations............................................................................................................3-1Systems of Three Equations .........................................................................................................3-6Matrices and Simultaneous Solution of Equations ......................................................................3-6Summary.....................................................................................................................................3-25Exercises .....................................................................................................................................3-29Solutions to Exercises................................................................................................................. 3-31

Chapter 4

Fundamentals of Geometry

Introduction .................................................................................................................................4-1Plane Geometry Figures................................................................................................................4-1Solid Geometry Figures ..............................................................................................................4-17Using Spreadsheets to Find Areas of Irregular Polygons ...........................................................4-21Summary.....................................................................................................................................4-24Exercises .....................................................................................................................................4-29Solutions to Exercises.................................................................................................................4-31

Chapter 5

Fundamentals of Plane Trigonometry

Introduction ................................................................................................................................. 5-1Trigonometric Functions.............................................................................................................. 5-2Trigonometric Functions of an Acute Angle............................................................................... 5-2Trigonometric Functions of an Any Angle.................................................................................. 5-3Fundamental Relations and Identities ......................................................................................... 5-6Triangle Formulas....................................................................................................................... 5-12Inverse Trigonometric Functions ............................................................................................... 5-14Area of Polygons in Terms of Trigonometric Functions............................................................ 5-14Summary..................................................................................................................................... 5-16Exercises ..................................................................................................................................... 5-18Solutions to Exercises................................................................................................................. 5-19

Page 10: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition iiiOrchard Publications

Chapter 6

Fundamentals of Calculus

Introduction................................................................................................................................. 6-1Differential Calculus.................................................................................................................... 6-1The Derivative of a Function...................................................................................................... 6-3Maxima and Minima ................................................................................................................. 6-11Integral Calculus........................................................................................................................ 6-15Indefinite Integrals .................................................................................................................... 6-16Definite Integrals ....................................................................................................................... 6-16Summary.................................................................................................................................... 6-21Exercises .................................................................................................................................... 6-23Solutions to Exercises ................................................................................................................ 6-24

Chapter 7

Mathematics of Finance and Economics

Common Terms........................................................................................................................... 7-1Interest......................................................................................................................................... 7-6Sinking Funds ............................................................................................................................ 7-23Annuities ................................................................................................................................... 7-28Amortization.............................................................................................................................. 7-33Perpetuities ................................................................................................................................ 7-36Valuation of Bonds.................................................................................................................... 7-37Spreadsheet Financial Functions .............................................................................................. 7-44The MATLAB Financial Toolbox ............................................................................................ 7-58Comparison of Alternate Proposals........................................................................................... 7-65Kelvin’s Law .............................................................................................................................. 7-68Summary.................................................................................................................................... 7-72Exercises .................................................................................................................................... 7-75Solutions to Exercises ................................................................................................................ 7-78

Chapter 8

Depreciation, Impairment, and Depletion

Depreciation Defined .................................................................................................................. 8-1Items that Can Be Depreciated ................................................................................................... 8-2Items that Cannot Be Depreciated ............................................................................................. 8-2Depreciation Rules ...................................................................................................................... 8-2When Depreciation Begins and Ends ......................................................................................... 8-3Methods of Depreciation............................................................................................................. 8-3

Page 11: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

iv Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

Straight-Line (SL) Depreciation Method .................................................................................... 8-4Sum of the Years Digits (SYD) Method....................................................................................... 8-4Fixed-Declining Balance (FDB) Method..................................................................................... 8-6The 125%, 150%, and 200% General Declining Balance (GDB) Methods ................................ 8-8The Variable Declining Balance (VDB) method......................................................................... 8-9The Units of Production (UOP) method................................................................................... 8-10Depreciation Methods for Income Tax Reporting..................................................................... 8-11The Accelerated Cost Recovery System (ACRS) ..................................................................... 8-12The Modified Accelerated Cost Recovery System (MACRS) .................................................. 8-12Section 179................................................................................................................................. 8-16Impairments................................................................................................................................ 8-18Depletion .................................................................................................................................... 8-19Valuation of a Depleting Asset ..................................................................................................8-20Summary..................................................................................................................................... 8-25Exercises ..................................................................................................................................... 8-27Solutions to Exercises................................................................................................................. 8-28

Chapter 9

Introduction to Probability and Statistics

Introduction ................................................................................................................................. 9-1Probability and Random Experiments.......................................................................................... 9-1Relative Frequency....................................................................................................................... 9-2Combinations and Permutations.................................................................................................. 9-4Joint and Conditional Probabilities .............................................................................................. 9-7Bayes’ Rule.................................................................................................................................. 9-10Summary..................................................................................................................................... 9-12Exercises ..................................................................................................................................... 9-14Solutions to Exercises................................................................................................................. 9-15

Chapter 10

Random Variables

Definition of Random Variables................................................................................................. 10-1Probability Function ................................................................................................................... 10-2Cumulative Distribution Function............................................................................................. 10-2Probability Density Function...................................................................................................... 10-9Two Random Variables ............................................................................................................ 10-11Statistical Averages .................................................................................................................. 10-12Summary................................................................................................................................... 10-19Exercises ................................................................................................................................... 10-22Solutions to Exercises............................................................................................................... 10-24

Page 12: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition vOrchard Publications

Chapter 11

Common Probability Distributions and Tests

Properties of Binomial Coefficients ........................................................................................... 11-1The Binomial (Bernoulli) Distribution ..................................................................................... 11-2The Uniform Distribution ......................................................................................................... 11-6The Exponential Distribution ................................................................................................. 11-10The Normal (Gaussian) Distribution...................................................................................... 11-13Percentiles ............................................................................................................................... 11-32The Student’s t-Distribution ................................................................................................... 11-36The Chi-Square Distribution .................................................................................................. 11-41The F Distribution................................................................................................................... 11-44Chebyshev’s Inequality ............................................................................................................ 11-46Law of Large Numbers............................................................................................................. 11-47The Poisson Distribution......................................................................................................... 11-47The Multinomial Distribution................................................................................................. 11-52The Hypergeometric Distribution ........................................................................................... 11-53The Bivariate Normal Distribution ......................................................................................... 11-56The Rayleigh Distribution ....................................................................................................... 11-57Other Probability Distributions............................................................................................... 11-59Sampling Distribution of Means.............................................................................................. 11-63Z-Score .................................................................................................................................... 11-64Tests of Hypotheses and Levels of Significance ...................................................................... 11-65The z, t, F, and tests ........................................................................................................... 11-72Summary.................................................................................................................................. 11-78Exercises .................................................................................................................................. 11-87Solutions to Exercises .............................................................................................................. 11-89

Chapter 12

Curve Fitting, Regression, and Correlation

Curve Fitting ............................................................................................................................. 12-1Linear Regression ...................................................................................................................... 12-2Parabolic Regression.................................................................................................................. 12-7Covariance............................................................................................................................... 12-10Correlation Coefficient............................................................................................................ 12-12Summary.................................................................................................................................. 12-17Exercises .................................................................................................................................. 12-19Solutions to Exercises .............................................................................................................. 12-21

2

Page 13: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

vi Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

Chapter 13Analysis of Variance (ANOVA)

Introduction ............................................................................................................................... 13-1One-way ANOVA ..................................................................................................................... 13-1Two-way ANOVA ..................................................................................................................... 13-8Two-factor without Replication ANOVA................................................................................. 13-8Two-factor with Replication ANOVA .................................................................................... 13-14Summary................................................................................................................................... 13-25Exercises ................................................................................................................................... 13-29Solutions to Exercises............................................................................................................... 13-31

Appendix AIntroduction to MATLAB®

MATLAB® and Simulink®.......................................................................................................A-1Command Window .....................................................................................................................A-1Roots of Polynomials ...................................................................................................................A-3Polynomial Construction from Known Roots .............................................................................A-4Evaluation of a Polynomial at Specified Values..........................................................................A-6Rational Polynomials...................................................................................................................A-8Using MATLAB to Make Plots ................................................................................................A-10Subplots .....................................................................................................................................A-19Multiplication, Division and Exponentiation ...........................................................................A-19Script and Function Files ..........................................................................................................A-26Display Formats .........................................................................................................................A-31

Appendix BThe Gamma and Beta Functions and Distributions

The Gamma Function ..................................................................................................................B-1The Gamma Distribution ...........................................................................................................B-15The Beta Function .....................................................................................................................B-17The Beta Distribution ...............................................................................................................B-20

Appendix CIntroduction to Markov Chains

Stochastic Processes .................................................................................................................... C-1Stochastic Matrices ..................................................................................................................... C-1Transition Diagrams.................................................................................................................... C-4Regular Stochastic Matrices........................................................................................................ C-5Some Practical Examples............................................................................................................. C-7

Page 14: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 1-1Orchard Publications

Chapter 1

Numbers and Arithmetic Operations

his chapter is a review of the basic arithmetic concepts. It is intended for readers feelingthat they need a math review from the very beginning. It forms the basis for understandingand working with relations (formulas) encountered in business, science and technology.

Readers with a fair mathematical background may skip this chapter. Others may find it useful aswell as a convenient source for review.

1.1 Number SystemsThe decimal (base 10) number system uses the digits (numbers) 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9. Thisis the number system we use in our everyday arithmetic calculations such as the monetary trans-actions. Another number system is the binary (base 2) that uses the digits 0 and 1 only. The binarysystem is used in computers and it is being taught in electronics courses. We will not be concernedwith the binary system in this text.

1.2 Positive and Negative NumbersA positive number is a number greater than zero and it is understood to have a plus (+) sign infront of it. The (+) sign in front of a positive number is generally omitted. Thus, any numberwithout a sign in front of it is understood to be a positive number. A negative number is less thanzero and it is written with a minus (–) sign* in front of it. The minus ( ) sign in front of a negativenumber is a must; otherwise it would not be possible to distinguish the negative from the positivenumbers. Positive and negative numbers can be whole (integer) or fractional numbers. Severalexamples will be presented in this chapter to illustrate their designation, how they are added, sub-tracted, multiplied, and divided with other numbers. To avoid confusion between the additionoperation (+) and positive numbers, which are also denoted with the (+) sign, we will enclosepositive numbers with their sign inside parentheses whenever necessary. Likewise, we will enclosenegative numbers in parentheses to distinguish them from the subtraction ( ) symbol. This will beillustrated with the examples that follow.

Example 1.1

Joe Smith’s checking account shows a balance of $534.29. Thus, we can say that his balance is+534.39 dollars but we normally omit the plus (+) sign, and we say that his balance is 534.39dollars.

* The financial community, such as banks, usually enclose a negative number in parentheses without the minussign. Most often, this designation appears in financial statements.

T

Page 15: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 1 Numbers and Arithmetic Operations

1-2 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

Example 1.2

Bill Jones, unaware that his checking account has a balance of only $78.31, makes a purchase of$128.74. He pays this amount with a check. His new account balance is now dollars.Here, the minus ( ) sign is a must.

The absolute value of a number is that number without a positive or negative sign, and is enclosedin small vertical lines. For example, the absolute value of X is written as |X|. The number 0 (zero)is considered neither positive nor negative; it is the number that separates the negative from thepositive numbers. The positive and negative numbers that we are familiar with, are referred to asthe real numbers* and are shown below on the so-called real axis of numbers**.

Figure 1.1. Representation of Real Numbers

In our subsequent discussion, we will only be concerned with real numbers and thus the word realwill not be used further.

1.3 Addition and SubtractionThe following rules apply for the addition of numbers.

Rule 1: To add numbers with the same sign, we add the absolute values of these numbers andplace the common sign (+ or –) in front of the result (sum). We can omit the plus sign inthe result if positive. We must not omit the minus sign if the result is negative.

Example 1.3

Perform the addition

Solution:

The plus sign between the given numbers indicates addition of three positive numbers whose signis positive and it is omitted. However, we can enclose these numbers in parentheses just toemphasize that the numbers are positive. Addition of the absolute values of these numbers yield a

* The reader may have heard the expression “imaginary numbers”. The square root of minus 1, i.e, , is anexample of an imaginary number; it does not fit anywhere in the real axis of numbers. We will not be concernedwith these numbers in this text. There is a brief discussion in Appendix A in conjunction with MATLAB.

** Only whole numbers are shown on the real axis of Figure 1.1. However, it is understood that within each divi-sion, there are numbers such as 1.5, 2.75 etc.

128.74–

1–

-6 -5 -4 -3 -2 -1 1 2 3 4 5 60Real Axis

7 16 0.5+ +

Page 16: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 1-3Orchard Publications

Addition and Subtraction

sum of 23.5, and this also represents an absolute value. We should remember that the absolutevalue of a number is that just that number without regard to being positive or negative. Now,since all three numbers are positive, the sum is +23.5 or simply 23.5 as shown below. The finalresult, 23.5, does not represent an absolute number; it is a positive number whose sign has beenomitted, as it is customary. Thus,

where the symbol means conversion from signed numbers to absolute values and vice versa. Ofcourse, these steps will be unnecessary after one becomes familiar with the rules.

Example 1.4

Perform the addition

Solution:

Here, we are asked to add two negative numbers as indicated by the addition sign between them.Addition of the absolute values yields 51 and since both numbers are negative, we place the minussign in front of the result. Therefore, the sum of these numbers is ( 51) or 51. The minus signcannot be omitted. Thus,

Example 1.5

Perform the addition

Solution:

In this example, we are asked to add three negative numbers. The sum of the absolute values is 5.Since all given numbers are negative, we place the minus sign in front of the sum. The result thenis ( 5) or simply 5. The negative sign cannot be omitted. Thus,

Consider the subtraction of number B from number A, that is, A–B. The number A is called theminuend and the number B is called the subtrahend. The result of the subtraction is called the dif-ference. These definitions are illustrated with Examples 1.6 and 1.7 below.

Example 1.6

Draw a rough sketch to indicate the minuend, subtrahend, and difference for the subtractionoperation of 735 592.

7 16 0.5+ + +7 +16 +0.5+ + 7 16+= 0.5+ 23.5 +23.5 23.5= =

(–6) + (–45)

6– 45–+ 6 45+ 51 51– 51–= =

1.25– 0.75– 3–+ +

1.25– 0.75– 3–+ + 1.25 0.75 3+ + 5 5– 5–= =

Page 17: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 1 Numbers and Arithmetic Operations

1-4 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

Solution:

The minuend, subtrahend, and difference are shown on the sketch below. The procedure for find-ing the difference will be explained in Rule 3 below.

Example 1.7

Draw a rough sketch to indicate the minuend, subtrahend, and difference for the subtractionoperation of 248 857.

Solution:

The minuend, subtrahend, and difference are shown on the sketch below. The procedure for find-ing the difference is our next topic.

Rule 2: To add two numbers with different signs, we subtract the number with the smaller abso-lute value from the number with the larger absolute value, and we place the sign of thelarger number in front of the result (sum).

Example 1.8

Perform the addition

Solution:

The number with the smaller absolute value is 15; therefore, we subtract this from the absolutevalue of the larger number, 37, and we place the plus sign in front of the difference as shownbelow because the larger number is positive. Since the result is a positive number, we omit theplus sign.

Example 1.9

Perform the addition

735 592– 143=

Difference

MinuendSubtrahend

248 857– 609–=

DifferenceSubtrahend

Minuend

37 15–+

37 15–+ +37 15–+ 37 15– 22 +22 22= = =

16– 7+

Page 18: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 1-5Orchard Publications

Addition and Subtraction

Solution:

The number with the smaller absolute value is 7; therefore, we subtract this from the absolutevalue of the larger number which is 16, and we place the minus sign in front of the difference asshown below.

Rule 3: To subtract one number (the subtrahend) from another number (the minuend) we changethe sign (we replace + with – or – with +) of the subtrahend, and we perform additioninstead of subtraction.

Example 1.10

Perform the subtraction

Solution:

For this example, both the minuend and subtrahend are positive numbers. The minus signbetween them indicates subtraction. Therefore, we enclose them in parentheses with the positive(+) sign, and we change the sign of the subtrahend from plus to minus, while at the same time, wechange the subtraction operation to addition. Next, we need to add these numbers, one of whichis positive and the other negative. For this addition we follow Rule 2, that is, we subtract the num-ber with the smaller absolute number from the larger. The steps are shown below.

Example 1.11

Perform the subtraction

Solution:

Here, the minuend is positive, the subtrahend is negative, and the minus sign between then indi-cates subtraction. Therefore, we change the sign of the subtrahend from minus to plus and at thesame time we change the subtraction operation to addition. Next, we need to add these two posi-tive numbers, and for this addition we follow Rule 1, that is, we add the absolute values and weplace the plus sign in front of the result. The steps are shown below.

Again, these steps indicate the “train of thought” and the reader is not expected to write down allthese steps when performing arithmetic operations.

16– 7+ 16– +7+ 16 7– 9 9– 9–= = =

39 25–

39 25– +39 +25– +39 25–+= = 39 25– 14= +14 14=

53 18––

53 18–– +53 18–– +53 +18+= = 53 18+ 71= +71=71

Page 19: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 1 Numbers and Arithmetic Operations

1-6 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

Example 1.12

Perform the subtraction

Solution:

Here, the minuend is negative, the subtrahend is positive, and the minus sign between them indi-cates subtraction. Therefore, we enclose 37 in parentheses with the positive (+) sign, then,change the sign of it from plus to minus, and at the same time we change the subtraction opera-tion to addition. Next, we must add these two negative numbers, and for this addition we followRule 1, that is, we add the absolute values and we place the minus sign in front of the result. Thesteps are shown below.

Example 1.13

Perform the subtraction

Solution:

Here, both the minuend and subtrahend are negative, and the minus sign between them indicatessubtraction. Therefore, we change the sign of the subtrahend from minus to plus, and at the sametime we change the subtraction operation to addition. Next, we must add these numbers whichnow have different signs. For this addition we follow Rule 2, that is, we subtract the number withthe smaller absolute number from the larger, and we place the sign of the larger number in front ofthe result. The steps are shown below.

In general, let X be any number; then, the following relations apply for the possible combinationsof addition and subtraction of positive and negative numbers.

(1.1)

86– 37–

86– 37– 86– +37– 86– 37–+= = 86 37+ 123= 123–

75– 125––

75– 125–– 75– +125+= 125 75– 50= +50 50=

+(+X) = +X X=

+ X– X–=

+X– X–=

X–– X=

Page 20: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 1-7Orchard Publications

Multiplication and Division

1.4 Multiplication and DivisionNote 1.1

The multiplication ( ) and division ( ) signs do not interfere with the plus and minus signs of pos-itive and negative numbers; therefore, for the examples which follow, we will omit the stepsinvolving absolute values.

Note 1.2

Multiplication is repeated addition, for instance, . One of the two numbersinvolved in multiplication is the multiplier, and the other is the multiplicand. The dictionary definesmultiplier the number by which another number is multiplied. The multiplicand is defined as thenumber that is or is to be multiplied by another. Thus, in , the multiplier is 5 and the multipli-cand is 3. But since we can change the order of multiplication as , either number canbe the multiplicand or the multiplier. In this text, we will refer to the first number as the multiplierand the second as the multiplicand. The result of the multiplication is called the product.

The following rules apply for multiplication and division of numbers:

Rule 4: When two numbers with the same sign are multiplied, the product will be positive (+). Ifthe numbers have different signs, the product will be negative (–).

Example 1.14

Perform the multiplication

Solution:

For this example, both the multiplier and multiplicand are positive. Since they have the same sign,the product will be positive. The steps are shown below.

Note 1.3

The reader can use a hand calculator to obtain the result. The intent here is to illustrate how thesign of the result is obtained. The same is true for the examples that follow.

Example 1.15

Perform the multiplication

5 3 5 5 5+ + 15= =

5 35 3 3 5=

39 25

39 25 +39 +25 +975 975= = =

53 18–

Page 21: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 1 Numbers and Arithmetic Operations

1-8 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

Solution:

For this example, the multiplier is positive and the multiplicand is negative. Since they have dif-ferent signs, in accordance with Rule 4 the product will be negative. The steps are shown below.

Example 1.16

Perform the multiplication

Solution:

Here, the multiplier is negative and the multiplicand is positive. Since they have different signs, inaccordance with Rule 4, the product will be negative. The steps are shown below.

Example 1.17

Perform the multiplication

Solution:

For this example, both the multiplier and multiplicand are negative. Since they have the samesign, in accordance with Rule 4, the product will be positive. The steps are shown below.

Note 1.4

A rational number is a number that can be expressed as an integer or a quotient of integers,excluding zero as a denominator. In division, the number that is to be divided by another is called

the dividend. For instance, the number is a rational number and the dividend is 27. The divi-

dend is also referred to as the numerator. The number by which the dividend is to be divided, iscalled the divisor. For instance, in the division operation above, the divisor is 3. The divisor is alsocalled the denominator. The number obtained by dividing one quantity by another is the quotient.

Thus, in , the quotient is 9.

Rule 5: When two numbers with the same sign are divided, the quotient will be positive (+). Ifthe numbers have different signs, the quotient will be negative (–).

53 18– +53 18– 954– 954–= = =

86– 37

86– 37 86– +37 3182– 3182–= = =

75– 125–

75– 125– +9375 9375= =

273

------

273

------ 9=

Page 22: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 1-9Orchard Publications

Multiplication and Division

Example 1.18

Perform the division

Solution:

Here, both the dividend and divisor are positive. Since they have the same sign, in accordancewith Rule 5 the quotient will be positive. The steps are shown below.

Example 1.19

Perform the division

Solution:

Here, the dividend is negative and the divisor is positive. Since they have different signs, in accor-dance with Rule 5 the quotient will be negative. The steps are shown below.

Example 1.20

Perform the division

Solution:

Here, the dividend is positive and the divisor is negative. Since they have different signs, in accor-dance with Rule 5 the quotient will be negative. The steps are shown below.

Example 1.21

Perform the division

1255

---------

1255

--------- +125+5

----------------- +25 25= = =

750–10

------------

750–10

------------ 750–+10

----------------- 75– 75–= = =

150075–

------------

150075–

------------ +150075–

-------------------- 20– 20–= = =

450–15–

------------

Page 23: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 1 Numbers and Arithmetic Operations

1-10 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

Solution:

Here, both the dividend and divisor are negative. Since they have the same sign, in accordancewith Rule 5 the quotient will be positive. The steps are shown below.

1.5 Integer, Fractional, and Mixed NumbersA decimal point is the dot in a number that is written in decimal form. Its purpose is to indicatewhere values change from positive to negative powers of 10. Positive and negative powers will bediscussed in Section 1.8. For instance, the number is written in decimal form, and the dotbetween 5 and 3 is referred to as the decimal point.

Every number has a decimal point although it may not be shown. A number is classified as an inte-ger, fractional or mixed depending on the position of the decimal point in that number.

An integer number is a whole number and it is understood that its decimal point is positioned afterthe last (rightmost) digit although not shown. For instance,

The numbers we have used in all examples thus far are integer numbers.

A fractional number, positive or negative, is always a number less than one. It can be expressed in

a rational form such as or in decimal point form such as . When written in decimal point

form, the decimal point appears in front of the first (leftmost) digit. For instance,

where and are fractional numbers expressed in rational form, and and are frac-

tional numbers expressed in decimal point form.

Note 1.5

When writing fractional numbers in decimal form, it is highly recommended that a 0 (zero) iswritten in front of the decimal point. This reduces the possibility of an erroneous reading if thedecimal point goes unnoticed. The presence of a zero in front of the decimal point alerts thereader that a decimal point may follow the zero. We will follow this practice throughout this text.

A mixed number consists of an integer and a fractional number. For instance, the number consists of the integer part and the fractional part as shown below.

450–15–

------------ 450–15–

----------------- +30 30= = =

5.3

7 7.= 305– 305.–= 14108 14108.=

34--- 0.75

12 –1

4 = –.25 = –0.25= .5 = 0.5

12--- 1

4------ 0.5 0.25–

409.0875 409 0.0875

Page 24: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 1-11Orchard Publications

Reciprocals of Numbers

Rule 6: Any number (integer, fractional or mixed) may be written in a rational form where thenumerator (dividend) is the number itself and the denominator (divisor) is 1.

For instance, the numbers , , , and may be written as

1.6 Reciprocals of NumbersThe reciprocal of an integer number is a fraction with numerator 1 and denominator that numberitself. Alternately, since any number can be considered as a fraction with denominator 1, thereciprocal of a fraction is another fraction with the numerator and denominator reversed. Conse-quently, the product (multiplication) of any number by its reciprocal is 1.

Example 1.22

Find the reciprocals of

a. b. c. d.

Solution:

a.

b.

c.

d.

Note 1.6

When either the sign of the numerator or the denominator (but not both) is negative, it is cus-

409.0875 409. 0.0875+= Fractional Integer Mixed

13 385 2.75 22 7

13 131

------= 385 3851

---------= 2.75 2.751

----------= 227

------

227

------

1------= 0.25 0.25

1----------–=–

3 14--- 3.875–

1–2

------

The reciprocal of 3 is 13

The reciprocal of 14 is 4

1 or 4

The reciprocal of –3.875 is 13.875–

--------------------- 0.2581–=

The reciprocal of 12

is 21–

------

Page 25: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 1 Numbers and Arithmetic Operations

1-12 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

tomary to place the minus sign in front of the bar that separates them. For instance,

We must not forget that when the sign of both the numerator and denominator is minus, theresult is a positive number in accordance with Rule 5.

Rule 7: A rational number in which the numerator and denominator are the same number isalways equal to 1 with the proper sign.

For instance,

Rule 8: As a consequence of Rule 7, the value of a rational number is not changed if both numer-ator and denominator are multiplied by the same number.

1.7 Arithmetic Operations with Fractional NumbersThe following rules apply to addition, subtraction, multiplication and division with fractionalnumbers. As stated in Rule 8, the value of a rational number is not changed if both the numeratorand denominator are multiplied by the same number.

Rule 9: To add two or more fractional numbers in rational form, we first express the numbers ina common denominator; then, we add the numerators to obtain the numerator of thesum. The denominator of the sum is the common denominator. If the numbers are in dec-imal point form, we first align the given numbers with the decimal point, and we add thenumbers as it is done in normal addition.

Example 1.23

Perform the addition

Solution:

Before we add these numbers, we must express them in a common (same) denominator form.Here is the same as * and this and the number have the same (common) denomi-nator. Then, by Rule 9,

* Recall that, in accordance with Rule 8, we can multiply both numerator and denominator of by 2 to get .

5–8

------ 58---–= 4

11–--------- 4

11------–=

77--- 1= 12–

12--------- 12

12------– 1–= =

12--- 1

4---+

1 2 2 4 1 4

1 2 2 4

Page 26: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 1-13Orchard Publications

Arithmetic Operations with Fractional Numbers

Note 1.7

In an expression such as the above, the individual numbers and are referred to as theterms of the expression. Of course, an expression may also have three or more terms.

Example 1.24

Perform the addition

(1.2)

Solution:

To perform this addition, we must first express the given numbers so that all have the samedenominator. This can be done by first finding the Least Common Multiple (LCM). The LCM isthe smallest quantity that is divisible by two or more given quantities without a remainder. Forthis example, the LCM is 100 which, when divided by 25, 10 and 20 yields 4, 10 and 5 respec-tively. We can verify that the LCM is 100 with Microsoft Excel* as follows.

Start Excel. The spreadsheet appears with a rectangle in cell A1. The cell which is surrounded bythis rectangle is the selected cell. Thus, when Excel is first invoked (started), the selected cell isA1. You can select any other cell by moving the thick hollow white cross pointer to the desiredcell and click the mouse. Select cell A3. Next, move the mouse towards the top of the screenwhere several icons (symbols and pictures) appear. This is the Standard Toolbar. Click on fx. TheFunction Category menu appears. Select Math & Trig. Scroll down the function name list to locateLCM and click on it. In Number 1 box type 25, in Number 2 type 10, and in Number 3 type 20.Click on OK and observe that Excel displays 100. This is the LCM for this example.

Next, we need to express each of the terms of (1.2) with the common denominator 100. Ofcourse, we must multiply the numerators of each term with the appropriate number so thatnumerical value of each term will not change. The new numerator values are found by multiplyingeach numerator by the quotient obtained by dividing 100 by each of the denominators of (1.2).

Thus, we find the new numerator of by first dividing 100 by 25 and this division yields 4. Then,

we multiply this number by the numerator 1 and we get . Therefore, the number is

* No proficiency with Excel is required. However, the reader must have a Personal Computer (PC) or McIntosh, oraccess to one in which Excel has been installed. Otherwise, he may use a hand calculator which has the LCM fea-ture.

12--- 1

4---+ 2

4--- 1

4---+ 3

4---= =

1 2 1 4

125------ 1

10------ 1

20------+ +

125------

1 4 4=1

25------

Page 27: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 1 Numbers and Arithmetic Operations

1-14 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

now expressed as . Likewise, we express as and as . In other words, we have

multiplied the numerator and denominator of each term by the same number so that their valueswill not change. Then, by Rule 9 we have:

We can verify the answer directly with Excel as follows:

Start with a blank worksheet. Click on the letter A of Column A and observe that the entire col-umn is now highlighted, that is, the background on this column has changed from white to black.Click on Format on the Menu bar (top of the screen) and on the drop menu click on Cells. TheFormat Cells menu appears. Under the Category column select Fraction and on the right side,under Type, select Up to three digits. Click on OK.

In cell A1 type 1/25, in A2 1/10 and in A3 1/20. Observe that these numbers appear on thespreadsheet as entered. After the last entry and pressing the <enter> key, the selected cell is A4.Now, click on the (sum) symbol on the Standard Toolbar. Excel displays =SUM(A1:A3) in A4.Excel is asking us if we want to add the contents of A1 through A3 and display the answer in A4.Of course, this is what we want and we confirm it by pressing the <enter> key. Excel then dis-plays the answer in A4 which is 19/100.

Note 1.8

For brevity, when using Excel in our subsequent discussion, we will omit the word cell and the key<enter>. Thus, B3, C11 etc., will be understood to be cell B3, cell C11 etc. After an entry in acell has been made, it will be understood that the <enter> key was pressed. Also, we will denotesequential selections with the > (greater than) symbol. Thus, in the example above, our prefer-ence to display the numbers in rational form was accomplished by the sequential steps For-mat>Cells>Fraction>Up to three digits>OK.

In Examples 1.23 and 1.24 above, finding the common denominator was an easy task even with-out using Excel. However, in other cases, it may be a tedious process. Consider the followingexample.

Example 1.25

Perform the following addition and express the answer in rational form.

(1.3)

Solution:

To find the LCM here without the use of a hand calculator or a PC, is a formidable task. There-fore, we will use Excel as we did in the previous example. Recall that LCM produces the commondenominator of two or more numbers. The common multiplier for the numbers 4, 5, 7, 12, 16 and

4100--------- 1

10------ 10

100--------- 1

20------ 5

100---------

125------ 1

10------ 1

20------+ + 1 4

25 4--------------- 1 10

10 10------------------ 1 5

20 5---------------+ + 4

100--------- 10

100--------- 5

100---------+ + 19

100---------= = =

34--- 2

5--- 4

7--- 11

12------ 7

16------ 19

22------+ + + + +

Page 28: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 1-15Orchard Publications

Arithmetic Operations with Fractional Numbers

22 is found as follows:

Start with a blank Excel worksheet. Following the same procedure as in Example 1.24, click on fx

in the Standard Toolbar. The Function Category menu appears. Select Math & Trig. Scroll down thefunction name list to locate LCM and click on it. In Number 1 box enter 4, 5, 7, 12, 16, 22 sepa-rated by commas, and observe that Excel displays 18480. This is the LCM for this example.

Now, we need to express each of the terms of (1.3) with the common denominator 18480. Ofcourse, we must multiply the numerators of each term with the appropriate number so thatnumerical value of each term will not change. The new numerator value of each term is found bymultiplying the present numerator by the quotient that is obtained with the division of 18480 by

its respective denominator. Thus, we find the new numerator of by first dividing 18480 by 4;

this division yields 4620. Then, we multiply this number by the present numerator of this term,

that is, 3 and we get . Therefore, the number is expressed as . In other

words, we multiplied both numerator and denominator of by 4620. Likewise, to find the new

numerator of the term , we first divide 18480 by 5 to get 3696. Then, multiplication of this num-

ber by 2 yields the new numerator of the second term which is , and therefore we

express as . Following the same procedure, we express as , as , as

and as . Finally, we find the sum of the given numbers in (1.3) as

This example required a considerable amount of work. This was the procedure one would followbefore the advent of scientific calculators and personal computers. Let us now verify the resultwith Excel directly, that is, without first computing the LCM.

Start with a blank worksheet. Click on the letter A of Column A and observe that the entire col-umn is now highlighted, that is, the background on this column has changed from white to black.Click on Format>Cells>Fraction>Up to three digits>OK.

In A1 through A6, type 3/4, 2/5, 4/7, 11/12/ 7/16 and 19/22 respectively. Observe that these num-

34---

3 4620 13860=34--- 13860

18480---------------

34---

25---

2 3696 7392=

25--- 7392

18480--------------- 4

7--- 10560

18480--------------- 11

12------ 16940

18480--------------- 7

16------

808518480--------------- 19

22------ 15960

18480---------------

34--- 2

5--- 4

7--- 11

12------ 7

16------ 19

22------+ + + + +

3 46204 4620--------------------- 2 3696

5 3696--------------------- 4 2640

7 2640--------------------- 11 1540

12 1540------------------------ 7 1155

16 1155------------------------ 19 840

22 840---------------------+ + + + +=

1386018480--------------- 7392

18480--------------- 10560

18480--------------- 16940

18480--------------- 8085

18480--------------- 15960

18480---------------+ + + + += 72797

18480---------------=

Page 29: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 1 Numbers and Arithmetic Operations

1-16 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

bers appear on the spreadsheet as entered. After the last entry and pressing the <enter> key, theselected cell is A7. Now, click on the (sum) symbol on the Standard Toolbar. Excel displays=SUM(A1:A6) in A7, and is asking us if we want to add the contents of A1 through A6 and dis-play the answer in A7. Of course, this is what we want and we confirm it by pressing the <enter>key. Excel now displays the answer in A4 which is 3881/938. This value is an approximation since

Excel can only display rational numbers up to 3 digits. The exact value is as found above.

We will learn how to compute the percent error in Section 1.14.

Note 1.9

The reader, at this time, may ask why should one waste his time trying to find the solution to aproblem when it can easily be found with a hand calculator or a PC. There is nothing wrong withthis thought provided that we can predict the approximate answer beforehand, or we can deter-mine whether the answer displayed is reasonably correct. We must remember that a PC is a highspeed idiot and will do exactly whatever we will ask it to do. So, if we accidentally enter the wrongnumbers, the answer we will get will definitely be wrong and unless we challenge it, we will acceptit as the correct answer. Likewise, with hand calculators; they display the wrong numbers wheninaccurate numbers are entered, and also when the batteries are running low.

Example 1.26

Perform the addition

Solution:

The LCM for this example is 90. We can verify the answer with Excel as we did in the previousexamples. This is left as an exercise for the reader. Then,

Note 1.10

In the last step above, we divided both the numerator and denominator of by 3, or we can

say that we multiplied each of these by .

Example 1.27

Perform the addition

7279718480---------------

115------ 1

10------–+

115------ 1

10------–+ 1 6

15 6--------------- 1 9

10 9---------------–+ 6

90------ 9

90------–+ 3

90------– 1

30------–= = = =

390------–

13---

512------– 11

24------+

Page 30: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 1-17Orchard Publications

Arithmetic Operations with Fractional Numbers

Solution:

The LCM for this example is 24. Then,

Example 1.28

Perform the addition

Solution:

These numbers are given in decimal point (not rational) form. We can express them in rational

form as and , find the LCM, which, in this case, is 1000, and add them as we did in

Examples 1.23 through 1.27. However, it is easier to add them directly as they appear by aligningthem with the decimal point, then add them as it is done in normal addition. This is shown below.

We will do this simple example with Excel just to become more familiar with spreadsheets.

Start with a blank worksheet or erase the contents of a previous worksheet. We erase the spread-sheet contents by surrounding all entries with a big rectangle that encloses all previous entries.When this is done properly, the selected cells within the rectangle will be highlighted. Press theDelete key on the keyboard and observe that all cells are now blank. Click on the letter A of Col-umn A and observe that the ent i re co lumn i s now h igh l ighted . Cl ick on For-mat>Cells>(tab)Number>(selection)Number and the decimal places box click on the up ordown arrow until the number 3 appears. Click on OK. On A1 type 0.750 and on A2 0.005. Theselected cell is now A3. Next, click on the (sum) symbol on the Standard Toolbar. Excel dis-plays =SUM(A1:A2) in A3, and Excel is asking us if we want to add the contents of A1 and A2 indisplay the answer in A3. This is what we want and we confirm it by pressing the <enter> key.Excel then displays the answer in A3 which is 0.755.

Using Excel for this example, it was not necessary that the numbers are all displayed with thesame number of decimal places. Excel will produce the correct answer if the numbers typed-in donot have the same number of decimal places. We chose to display them as we did just to becomemore familiar with Excel’s format feature.

512------– 11

24------+ 5 2

12 2---------------– 11 1

24 1---------------+ 10

24------– 11

24------+ 1

24------= = =

0.75 0.005+

75100--------- 5

1000------------

0.75 0.005+ 0.7500.005 +

0.755

Page 31: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 1 Numbers and Arithmetic Operations

1-18 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

Rule 10: To subtract a number given in rational form from another number of the same form, wefirst express the numbers in a common denominator; then, we subtract the numerator ofthe subtrahend from the numerator of the minuend to obtain the numerator of the differ-ence. The denominator of the difference is the common denominator. If the numbers arein decimal point form, we first align the given numbers with the decimal point; then, wesubtract the subtrahend from the minuend as it is done in normal subtraction.

Example 1.29

Perform the following subtractions.

a. b. c. d.

Solution:

For (a), (b) and (c) we follow the same steps as we did in Examples 1.23 through 1.27 except thathere we perform subtraction instead of addition. Thus,

a.

b.

c.

d. We follow the same steps as Example in 1.28, except that we perform subtraction instead ofaddition. Then,

Rule 11: To multiply a number given in a rational form by another number of the same form, wemultiply the numerators to obtain the numerator of the product. Then, we multiply thedenominators to obtain the denominator of the product. If the numbers are in decimalpoint form, we multiply the given numbers as is done in normal multiplication, and weplace the decimal point at the position that is equal to the sum of the decimal places ofthe given numbers.

Example 1.30

Perform the following multiplications.

110------ 1

20------– 7

25------ 1

10------–– 5

16------– 1

24------– 0.75 0.005–

110------ 1

20------– 2

20------ 1

20------– 1

20------= =

725------ 1

10------–– 14

50------ 5

50------+ 19

50------= =

516------– 1

24------– 15

48------– 2

48------– 17

48------–= =

0.75 0.005– 0.7500.005 –

0.745

Page 32: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 1-19Orchard Publications

Arithmetic Operations with Fractional Numbers

a. b. c. d .

Solution:

For each of (a), (b) and (c) we multiply the numerators to obtain the numerator of the product,then multiply the denominators to get the denominator of the product in accordance with Rule11. Then,

a.

b.

c.

d. We first perform the multiplication . Next, we place the decimal point at theposition that is equal to the sum of the decimal places of the given numbers starting from therightmost digit of the number we found, i.e., 375, and proceeding to the left. For this example,the multiplier has two decimal places and the multiplicand three; thus, their sum is five. Theproduct is as shown below.

Rule 12: To divide a number (dividend) given in a rational form, by another number (divisor) ofthe same form, we multiply the numerator of the dividend by the denominator of thedivisor to obtain the numerator of the quotient. Then, we multiply the denominator ofthe dividend by the numerator of the divisor to obtain the denominator of the quotient. Ifthe numbers are in decimal point form, we first express them in rational form and con-vert to integers by multiplying both numerator and denominator by the same smallestpossible number that will make them integer numbers; then, we perform division asstated in Rule 5.

Example 1.31

Perform the following divisions.

a. b. c. d.

112------ 1

10------ 3

25------ 1

10------– 23

8------–

112------ 0.75 0.005

112------ 1

10------ 1 1

12 10------------------ 1

120---------= =

325------ 1

10------– 3 1

25 10------------------– 3

250---------–= =

238

------–1

12------ 23 1

8 12---------------– 23

96------–= =

75 5 375=

0.75 0.005 0.750.005 ×

0.00375

112------ 1

10------ 13

12------ 1

10------– 15

8------–

512------ 0.75 0.005

Page 33: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 1 Numbers and Arithmetic Operations

1-20 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

Solution:

For each of (a), (b) and (c) we multiply the numerator of the dividend by the denominator of thedivisor to obtain the numerator of the quotient; then we multiply the denominator of the divi-dend by the numerator of the divisor to get the denominator of the quotient in accordance withRule 12. Then,

a.

b.

c.

d. We first express the given numbers in rational form and we multiply both numerator anddenominator by 1000 to convert them to integers. The division is carried in accordance withRule 5. Then,

d.

Often, the division of two numbers in ratio form is expressed in complex fraction form. A complexfraction is a fraction whose numerator or denominator or both are fractions. The general form of acomplex fraction is

Any complex fraction can be simplified by application of Rule 12 above twice. Alternately, anycomplex fraction can be replaced by a simple fraction whose numerator is the product of the outernumbers X and Z, and whose denominator is the product of the inner numbers Y and W, as shownin the sketch below.

Example 1.32

Simplify the following complex fractions.

112------ 1

10------ 1 10

12 1--------------- 10

12------ 5

6---= = =

1312------ 1

10------– 13 10

12 1------------------– 130

12--------- 65

6------–=–= =

158

------–5

12------ 15 12

8 5------------------– 180

40---------– 9

2---–= = =

0.75 0.005 0.75 × 1000 7500.005 × 1000 5

= = 150

XYW Z

XYW Z

OuterNumbers

InnerNumbers = XZ

YW

Page 34: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 1-21Orchard Publications

Exponents

a. b. c.

Solution:

a. We multiply the outer numbers, i.e., to obtain the numerator and the inner numbers, i.e., to obtain the denominator. Then,

b. The numerator 5 of the given complex fraction can be expressed in rational form as . Then,performing the same steps as in (a), we get

c. The denominator 0.4 is first expressed as . Then,

1.8 Exponents

In the mathematical expression , is the base, is the exponent or power, and is said to be anumber in exponential form. The exponent indicates the number of times the base appears in astring of multiplication operations as illustrated by the following example.

Example 1.33

Express the following numbers in exponential form.

a. b. c. d. e.

Solution:

a. The number (base) 10 appears 4 times and thus the exponent is 4. Then,

47

53

5 34

0.44 1

3 75 4

47

53

= 3 × 75 × 4

= 2120

5 1

34

15

= 5 × 41 × 3

= 203

=5 34

410------

44 = – 1 × 10=0.4

4 1

10

1

3 × 4 = – = – 10 12

56

an a n an

10 10 10 10 5 5 5 3 3 7 7 7 8 8 100 000 000

Page 35: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 1 Numbers and Arithmetic Operations

1-22 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

(Read as 10 to the 4th power)

10 is the base and 4 is the exponent (or power).

b. The number (base) 5 appears 3 times and thus the exponent is 3. Then,

(Read as 5 to the 3rd power or 5 cubed)

5 is the base and 3 is the exponent.

c. The number (base) 3 appears 2 times and thus the exponent is 3. Then,

(Read as 3 to the 2nd power or 3 squared)

3 is the base and 2 is the exponent.

d. (Read as 7 cubed times 8 squared)

7 and 8 are the bases and 3 and 2 are the exponents.

e. As we now know, , and so on. We observethat the exponent is equal to the number of zeros. Conversely, as we found in (a), the expo-nent 4 represents the four zeros of the number . Here, the number has 8zeros and thus can be written in exponential form with base 10 and exponent 8, that is,

Rule 13: Any number written without an exponent is understood to have exponent 1.

Example 1.34

Determine the exponents of the following numbers.

a. b. c. d.

Solution:

In accordance with Rule 13, the exponent of all these numbers is 1. Then,

a. b. c. d.

Rule 14: Any number that has exponent 0 is equal to 1.

Example 1.35

Express the following numbers in their simplest form.

a. b. c. d.

10 10 10 10 10 4=

5 5 5 5 3=

3 3 32=

7 7 7 8 8 7 3 8 2=

100 10 10 10 2= = 1000 10 10 10 10 3

= =

10 000 100 000 000

100 000 000 10 8=

10 3 897– 0.06

101 31 8971– 0.061

100 80 10930– 0.0050

Page 36: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 1-23Orchard Publications

Exponents

Solution:

In accordance with Rule 14, these numbers are all equal to 1, that is,

a. b. c. d.

Rule 15: Any number may be written in powers of 10 multiplied by the appropriate number ofdigits.

Example 1.36

Express the number 65,437 in powers of 10.

Solution:

We observe that the exponents appear in descending order, that is, . This is true for allnumbers expressed as powers of 10.

Rule 16: Any number can be replaced by its reciprocal if the sign of its exponent is changed.Thus,

Example 1.37

Express the following numbers in exponential form.

a. b. c. d. e. f. g. h.

Solution:

The given numbers can be expressed in exponential form by first expressing them in rational formand then applying Rules 13 through 16. Thus,

a.

b.

100 1= 80 1= 10930– 1= 0.0050 1=

65437 60 000 5 000 400 30 7+ + ++=

6 10 000 5 1 000 4 100 3 10 7++++=

6 10 4 5 10 3 4 10 2 3 10 1 7 10 0+ + + +=

4 3 2 1 0

1X

= X–1 and Y = 1

Y–1

0.1 0.01 0.001– 0.5 10.1------- 1

0.01---------- 1

0.001-------------–

10.5-------

0.1 110------ 1

10 1--------- 10 1–

= = =

0.01 1100--------- 1

10 2--------- 10 2–

= = =

Page 37: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 1 Numbers and Arithmetic Operations

1-24 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

c.

d.

e.

f.

g.

h.

For (e), (f), (g) and (h) we have used the results of (a), (b), (c) and (d) respectively.

1.9 Scientific NotationIn any number, the digit immediately to the left of the decimal point occupies the units position,the second digit occupies the tens position, the third the hundreds position, the fourth the thou-sands position and so on. The leftmost digit is the most significant digit (msd) and the rightmost isthe least significant digit (lsd). Thus, in the number 7469.32, the msd is 7 and occupies the thou-sands position, 9 occupies the units position and 2 is the lsd.

Rule 17: A number is said to be written in scientific notation when the decimal point appearsimmediately to the right of the msd.

Therefore, any single digit number such as 1 or 8, or a two-digit number with a decimal pointbetween the digits such as 6.5 or 1.9 is already in scientific notation. Other numbers can be writ-ten in scientific notation using the following rules:

Rule 18: To write an integer or a mixed number in scientific notation, we move the decimalpoint to the left until we reach the msd. We place it immediately to the right of the msd.Then, we multiply the new number by 10 raised to the power that is equal to the num-ber of positions the decimal point was moved to the left.

Example 1.38

Write the following numbers in scientific notation.

a. b. c. d. e.

0.001– 11000------------– 1

103--------– 10 3–

–===

0.5 12--- 1

21----- 2 1–

= = =

10.1------- 1

10 1–----------- 101 10= = =

10.01---------- 1

10 2–----------- 102 100= = =

10.001-------------– 1

10 3–-----------– 103

– 1000–= = =

10.5------- 1

2 1–-------- 21 2= = =

29 765 203982 345.67– 98765.43

Page 38: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 1-25Orchard Publications

Scientific Notation

Solution:

In accordance with Rule 18, for (a) we move the decimal point to the left by one position and wemultiply by 10 with exponent 1. Likewise, for (b) we move the decimal point to the left by twopositions and we multiply by 10 with exponent 2. We follow the same procedure for (c), (d) and(e). Then,

a.

b.

c.

d.

e.

Note 1.11

Scientific calculators and Excel display numbers in scientific notation using the letter E followedby a number that represents the exponent. For instance, the number 98765.43 in scientific nota-tion is displayed as 9.86543E+4. For practice, type in the number 98765.43 in any cell and high-light that cell. Then, perform the sequential steps Format>Cells>Scientific>6(Decimalplaces)>OK. Observe that the number is displayed as 9.86543E+4.

Rule 19: To write a fractional number in scientific notation, we move the decimal point to theright of the msd and we multiply the number by 10 raised to the negative power that isequal to the number of positions the decimal point was moved to the right.

Example 1.39

Write the following numbers in scientific notation.

a. b. c.

Solution:

For (a), the msd is 3; therefore, in accordance with Rule 19, we move the decimal point to its rightone position and we multiply by 10 with exponent 1. For (b), the msd is 4 and thus we need tomove two positions to the right; therefore, we multiply by 10 with exponent 2. We follow thesame procedure for (c). Then,

a. b. c.

29 29. 2.9 101 2.9 10= = =

765 765. 7.65 102= =

203982 203982. 2.03982 105= =

345.67– 3.4567 102–=

98765.43 9.876543 104=

0.37 0.045 0.00123–

0.37 3.7 10 1–= 0.045 4.5 10 2–

= 0.00123– 1.23 10 3––=

Page 39: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 1 Numbers and Arithmetic Operations

1-26 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

1.10 Operations with Numbers in Scientific Notation

Multiplication and division* of very large or very small numbers is simplified with application ofthe following rule:

Rule 20: To multiply two numbers, we perform the following steps:

1. Write the numbers in scientific notation

2. Multiply the parts of the numbers without the 10s and their exponents

3. Multiply the product of Step 2 above by 10 with the exponent obtained by the sum of theexponents of the numbers

Example 1.40

Multiply by

Solution:

We first write the given numbers in scientific notation and in accordance with Rule 20, we firstmultiply 4 by 2.3 which results in the product 9.2. Then, we multiply this product by 10 raised topower 16 which is sum of the exponents of the multiplier and multiplicand as shown below.

Example 1.41

Multiply by

Solution:

We first write the given numbers in scientific notation and, in accordance with Rule 20, we firstmultiply 2.9 by 3 which results in the product 8.7. Then, we multiply this product by 10 raised topower 10 which is the sum of the exponents of the multiplier and multiplicand as shown below.

* Addition and subtraction of numbers in scientific notation is impractical. Accordingly, no examples are given so thatthey will not cause confusion with multiplication and division. Nonetheless, the procedure is as follows:

1. Write the numbers to be added or subtracted in the same power of 10.

2. For addition, add the numbers without the 10s and their exponents. For subtraction, perform subtraction without the 10sand their exponents.

3.Multiply the result (sum or difference) by 10 raised to the same power of step 1.

4 000 000 23 000 000 000

4,000,00023,000,000,000

4 × 10 2.3 × 10

610 ×

9.2 × 1016 Product

0.00029 0.000003

Page 40: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 1-27Orchard Publications

Operations with Numbers in Scientific Notation

Four more examples follow.

a. Multiplication of by

b. Multiplication of by

c. Multiplication of by

d. Multiplication of by

Rule 21: To divide two numbers, we perform the following steps:

1. Write the numbers in scientific notation

2. Divide the parts of the numbers without the 10s and their exponents

3. Multiply the product of Step 2 above by 10 raised to the power obtained by subtracting theexponent of the divisor from the exponent of the dividend.

Example 1.42

Divide by

2.9 × 10 3 × 10

– 4×

8.7 × 10

– 6

–10

0.00029 0.000003 Product

0.000025 8 000 000

2.5 × 10 8 × 10

– 5×

20 × 10

6

= 2 ×102

0.000025 8,000,000 Product

80 000 0.0875–

8 × 10 –8.75 × 10

–2

= –7 × 10

2 3 –70 × 10

80,000 –0.0875 Product

250 000– 0.025

–250,000 0.025

–2.5 × 10 2.5 × 10

–6.25 × 10

–2

2 Product

0.00125– 0.00008–

–0.00125 –0.00008

–1.25 × 10 –8 × 10

–3×

10 × 10 Product

–5

–8= 10–7

45 000 000 1 500 000

Page 41: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 1 Numbers and Arithmetic Operations

1-28 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

Solution:

We first write the given numbers in scientific notation; then, in accordance with Rule 21, we firstdivide 4.5 by 1.5 which results in the quotient 3. Next, we multiply this product by 10 raised topower 1 which is obtained by subtracting the exponent 6 of the divisor from the exponent 7 of thedividend as shown below.

Two more examples follow.

Let us check the last division with Excel. We enter –21,000,000 in A1. We observe that Excel dis-plays this number in scientific notation, i.e., 2.1E+07. We enter –0.0000105 in A2 and weobserve that this number is also displayed in scientific notation as 1.05E-05. Generally, if thenumbers are very large or very small, Excel displays them in scientific notation. Now, the selectedcell is A3 where we type the formula =A1/A2; this formula instructs Excel to divide the contentsof A1, i.e. the number –21,000,000, by the contents of A2, i.e., –0.0000105 and display the quotientin A3. We observe that Excel displays 2E+12.

1.11 Square and Cubic RootsThe square root of a number is the number that, when it is squared, i.e., when multiplied by itself,produces the number under the square root. The square root of a non-negative number can beeither positive or negative. Thus, the square root of 25 is ±5 since both values +5 and –5, whensquared, will produce 25. The square root of a negative number is an imaginary number. We will notbe concerned with the square roots of negative numbers. The square root of a number may beindicated by the square root symbol or with the fractional exponent ½ or 0.5. Thus, the square

root of 25 may be shown as , , or .

Example 1.43

Evaluate the following square roots

a. b. c. d.

45,000,000 1,500,000

4.5 × 10 1.5 × 10

7

3 × 10 Quotient

6

–2,000 500,000

–2 × 10 5 × 10

3

–4 × 10 Quotient

5–3

–21,000,000 –0.0000105

–2.1 × 10 –1.05 × 10

7

2 × 10 Quotient

–5 12

25 251 2 250.5

81 225 0.0625 17.85

Page 42: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 1-29Orchard Publications

Square and Cubic Roots

Solution:

a. The square root of 81 is ±9 since and also. Thus,

b. The square root of 225 is ±15 since and also. Therefore,

c. and also. Thus,

d. The answer is not obvious. However, since and , we expect that thesquare root of 17.85 will be some value between and . There is a procedure for findingthe square root of any number, but it is tedious and thus we will not discuss it here. It can befound in math tables books such as the CRC Standard Mathematical Tables, CRC Press. Instead,we will use Excel as follows:

On the Standard Toolbar click on fx. From the Function Category select Math & Trig. Scrolldown the function name list to locate SQRT and click on it. Type 17.85 in the Number box andobserve the answer displayed as 4.22493. We get the same answer by typing =SQRT(17.85).Computers and calculators return absolute values only. Thus,

The cubic (or cube) root of a number is a number that, when cubed, produces the number underthe cubic root. The cubic root of a positive number is positive, whereas the cubic root of a nega-

tive number is negative. Thus, the cubic root of 125 is 5 since , and the cubic root of –

125 is –5 since . The cubic root of a number is represented by the cubic root symbol or

with the fractional exponent 1 3. Thus, the cubic root of 27 may be written as or .

Example 1.44

Evaluate the following cubic roots.

a. b. c. d.

Solution:

a. The cubic root of 64 is +4 or simply 4 since . It cannot also be 4 since. Thus,

9 9 81= 9 9–– 81=

81 9=

15 15 225= 15 15–– 225=

225 15=

0.25 0.25 0.0625= 0.25 0.25–– 0.0625=

0.0625 0.25=

25 5= 16 4=

4 5

17.85 4.22493=

53 125=

5–3 125–=

273 271 3

643 343–3 0.0033753 38.6853

4 4 4 64=

4 4–– 4– 64–=

Page 43: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 1 Numbers and Arithmetic Operations

1-30 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

b. The cubic root of 343 is 7 since . Thus,

c. The answer is not obvious. There is a procedure for finding the cubic root of any number, but itis very tedious and thus, we will not discuss it here. Instead, we will use Excel as follows:

On the Standard Toolbar, we click on fx. From the Function Category, we select Math & Trig.We scroll down the function name list to locate POWER and we click on it. We type 0.003375in the Number box and in the Power box. Excel returns 0.15. Thus,

d. We will also use Excel. On the Standard Toolbar, we click on fx. From the Function Category, weselect Math & Trig. We scroll down the function name list to locate POWER and we click onit. We type 38.685 in the Number box and in the Power box. Excel returns 3.382. Thus,

This answer looks reasonably correct. Let us check it out by multiplication as follows:

1.12 Common and Natural Logarithms

The common logarithm or base 10 logarithm of a number, denoted as , is the power (exponent)to which the base 10 must be raised to produce that number. Thus, if a number is denoted as M

and , then . For example, since .

Another type of logarithm is the natural or base e logarithm where e = 271828... and it is denotedas ln or loge. It is the exponent to which the base e must be raised to produce that number. Thus, if

a n u m b e r i s d e n o t e d a s N a n d , t h e n . F o r e x a m p l e ,

since . The natural logarithm is mostly used in science and engi-

neering, although it appears also in the computation of some financial functions, as we will see onthe next chapter.

The logarithm (common or natural) of a positive number that is less than 1 is negative. The loga-rithm of a negative number is an imaginary number and, as mentioned before, we will not con-cerned with these numbers.

643 4=

7 7– 7–– 343–=

343–3 7–=

1 3

0.0033753 0.15=

1 3

38.6853 3.382=

3.382 3.382 3.382 38.683=

log10

log10M x= 10 x M= log10100 2= 10 2 100=

logeN Nln y= = e y N=

2ln loge2 0.693= = e0.693 2=

Page 44: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 1-31Orchard Publications

Common and Natural Logarithms

Note 1.12

For brevity, we will use log to represent the common (base 10) logarithm, and ln to represent thenatural (base e) logarithm.

Example 1.45

Evaluate the following logarithms given that and .

a. b. c. d. Solution:

a. The answer must be a number between 2 and 3 because 725 lies between 100 and 1000, and bydefinition, whereas . We will use Excel to find the log of 725.

On the Standard Toolbar, we click on fx. From the Function Category, we select Math & Trig.We scroll down the function name list to locate LOG10 and we click on it. We type 725 in theNumber box and Excel returns 2.86034. Thus,

b. The answer must be a negative number because we are seeking for the log of a number that isless than 1. We will use Excel to find the log of 0.125.

On the Standard Toolbar, we click on fx. From the Function Category, we select Math & Trig.We scroll down the function name list to locate LOG10 and click on it. We type 0.125 in theNumber box and Excel returns 0.90309. Thus,

c. We make use of the fact that and . Therefore, we expect to be a number greater than 2.3 and less than 4.6. Again, we will let Excel compute the answerfor us.

On the Standard Toolbar, we click on fx. From the Function Category, we select Math & Trig.We scroll down the function name list to locate LN, and we click on it. We type 64 in theNumber box, and we observe the answer to be 4.15888. Thus,

d. The answer must be a negative number because we are seeking for the ln of a number less than1. Let us again, use Excel to find the ln0.75.

On the Standard Toolbar, we click on fx. From the Function Category, we select Math & Trig.We scroll down the function name list to locate LN, and we click on it. We type 0.75 in theNumber box and observe the answer 0.28768. Thus,

10ln 2.3026= 100ln 4.6052=

725log 0.125log 64ln 0.75ln

100log 2= 1000log 3=

725log 2.86034=

0.125log 0.90309–=

10ln 2.3026= 100ln 4.6052= 64ln

64ln 4.15888=

0.75ln 0.28768–=

Page 45: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 1 Numbers and Arithmetic Operations

1-32 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

1.13 DecibelA decibel (dB) is a unit that is used to express the relative difference in power or intensity, usuallybetween two acoustic or electric signals. It is equal to ten times the common logarithm of the ratioof the two levels, that is,

(1.4)

Example 1.46

Compute the number of decibels (dB) if 90 represents Level 1 and 20 represents Level 2.

Solution:

and using Excel, we type =LOG(9/2) and Excel returns . Then,

1.14 PercentagesOften, we hear that public securities, such as stocks and bonds, yield interest at a specified per-centage, or banks paying or demanding interest at a specified percentage. Percent, denoted as %, is

a number out of each hundred. For instance, the number 0.75 or is expressed as 75% since it

means 75 out of 100.

Most often, we are interested in changes of percentages. For instance, to find the percent changebetween an old and a new value, we use the formula

* (1.5)

Example 1.47

Joe Smith bought common stock of ABC Corporation at $15.00 per share. Three months later hesold his stock at $21.50 per share. What was his profit expressed in percent?

Solution:

Here, the old (initial) value is $15.00 and the new is $21.50. Then, using (1.5) we get

* The parentheses are used as a reminder that the subtraction must be performed before the multiplication by 100.

dB 10 Level 1Level 2-------------------log=

dB 10 9020------log 10 9

2---log 10 4.5log= = =

0.6532

10 4.5log 10 0.6532 6.532 dB= =

75100---------

% Change New Value Old Value–Old Value

------------------------------------------------------------------- 100=

Page 46: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 1-33Orchard Publications

International System of Units (SI)

In this example, the percent change turned out to be positive. Other times, it can be negative asillustrated by the following example.

Example 1.48

Jim Brown bought common stock at $32.00 per share. Four months later he sold it at $19.00 pershare. What was his loss expressed in percent?

Solution:

Here, the old (initial) value is 32.00 and the new is 19.00. Then, using (1.5) we get

Other times, we want to find the percent error between exact (actual) and measured (experimen-tal) values. In such as case, we express (1.5) as

(1.6)

Example 1.49

In Example 1.25, we found that the exact value of the sum of the given numbers is and the

value returned by Excel is . Compute the percent error.

Solution:

Let us use Excel to simplify these numbers.

We start with a blank worksheet, and in A1 enter =72797/18480. Excel displays 3.939232. In A2,we enter =3881/938 and we observe that Excel displays 4.137527. In A3, we enter the formula=(A2-A1)*100/A1. This is the formula of (1.6) above written in Excel language. Excel now displays5.033851 and this is the percent error. Thus,

1.15 International System of Units (SI)The International System of Units, denoted as SI in all languages, was adopted by the General Con-ference on Weights and Measures in 1960. It is used extensively by the international scientificcommunity. It was formerly known as the Metric System. The SI system basic units are listed inTable 1.1.

% Change 21.50 15.00–15.00

--------------------------------- 100 6.5015.00------------- 100 650

15.00------------- 43.33%= = = =

% Change 19.00 32.00–32.00

--------------------------------- 100 13.00–32.00

---------------- 100 1300–32.00--------------- 40.625– %= = = =

% Error Measured Value Exact Value–Exact Value

---------------------------------------------------------------------------------- 100=

7279718480---------------

3881938

------------

% Error 4.137527 3.939232–3.939232

------------------------------------------------------- 100 5.03%= =

Page 47: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 1 Numbers and Arithmetic Operations

1-34 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

The basic units of the SI system are often expressed in smaller or larger units by various powers of10 known as standard prefixes. The common prefixes are listed in Table 1.2, and the less frequentlyused are listed in Table 1.3.

Table 1.4 shows some conversion factors between the SI and the English system. For other con-versions, the Microsoft Excel CONVERT function can be used. This will be discussed next.

Table 1.5 shows typical temperature values in degrees Fahrenheit and the equivalent temperaturevalues in degrees Celsius and degrees Kelvin.

Other units used in physical sciences and electronics are derived from the SI base units and themost common are listed in Table 1.6.

TABLE 1.1 SI Base Units

Unit of Name AbbreviationLength Metre mMass Kilogram kgTime Second sElectric Current Ampere ATemperature Degrees Kelvin °KAmount of Substance Mole molLuminous Intensity Candela cdPlane Angle Radian radSolid Angle Steradian sr

TABLE 1.2 Most Commonly Used SI Prefixes

Value Prefix Symbol Example

109 Giga G 12 GHz (Gigahertz) = 12 × 109 Hz

106 Mega M 25 M Megaohms) = 25 × 106 (ohms)

103 Kilo K 13.2 KV (Kilovolts) = 13.2 × 103 volts

10–2 centi c 2.8 cm (centimeters) = 2.8 x 10–2 meter

10–3 milli m 4 mH (millihenries) = 4 × 10–3 henry

10–6 micro µ 6 µw (microwatts) = 6 × 10–6 watt

10–9 nano n 2 ns (nanoseconds) = 2 × 10–9 second

10–12 pico p 3 pF (picofarads) = 3 × 10-12 Farad

Page 48: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 1-35Orchard Publications

International System of Units (SI)

TABLE 1.3 Less Frequently Used SI Prefixes

Value Prefix Symbol Example

1018 Exa E 1 Em (Exameter) = 1018 meters

1015 Peta P 5 Pyrs Petayears) = 5 × 1015 years

1012 Tera T 3 T$ (Teradollars) = 3 × 1012 dollars

10–15 femto f 7 fA (femtoamperes) = 7 x 10–15 ampere

10–18 atto a 9 aC (attocoulombs) = 9 × 10–18 coulomb

TABLE 1.4 Conversion Factors

1 in. (inch) 2.54 cm (centimeters)1 mi. (mile) 1.609 Km (Kilometers)1 lb. (pound) 0.4536 Kg (Kilograms)1 qt. (quart) 946 cm3 (cubic centimeters)1 cm (centimeter) 0.3937 in. (inch)1 Km (Kilometer) 0.6214 mi. (mile)1 Kg (Kilogram) 2.2046 lbs (pounds)

1lt. (liter) = 1000 cm3 1.057 quarts

1 Å (Angstrom) 10–10 meter1 m (micron) 10–6 meter

TABLE 1.5 Temperature Scales Equivalents

°F °C °K

–523.4 –273 032 0 2730 –17.8 255.2

77 25 29898.6 37 310212 100 373

Page 49: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 1 Numbers and Arithmetic Operations

1-36 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

We will conclude this chapter with a few examples, to illustrate the use of the CONVERT func-tion in Excel.

Example 1.50

Use the Excel CONVERT function to convert 54 °F to degrees Celsius.

Solution:

On the Standard Toolbar, we click on fx. From the Function Category, we select Engineering. Wescroll down the function name list to locate CONVERT, and we click on it. We type 54 in theNumber box, F in the From_Unit box and C in the To_Unit box. We click on OK, and we observethe answer 12.22 °C rounded to two decimal places.

TABLE 1.6 SI Derived Units

Unit of Name FormulaForce Newton (N) N = Kg•m s2

Pressure Pascal (Pa) Pa = N m2

Stress Pascal (Pa) Pa = N m2

Work Joule (J) J = N•mEnergy Joule (J) J = N•mPower Watt (W) W = J sVoltage Volt (V) V = W AResistance Ohm ( ) = V AConductance Siemens (S) S = A VCapacitance Farad (F) F = A•s VInductance Henry (H) H = V•s AFrequency Hertz (Hz) Hz = 1 sQuantity of Electricity Coulomb (C) C = A•sMagnetic Flux Weber (Wb) Wb = V•sMagnetic Flux Density Tesla (T) T = Wb m2

Luminous Flux Lumen (lm) lm = cd•srIlluminance Lux (lx) lx = lm m2

Radioactivity Becquerel (Bq) Bq = s–1

Radiation Dose Gray (Gy) Gy = J Kg Volume Litre (L) L = m3 × 10–3

Page 50: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 1-37Orchard Publications

Graphs

Example 1.51

Use the Microsoft Excel CONVERT function to convert 42 °C to degrees Fahrenheit.

Solution:

On the Standard Toolbar, we click on fx. From the Function Category, we select Engineering. Wescroll down the function name list to locate CONVERT, and we click on it. We type 42 in theNumber box, C in the From_Unit box and F in the To_Unit box. We click on OK, and we observethe answer 107.6 °F.

Note 1.13

To find out what entries are allowed on the From_Unit and To_unit boxes, when using the CON-VERT function, we click on Help on the Standard Toolbar, and on the pull-down menu, we clickon Contents and Index. We select Index on the upper left corner, and we scroll down to CONVERTWorksheet Function. We click on Display, and we see a detailed description of the CONVERT func-tion. We also see a list of text that CONVERT accepts as valid entries for the From_Unit andTo_unit boxes.

Example 1.52

Use the CONVERT function to convert 55 miles to kilometers.

Solution:

On the Standard Toolbar we click on fx. From the Function Category, we select Engineering. Wescroll down the function name list to locate CONVERT, and we click on it. We type 55 in theNumber box, mi in the From_Unit box and m in the To_Unit box. We click on OK and we observethe answer 88514 meters or 88.514 Km.

1.16 GraphsA graph shows two or more related quantities in pictorial form. Two common forms of graphs arethe Cartesian or Rectangular form and the Polar form. Figure 1.2 shows a Cartesian form of a graphwith the horizontal axis labeled x axis (abscissa) and the vertical axis labeled y axis (ordinate). Theabscissa and ordinate are the co-ordinates of the Cartesian graph. The 0 (zero) point is the inter-section of the co-ordinates.

All values to the right of the zero point, represent positive values of x while those to the left, rep-resent negative values. Likewise, all values above the zero point represent positive values of y,while those below are negative values. Any point on the plane, formed by the x and y axes is desig-nated as P(x,y). Thus, point A is identified as A(3,2) since it is located 3 units to the right of theorigin (zero), and 2 units above the origin in the y axis direction. Likewise, point B is identified asB(–2,4) since it is located 2 units to the left of the origin (zero) in the x axis, and 4 units above theorigin in the y axis direction. Points C and D are identified similarly.

Page 51: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 1 Numbers and Arithmetic Operations

1-38 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

Figure 1.2. Cartesian (rectangular) co-ordinates graph

Figure 1.3 shows a polar form of a graph. Any point on this graph, is identified by its distance fromthe origin, and the angle that the line connecting the origin and that point, makes with the hori-zontal line of the graph, starting at zero degrees point and rotating counterclockwise. The polarform is used in navigation and radar detection, and we will not be concerned with this type.

Figure 1.3. Polar graph

-6 -5 -4 -3 -2 -1 1 2 3 4 5 6

654321

-1-2-3-4-5

0

A(3,2)

y axis

x axis

B(–2,4) •

C(–4,–3) •D(2,–4)

A

B

0 1 2

00

3600

900

1800

2700

Vector A is 1 unit long andforms 45 degrees angle withthe right side of the horizontalaxis.

Vector B is 2 units long andforms –45 (or 315) degreesangle with the right side of the horizontal axis.

Direction of Rotation is Counterclockwise

Page 52: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 1-39Orchard Publications

Graphs

Any line from the origin to any other point is a vector. A vector is a line that is specified by itslength from a reference point, normally the origin, and the angle it forms with a reference axis,normally the horizontal axis. Thus, A and B in Figure 1.3 are vectors. A phasor is a rotating vec-tor. For example, if vector A rotates (normally counterclockwise), then it is referred to as a pha-sor.

Figure 1.4 shows a graph with a constant value of 12 units. This graph is referred to as a uniformfunction, since the number of units does not change with time. Thus, if the ordinate v represents aphysical quantity such as the voltage of an automobile battery, we see that this voltage has thesame value of 12 volts for all times.

Figure 1.5 shows a linear graph. It is called linear because there is a linear (straight line) relation-ship between the quantities represented by the coordinates. Linear graphs have the property thatequal increments in the abscissa produce equal increments on the ordinate axis.

Figure 1.4. Graph of a uniform function

Figure 1.5. Linear graph

Figure 1.6 shows two non-linear graphs on the same set of a Cartesian form. As indicated, one is arising exponential, and the other a decaying exponential. We will encounter a rising exponentialcurve in Chapter 9 when we discuss the exponential distribution. Decaying exponential curves areused in many applications such as in radioactivity, which is a topic discussed in physics and chemis-try. For instance, the decay rate of radioactive elements can be represented by decaying exponen-

63

9

12

v

t 2 1 3 4 5 6 7 8 9 10 11

5

20

y

x 2 1 3 4 5 6 7 8 9 10 11

10

15

Page 53: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 1 Numbers and Arithmetic Operations

1-40 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

tials. The isotope* Thorium 234, for example, decays to half of its original radioactivity in 25 days,and thus, it is said to have a half-life of 25 days. However, Thorium 232 has a half-life of approxi-mately 14 billion years.

Figure 1.6. Non-linear (exponential) graphs

Non-linear graphs are those that do not produce equal increments on the ordinate axis for equalincrements on the abscissa.

Figure 1.7 is a sinewave graph, which is also a non-linear graph. Sinewaves are used extensively inAC Electronics to represent time-varying quantities such as voltage and current.

Figure 1.7. Sinewave graph.

* Isotopes are discussed in physics and chemistry textbooks. Briefly, an isotope is one of two or more atoms havingthe same atomic number but different mass numbers.

Rising Exponential

Decaying Exponential

Page 54: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 1-41Orchard Publications

Summary

1.17 Summary• The decimal (base 10) number system uses the digits (numbers) 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9.

This is the number system we use in our everyday arithmetic calculations such as the monetarytransactions.

• A positive number is a number greater than zero and it is understood to have a plus (+) sign infront of it. The (+) sign in front of a positive number is generally omitted. Thus, any numberwithout a sign in front of it is understood to be a positive number.

• A negative number is less than zero and it is written with a minus (–) sign in front of it. Theminus ( ) sign in front of a negative number is a must; it is necessary so that we can distinguishnegative numbers from the positive numbers.

• Positive and negative numbers can be whole (integer) or fractional numbers. To avoid confu-sion between the addition operation (+) and positive numbers, which are also denoted withthe (+) sign, we enclose positive numbers with their sign inside parentheses whenever neces-sary. Likewise, we enclose negative numbers in parentheses to distinguish them from the sub-traction ( ) symbol.

• The number 0 (zero) is considered neither positive nor negative; it is the number that separatesthe negative from the positive numbers.

• The positive and negative numbers we are familiar with, are referred to as the real numbers.

• The absolute value of a number is that number without a positive or negative sign, and isenclosed in small vertical lines. Thus, the absolute value of X is written as |X|.

• To add numbers with the same sign, we add the absolute values of these numbers and place thecommon sign (+ or –) in front of the result (sum). We can omit the plus sign in the result ifpositive. We must not omit the minus sign if the result is negative.

• For the subtraction A–B, the number A is called the minuend and the number B is called thesubtrahend. The result of the subtraction is called the difference.

• To add two numbers with different signs, we subtract the number with the smaller absolutevalue from the number with the larger absolute value, and we place the sign of the larger num-ber in front of the result (sum).

• To subtract one number (the subtrahend) from another number (the minuend) we change thesign (we replace + with – or – with +) of the subtrahend, and we perform addition instead ofsubtraction.

• Let X be any number; then, the following relations apply for the possible combinations of addi-tion and subtraction of positive and negative numbers.

Page 55: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 1 Numbers and Arithmetic Operations

1-42 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

• When two numbers with the same sign are multiplied, the product will be positive (+). If thenumbers have different signs, the product will be negative (–).

• A rational number is a number that can be expressed as an integer or a quotient of integers,excluding zero as a denominator. In division, the number that is to be divided by another iscalled the dividend. For the ratio form the dividend is . The dividend is also referred toas the numerator. The number by which the dividend is to be divided, is called the divisor. Forthe ratio form the divisor is . The divisor is also called the denominator. The numberobtained by dividing one quantity by another is the quotient.

• When two numbers with the same sign are divided, the quotient will be positive (+). If thenumbers have different signs, the quotient will be negative (–).

• A decimal point is the dot in a number that is written in decimal form. Its purpose is to indicatewhere values change from positive to negative powers of 10. Every number has a decimalpoint although it may not be shown.

• A number is classified as an integer, fractional or mixed depending on the position of the decimalpoint in that number.

• An integer number is a whole number and it is understood that its decimal point is positionedafter the last (rightmost) digit although not shown.

• A fractional number, positive or negative, is always a number less than one. It can be expressedin a rational form such as or in decimal point form as . When a fractional number iswritten in decimal point form, the decimal point appears in front of the first (leftmost) digit.

• A mixed number consists of an integer and a fractional number separated by the decimal point.For instance, the number consists of the integer part and the fractional part

.

• Any number (integer, fractional or mixed) may be written in a rational form where the numer-ator (dividend) is the number itself and the denominator (divisor) is 1.

• The reciprocal of an integer number is a fraction with numerator 1 and denominator that num-ber itself. Since any number can be considered as a fraction with denominator 1, the reciprocalof a fraction is another fraction with the numerator and denominator reversed. The product(multiplication) of any number by its reciprocal is 1.

+(+X) = +X X=

+ X– X–=

+X– X–=

X–– X=

A B A

A B B

3 4 0.75

409.0875 4090.0875

Page 56: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 1-43Orchard Publications

Summary

• The value of a rational number is not changed if both numerator and denominator are multi-plied by the same number.

• To add two or more fractional numbers in rational form, we first express the numbers in a com-mon denominator; then, we add the numerators to obtain the numerator of the sum. Thedenominator of the sum is the common denominator. If the numbers are in decimal pointform, we first align the given numbers with the decimal point, and we add the numbers as it isdone in normal addition.

• The Least Common Multiple (LCM) is the smallest quantity that is divisible by two or moregiven quantities without a remainder.

• To subtract a number given in rational form from another number of the same form, we firstexpress the numbers in a common denominator; then, we subtract the numerator of the sub-trahend from the numerator of the minuend to obtain the numerator of the difference. Thedenominator of the difference is the common denominator. If the numbers are in decimal pointform, we first align the given numbers with the decimal point; then, we subtract the subtra-hend from the minuend as it is done in normal subtraction.

• To multiply a number given in a rational form by another number of the same form, we multi-ply the numerators to obtain the numerator of the product. Then, we multiply the denomina-tors to obtain the denominator of the product. If the numbers are in decimal point form, wemultiply the given numbers as is done in normal multiplication, and we place the decimal pointat the position that is equal to the sum of the decimal places of the given numbers.

• To divide a number (dividend) given in a rational form, by another number (divisor) of thesame form, we multiply the numerator of the dividend by the denominator of the divisor toobtain the numerator of the quotient. Then, we multiply the denominator of the dividend bythe numerator of the divisor to obtain the denominator of the quotient. If the numbers are indecimal point form, we first express them in rational form and convert to integers by multiply-ing both numerator and denominator by the same smallest possible number that will makethem integer numbers; then, we perform the division.

• A complex fraction is a fraction whose numerator or denominator or both are fractions. Thegeneral form of a complex fraction is

Any complex fraction can be replaced by a simple fraction whose numerator is the product ofthe outer numbers X and Z, and whose denominator is the product of the inner numbers Y andW, as shown in the sketch below.

XYW Z

Page 57: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 1 Numbers and Arithmetic Operations

1-44 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

• In the mathematical expression , is the base, is the exponent or power, and is said tobe a number in exponential form. The exponent indicates the number of times the base appearsin a string of multiplication operations.

• Any number written without an exponent is understood to have exponent 1.

• Any number that has exponent 0 is equal to 1.

• Any number may be written in powers of 10 multiplied by the appropriate number of digits.

• Any number can be replaced by its reciprocal if the sign of its exponent is changed.

• In any number, the digit immediately to the left of the decimal point occupies the units posi-tion, the second digit occupies the tens position, the third the hundreds position, the fourth thethousands position and so on. The leftmost digit is the most significant digit (msd) and the right-most is the least significant digit (lsd).

• A number is said to be written in scientific notation when the decimal point appears immedi-ately to the right of the msd.

• To write an integer or a mixed number in scientific notation, we move the decimal point to theleft until we reach the msd. We place it immediately to the right of the msd. Then, we multiplythe new number by 10 raised to the power that is equal to the number of positions the decimalpoint was moved to the left.

• To write a fractional number in scientific notation, we move the decimal point to the right ofthe msd and we multiply the number by 10 raised to the negative power that is equal to thenumber of positions the decimal point was moved to the right.

• Multiplication of very large or very small numbers is simplified with application of the follow-ing rule:

1. Write the numbers in scientific notation

2. Multiply the parts of the numbers without the 10s and their exponents

3. Multiply the product of Step 2 above by 10 with the exponent obtained by the sum of theexponents of the numbers

• Division of very large or very small numbers is simplified with application of the following rule:

1. Write the numbers in scientific notation

2. Divide the parts of the numbers without the 10s and their exponents

XYW Z

OuterNumbers

InnerNumbers = XZ

YW

an a n an

Page 58: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 1-45Orchard Publications

Summary

3. Multiply the product of Step 2 above by 10 raised to the power obtained by subtracting theexponent of the divisor from the exponent of the dividend.

• The square root of a number is the number that, when it is squared, i.e., when multiplied byitself, produces the number under the square root. The square root of a non-negative numbercan be either positive or negative. The square root of a negative number is an imaginary number.

• The cubic (or cube) root of a number is a number that, when cubed, produces the number underthe cubic root. The cubic root of a positive number is positive, whereas the cubic root of a neg-ative number is negative. The cubic root of a number is represented by the cubic root symbol

or with the fractional exponent 13, i.e., .

• The common logarithm or base 10 logarithm of a number, denoted as , is the power (expo-nent) to which the base 10 must be raised to produce that number. Thus, if a number is

denoted as M and , then .

• The natural or base e logarithm where e = 271828... denoted as ln or loge, is the exponent towhich the base e must be raised to produce that number. Thus, if a number is denoted as N and

, then .

• The logarithm (common or natural) of a positive number that is less than 1 is negative. Thelogarithm of a negative number is an imaginary number.

• A decibel (dB) is a unit that is used to express the relative difference in power or intensity, usu-ally between two acoustic or electric signals. It is equal to ten times the common logarithm ofthe ratio of the two levels, that is,

• Percent, denoted as %, is a number out of each hundred. The percent change between an oldand a new value is found by application of the formula

• The percent error between exact (actual) and measured (experimental) values can be found byapplication of the formula

• The International System of Units, denoted as SI in all languages, was adopted by the GeneralConference on Weights and Measures in 1960. It is used extensively by the international scien-tific community. It was formerly known as the Metric System.

A

A3 A1 3

log10

log10M x= 10 x M=

logeN Nln y= = e y N=

dB 10 Level 1Level 2-------------------log=

% Change New Value Old Value–Old Value

------------------------------------------------------------------- 100=

% Error Measured Value Exact Value–Exact Value

---------------------------------------------------------------------------------- 100=

Page 59: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 1 Numbers and Arithmetic Operations

1-46 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

1.18 Exercises1. Write the following numbers in scientific notation.

a. b. c.

d. e. f.

2. Perform the following multiplications. The answers need not be in scientific notation.

a. b.

c. d.

3. Perform the following divisions. The answers need not be in scientific notation.

a. b.

c. d.

4. Perform the following temperature scale conversions. Round your answers to the nearest inte-ger.

a. 40 °C to °F b. 60 °F to °C c. 50 °C to °K

d. 320 °K to °C e. 90 °F to °K f. 350 °K to °F

54 000 67 000 000 89 000 000 000

0.0045 0.0000076 0.00000000098

1.2 105 2.1 108 3.4 107 4.3 10 2–

5.6 10 9– 6.5 106 7.9 10 12– 9.8 10 6–

5 108 1.25 104 7.5 103 2.5 109

8 10 7– 2 105 9 10 6– 3 10 9–

Page 60: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 1-47Orchard Publications

Solutions to Exercises

1.19 Solutions to Exercises

Dear Reader:

The remaining pages on this chapter contain the solutions to the exercises.

You must, for your benefit, make an honest effort to find the solutions to the exercises withoutfirst looking at the solutions that follow. It is recommended that first you go through and work outthose you feel that you know. For the exercises that you are uncertain, review this chapter and tryagain. Refer to the solutions as a last resort and rework those exercises at a later date.

You should follow this practice with the rest of the exercises of this book.

Page 61: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 1 Numbers and Arithmetic Operations

1-48 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

1.

a. b. c.

d. e. f.

2.

a. , , and thus

b. , , and thus

c. , , and thus

d. , , and thus

3.

a. , , and thus

b. , , and thus

c. , , and thus

d. , , and thus

4. Using the procedures that we used in Examples 1.50 and 1.51 we get:

a. =CONVERT(40,"C","F")=104 °F

b. =CONVERT(60,"F","C")= 16 °C

c. =CONVERT(50,"C","K")= 323 °K

d. =CONVERT(320,"K","C")= 47 °C

e. =CONVERT(90,"F","K")=305 °K

f. =CONVERT(350,"K","F")=170 °F

54 000 5.4 104= 67 000 000 6.7 107= 89 000 000 000 8.9 1010=

0.0045 4.5 10 3–= 0.0000076 7.6 10 6–= 0.00000000098 9.8 10 10–=

1.2 2.1 2.52= 5 8+ 13= 1.2 105 2.1 108 2.52 1013=

3.4 4.3 14.62= 7 2–+ 5= 3.4 107 4.3 10 2– 14.62 105=

5.6 6.5 36.4= 9– 6+ 3= 5.6 10 9– 6.5 106 36.4 103=

7.9 9.8 77.42= 12– 6–+ 18–= 7.9 10 12– 9.8 10 6– 77.42 10 18–=

5 1.25 4= 8 4– 4= 5 108 1.25 104 4 104=

7.5 2.5 3= 3 9– 6–= 7.5 103 2.5 109 3 10 6–=

8 2 4= 7– 5– 12–= 8 10 7– 2 105 4 10 12–=

9 3 3= 6– 9–– 3= 9 10 6– 3 10 9– 3 103=

Page 62: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 2-1Orchard Publications

Chapter 2

Elementary Algebra

his chapter is an introduction to algebra and algebraic equations. It is aimed for readerswho feel that they need an algebra review for understanding and working with simple alge-braic equations. It also introduces some financial functions that are used with Excel.

2.1 IntroductionAlgebra is the branch of mathematics in which letters of the alphabet represent numbers or a set ofnumbers. Equations are equalities that indicate how some quantities are related to others. Forexample, the equation

(2.1)

is a relation or formula that enables us to convert degrees Fahrenheit, , to degrees Celsius, .For instance, if the temperature is , the equivalent temperature in is

We observe that the mathematical operation in parentheses, that is, the subtraction of from, was performed first. This is because numbers within parentheses have precedence (priority)

over other operations.

In algebra, the order of precedence, where is the highest and is the lowest, is as follows:

1. Quantities inside parentheses ( )

2. Exponentiation

3. Multiplication and Division

4. Addition or Subtraction

Example 2.1Simplify the expression

Solution:

This expression is reduced in steps as follows:

T

C 59--- F 32–=

F C77 F C

C 59--- 77 32–

59--- 45 25= = =

3277

1 4

a 23–

8 3– 2 4----------------------------=

Page 63: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 2 Elementary Algebra

2-2 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

Step 1. Subtracting from inside the parentheses yields . Then,

Step 2. Performing the exponentiation operations we get

Step 3. Multiplying by we get

Step 4. Dividing by we get (Simplest form)

An equality is a mathematical expression where the left side is equal to the right side. For example,is an equality since the left and right sides are equal to each other.

2.2 Algebraic EquationsAn algebraic equation is an equality that contains one or more unknown quantities, normally repre-sented by the last letters of the alphabet such as , , and . For instance, the expressions

, , and are algebraic equations. In the last two equations, themultiplication sign between and and and is generally omitted; thus, they are written as

and . Henceforth, terms such as will be interpreted as , as ,and, in general, as .

Solving an equation means finding the value of the unknown quantity that will make the equationan equality with no unknowns. The following properties of algebra enable us to find the numericalvalue of the unknown quantity in an equation.

Property 1

The same number may be added to, or subtracted from both sides of an equation.

Example 2.2 Given the equality

prove that Property 1 holds if we

a. add to both sides

b. subtract from both sides

Proof:

a. Adding to both sides we get

3 8 5 a 23–

52 4--------------=

a 8–25 4---------------=

25 4 a 8–100---------=

8– 100 a 0.08–=

7 3+ 10=

x y zx 5+ 15= 3 y 24= x y 12=

3 y x y3y 24= xy 12= 3y 3 y xy x y

XY X Y

7 5+ 12=

3

2

3

Page 64: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 2-3Orchard Publications, Fremont, California

Algebraic Equations

or and thus, the equality holds.

b. Subtracting from both sides we get

or and thus, the equality holds.

Example 2.3Solve the following equation, that is, find the value of x.

Solution:

We need to find a value for so that the equation will still hold after the unknown x has beenreplaced by the value that we have found. For this type of equations, a good approach is to find anumber that when added to or subtracted from both sides of the equation, the left side will con-tain only the unknown . For this example, this will be accomplished if we add to both sides ofthe given equation. When we do this, we get

and after simplification, we obtain the value of the unknown x as

We can check this answer by substitution of into the given equation. Thus, or. Therefore, our answer is correct.

Example 2.4

Solve the following equation, that is, find the value of .

Solution:

Again, we need to find a number such that when added to or subtracted from both sides of theequation, the left side will have the unknown only. In this example, this will be accomplished ifwe subtract 5 from both sides of the given equation. Doing this, we get

and after simplification, we obtain the value of the unknown as

To verify that this is the correct answer, we substitute this value into the given equation and weget or .

7 5 3+ + 12 3+= 15 15=

2

7 5 2–+ 12 2–= 10 10=

x 5– 15=

x

x 5

x 5– 5+ 15 5+=

x 20=

x 20 5– 15=

15 15=

x

x 5+ 15=

x

x 5 5–+ 15 5–=

x

x 10=

10 5+ 15= 15 15=

Page 65: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 2 Elementary Algebra

2-4 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

Property 2

Each side of an equation can be multiplied or divided* by the same number.

Example 2.5

Solve the following equation, that is, find the value of .

(2.2)

Solution:

We need to eliminate the denominator on the left side of the equation. This is done by multi-plying both sides of the equation by . Then,

and after simplification we get(2.3)

To verify that this is correct, we divide by ; this yields , and this is equal to the right side ofthe given equation.

Note 2.1

In an algebraic term such as or , the number or symbol multiplying a variable or anunknown quantity is called the coefficient of that term. Thus, in the term 4x, the number is thecoefficient of that term, and in , the coefficient is . Likewise, the coefficient of y in(2.2) is , and the coefficient of y in (2.3) is since . In other words, every algebraicterm has a coefficient, and if it is not shown, it is understood to be since, in general, .

Example 2.6

Solve the following equation, that is, find the value of .

Solution:We need to eliminate the coefficient of on the left side of the equation. This is done by divid-ing both sides of the equation by . Then,

and after simplification

* Division by zero is meaningless; therefore, it must be avoided.

y

y3--- 24=

33

y3--- 3 24 3=

y 72=

72 3 24

4x a b+ x4

a b+ x a b+

1 3 1 1y y=

1 1x x=

z

3z 24=

3 z3

3z3----- 24

3------=

z 8=

Page 66: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 2-5Orchard Publications, Fremont, California

Laws of Exponents

Other algebraic equations may contain exponents and logarithms. For those equations we mayneed to apply the laws of exponents and the laws of logarithms. These are discussed next.

2.3 Laws of ExponentsIn Chapter 1, we learned that for any number a and for a positive integer m, the exponential num-

ber is defined as

(2.4)

where the dots between the a’s in (2.4) denote multiplication.

The laws of exponents state that

(2.5)

(2.6)

(2.7)

The nth root is defined as the inverse of the nth exponent, that is, if

(2.8)

If, in (2.11) n is an odd positive integer, there will be a unique number satisfying the definition for

for any value of a*. For instance, and .

If, in (2.11) n is an even positive integer, for positive values of a there will be two values, one pos-itive and one negative. For instance, . For additional examples, the reader may referto the section on square and cubic roots in Chapter 1.

If, in (2.8) n is even positive integer and a is negative, cannot be evaluated. For instance, cannot be evaluated; it results in a complex number.

It is also useful to remember the following definitions from Chapter 1.

* In advance mathematics, there is a restriction. However, since in this text we are only concerned with real num-bers, no restriction is imposed.

am

a a a a

m number of a s=

am an am n+=

am

an------

am n– if m n 1 if m n=

1an m–------------ if m n

=

am namn=

bn a then b an= =

an 5123 8= 512–3 8–=

121 11=

an 3–

Page 67: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 2 Elementary Algebra

2-6 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

(2.9)

(2.10)

(2.11)

These relations find wide applications in business, science, technology, and engineering. We willconsider a few examples to illustrate their application.

Example 2.7 The equation for calculating the present value (PV) of an ordinary annuity is

(2.12)

where

PV = cost of the annuity at present

Payment = amount paid at the end of the year

Interest = Annual interest rate which the deposited money earns

n = number of years the Payment will be received.

Example 2.8

Suppose that an insurance company offers to pay us at the end of each year for the next years provided that we pay the insurance company now, and we are told that our

money will earn per year. Should we accept this offer?

Solution:

, , and . Let us calculate PV using (2.12).

(2.13)

We will use Excel to compute (2.13). We select any cell and we type in the following expressionwhere the asterisk (*) denotes multiplication, the slash ( / ) division, and the caret (^) exponenti-ation.

=12000*(1 (1+0.08)^( 25))/0.08

Excel returns and this is the fair amount that if deposited now at interest, will earn per year for years. This is less than which the insurance company asks for,

and therefore, we should reject the offer.

a0 1=

a p q apq=

a 1– 1a1----- 1

a---= =

PV Payment 1 1 Interest+ n––Interest

------------------------------------------------=

$12,00025 $130,000

8%

Payment $12,000= Interest 0.08 (8%)= n 25 years=

PV 12000 1 1 0.08+ 25––0.08

----------------------------------------=

$128,097 8%$12,000 25 $130,000

Page 68: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 2-7Orchard Publications, Fremont, California

Laws of Exponents

Excel has a “build-in” function, called PV that computes the present value directly, that is, with-out the formula of (2.12). To use it , we perform the sequential steps f x>Finan-cial>PV>Rate=0.08>Nper=25>Pmt=12000>OK. We observe that the numerical value isthe same as before, but it is displayed in red and within parentheses, that is, as negative value. It isso indicated because Excel interprets outgoing money as negative cash.

Note 2.2

Excel has several financial functions that apply to annuities. It is beyond the scope of this text todiscuss all of them. The interested reader may invoke the Help feature in Excel to get the descrip-tion of these functions.

Property 3

Each side of an equation can be raised to the same power

Example 2.9

Solve the following equation, that is, find the value of .

(2.14)Solution:

As a first step, we use the alternate designation of the square root; this was discussed in Chapter1. Then,

(2.15)

Next, we square (raise to power 2) both sides of (2.15), and we get

(2.16)

Now, multiplication of the exponents on the left side of (2.19) using (2.7) yields

and after simplification, the answer is

Example 2.10

Solve the following equation, that is, find the value of .

(2.17)

Solution:

As a first step, we use the alternate designation of the cubic root. This was discussed in Chapter 1.Then,

x

x 5=

x1 2 5=

(x1 2)2

52=

x1 52=

x 25=

z

z3 8=

Page 69: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 2 Elementary Algebra

2-8 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

(2.18)

Next, we cube (raise to power 3) both sides of (2.18) and we get

(2.19)

Now, multiplication of the exponents on the left side using (2.19) yields

and after simplification, the answer is

Other equations can be solved using combinations of Properties (2.5 through (2.7). As anotherexample, let us consider the temperature conversion from degrees Fahrenheit to degrees Celsius.

We start with

(2.20)

Next, we multiply both sides by . Then,

(2.21)

and after simplifying the right side, we get

(2.22)

Now, we add to both sides to eliminate from the right side. Then,

(2.23)

Finally, after interchanging the positions of the left and right sides, we get

(2.24)

2.4 Laws of LogarithmsIn Chapter 1, we learned that, if

(2.25)

where a is the base and y is the exponent (power).

z1 3 8=

(z 1 3 )3

83=

z1 83=

z 512=

C 59--- F 32–=

9 5

95--- C 9

5--- 5

9--- F 32–=

95--- C F 32–=

32 32–

95--- C 32+ F 32– 32+=

F 95--- C 32+=

x a y then y xalog= =

Page 70: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 2-9Orchard Publications, Fremont, California

Laws of Logarithms

The laws of logarithms state that(2.26)

(2.27)

(2.28)

Logarithms are very useful because the laws of (2.26) through (2.28), allow us to replace multipli-cation, division and exponentiation by addition, subtraction and multiplication respectively. Weused logarithms in Chapter 1 to define the decibel.

As we mentioned in Chapter 1, the common (base 10) logarithm and the natural (base e) loga-rithm, where e is an irrational (endless) number whose value is ....., are the most widelyused. Both occur in many formulas of probability, statistics, and financial formulas. For instance,the formula below computes the number of periods required to accumulate a specified futurevalue by making equal payments at the end of each period into an interest-bearing account.

(2.29)

where

n = number of periods (months or years)

ln = natural logarithm

Interest = earned interest

Future Value = desired amount to be accumulated

Payment = equal payments (monthly or yearly) that must be made.

Example 2.11

Compute the number of months required to accumulate by making amonthly payment of into a savings account paying annual interest compoundedmonthly.

Solution:

The monthly interest rate is or , and thus in (2.29), ,, and . Then,

(2.30)

We will use Excel to find the value of n. In any cell, we enter the following formula:

xyalog xalog yalog+=

xy--

alog xalog yalog–=

xnalog n xalog=

2.71828

n 1 Interest FutureValue Payment+ln1 Interest+ln

----------------------------------------------------------------------------------------------------------------=

Future Value $100,000=

$500 6%

6% 12 0.5% Interest 0.5%=0.005=

Future Value $100,000= Payment $500=

n 1 0.005 100 000 500+ln1 0.005+ln

------------------------------------------------------------------------------=

Page 71: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 2 Elementary Algebra

2-10 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

=LN(1+(0.005*100000)/500)/LN(1+0.005)

Excel returns ; we round this to . This represents the number of the months that apayment of is required to be deposited at the end of each month. This time is equivalent to

years and months.

Excel has a build-in function named NPER and its syntax (orderly arrangement) is

NPER(rate,pmt,pv,fv,type) where, for this example,

rate = 0.005

pmt = -500 (minus because it is a cash outflow)

pv = 0 (present value is zero)

fv = 100000

type = 0 which means that payments are made at the end of each period.

Then, in any cell we enter the formula

=NPER(0.005,-500,0,100000,0)

and we observe that Excel returns . This is the same as the value that we found with theformula of (2.29).

The formula of (2.29) uses the natural logarithm. Others use the common logarithm.

Although we can use a PC, or a calculator to find the log of a number, it is useful to know the fol-lowing facts that apply to common logarithms.

I. Common logarithms consist of an integer, called the characteristic and an endless decimalcalled the mantissa*.

II. If the decimal point is located immediately to the right of the msd of a number, the character-istic is zero; if the decimal point is located after two digits to the right of the msd, the charac-teristic is ; if after three digits, it is and so on. For instance, the characteristic of is , of

is , and of is .

III. If the decimal point is located immediately to the left of the msd of a number, the characteris-tic is , if located two digits to the left of the msd, it is , if after three digits, it is and soon. Thus, the characteristic of is , of is , and of is .

IV. The mantissa cannot be determined by inspection; it must be extracted from tables of commonlogarithms.

* Mantissas for common logarithms appear in books of mathematical tables. No such tables are provided here sincewe will not use them in our subsequent discussion.

138.9757 139$500

11 7

138.9757

1 2 1.9 058.3 1 476.5 2

1– 2– 3–

0.9 1– 0.0583 2– 0.004765 3–

Page 72: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 2-11Orchard Publications, Fremont, California

Quadratic Equations

V. Although the common logarithm of a number less than one is negative, it is written with anegative characteristic and a positive mantissa. This is because the mantissas in tables are givenas positive numbers.

VI. Because mantissas are given in math tables as positive numbers, the negative sign is writtenabove the characteristic. This is to indicate that the negative sign does not apply to the man-tissa. For instance, , and since , this can be written as

.

A convenient method to find the characteristic of logarithms is to first express the given numberin scientific notation; the characteristic then is the exponent. For negative numbers, the mantissais the complement* of the mantissa given in math tables

Example 2.12

Given that and , find

a. b.

Solution:

a.

b.

2.5 Quadratic EquationsQuadratic equations are those that contain equations of second degree. The general form of a qua-dratic equation is

(2.31)

where a, b and c are real constants (positive or negative). Let x1 and x2 be the roots† of (2.31).These can be found from the formulas

(2.32)

* The complement of a number is obtained by subtraction of that number from a number consisting of withthe same number of digits as the number. For the example cited above, we subtract from and weobtain and this is the mantissa of the number.

† Roots are the values which make the left and right sides of an equation equal to each other.

0.00319log 3.50379= 3– 7 10–=

0.00319log 7.50379 10– 2.4962–= =

9's

9's 9's50379 99999

49620

x 73 000 000= y 0.00000000073=

xlog ylog

x 73 000 000 7.3 107= =

xlog 7.8633=

y 0.00000000073 7.3 10 10–= =

ylog 10.8633– 0.8633 10– 9.1367–= = =

ax2 bx c+ + 0=

x1b– b2 4ac–+

2a--------------------------------------= x2

b– b2 4ac––2a

--------------------------------------=

Page 73: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 2 Elementary Algebra

2-12 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

The quantity under the square root is called the discriminant of a quadratic equation.

Example 2.13Find the roots of the quadratic equation

(2.33)Solution:

Using the quadratic formulas of (2.32), we get

(2.34)

We see that this equation has two unequal positive roots.

Example 2.14Find the roots of the quadratic equation

(2.35)Solution:

Using the quadratic formulas of (2.32), we get

(2.36)

We see that this equation has two equal negative roots.Example 2.15Find the roots of the quadratic equation

(2.37)Solution:

Using (2.32), we get

(2.38)

b2 4ac–

x2 5– x 6+ 0=

x15–– 5– 2 4 1 6–+

2 1------------------------------------------------------------------- 5 25 24–+

2------------------------------- 5 1+

2---------------- 5 1+

2------------ 3= = = = =

x25–– 5– 2 4 1 6––

2 1------------------------------------------------------------------ 5 25 24––

2------------------------------- 5 1–

2---------------- 5 1–

2------------ 2= = = = =

x2 4x 4+ + 0=

x14– 42 4 1 4–+

2 1--------------------------------------------------- 4– 16 16–+

2------------------------------------ 4– 0+

2---------------- 2–= = ==

x24– 42 4 1 4––

2 1-------------------------------------------------- 4– 16 16––

2----------------------------------- 4– 0–

2---------------- 2–= = = =

2x2 4x 5+ + 0=

x14– 42 4 1 5–+

2 2--------------------------------------------------- 4– 16 20–+

4------------------------------------ 4– 4–+

4------------------------ value cannot be determined= = =

x24– 42 4 1 5––

2 2-------------------------------------------------- 4– 16 20––

4----------------------------------- 4– 4––

4----------------------- value cannot be determined= = =

Page 74: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 2-13Orchard Publications, Fremont, California

Cubic and Higher Degree Equations

Here, the square root of , i.e., is undefined. It is an imaginary number and, as stated ear-lier, imaginary numbers will not be discussed in this text.

In general, if the coefficients a, b and c are real constants (known numbers), then:

I. If is positive, as in Example 2.13, the roots are real and unequal.

II. If is zero, as in Example 2.14, the roots are real and equal.

III. If is negative, as in Example 2.15, the roots are imaginary.

2.6 Cubic and Higher Degree EquationsA cubic equation has the form

(2.39)

and higher degree equations have similar forms. Formulas and procedures for solving these equa-tions are included in books of mathematical tables. We will not discuss them here since theirapplications to business, basic science, and technology are limited. They are useful in highermathematics and engineering.

2.7 Measures of Central TendencyMeasures of central tendency are very important in probability and statistics. They will be dis-cussed in more detail in Chapters 7 through 9. The intent here is to become familiar with termi-nologies used to describe data.

When we analyze data, we begin with the calculation of a single number, which we assume repre-sents all the data. Because data often have a central cluster, this number is called a measure of cen-tral tendency. The most widely used are the mean, median, and mode. These are described below.

The arithmetic mean is the value obtained by dividing the sum of a set of quantities by the numberof quantities in the set. It is also referred to as the average.

The arithmetic mean or simply mean, is denoted with the letter x with a bar above it, and is com-puted from the equation

(2.40)

where the symbol stands for summation and is the number of data, usually called sample.

4– 4–

b2 4ac–

b2 4ac–

b2 4ac–

ax3 bx2 cx d+ + + 0=

xx

n----------=

n

Page 75: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 2 Elementary Algebra

2-14 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

Example 2.16

The ages of college students in a class are

Compute the mean (average) age of this group of students.

Solution:

Here, the sample is and using (2.40) we get

where the symbol stands for approximately equal to.

We can check out answer with the Excel AVERAGE function to become familiar with it.

We start with a blank worksheet and we enter the given numbers in Cells A1 through A15. In A16we type =AVERAGE(A1:A15). Excel displays the answer . We will use these values forthe next example; therefore, it is recommended that they should not be erased.

The median of a sample is the value that separates the lower half of the data, from the upper half.To find the median, we arrange the values of the sample in increasing (ascending) order. If thenumber of the sample is odd, the median is in the middle of the list; if even, the median is themean (average) of the two values closest to the middle of the list. We will denote the median asMd.

Example 2.17Given the sample of Example 2.16, find the median.

Solution:

The given sample is repeated here for convenience.

We can arrange this sample in ascending (increasing) order with pencil and paper; however, wewill let Excel do the work for us. Unless this list has been erased, it still exists in A1:A15. Now, weerase the value in A16 by pressing the Delete key. We highlight the range A1:A15 and click onData>Sort>Column A>Ascending>OK. We observe that the numbers now appear in ascend-ing order, and the median appears in A8 and has the value of , thus, for this example, .

Excel can find the median without first sorting the data. To illustrate the procedure, we undo sortby clicking on Edit>Undo Sort and we observe that the list now appears as entered the first time.

15

24 26 27 23 31 29 25 28 21 23 32 25 30 24 26

n 15=

x 24 26 27 23 31 29 25 28 21 23 32 25 30 24 26+ + + + + + + + + + + + + +15

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------=

x 38925

--------- 26.27 26= =

26.26667

24 26 27 23 31 29 25 28 21 23 32 25 30 24 26

26 Md 26=

Page 76: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 2-15Orchard Publications, Fremont, California

Interpolation and Extrapolation

We select any cell, we type =MEDIAN(A1:A15), and we observe that Excel displays . Again, wewill use these values for the next example; therefore, it is recommended that they should not beerased.

The mode is the value in a sample that occurs most often. If, in a sequence of numbers, no numberappears two or more times, the sample has no mode. The mode, if it exists, may or may not beunique. If two such values exist, we say that the sample is bimodal, and if three values exist, we callit trimodal. We will denote the mode as Mo.

Example 2.18Find the mode for the sample of Example 2.16.

Solution:

We assume that the data appear in the original order, that is, as

Let us sort these values as we did in Example 2.17. When this is done, we observe that the values, , and each appear twice in the sample. Therefore, we say that this sample is trimodal.

Excel has also a function that computes the mode; however, if the sample has no unique mode, itdisplays only the first, and gives no indication that the sample is bimodal or trimodal. To verifythis, we select any cell, and we type =MODE(A1:A15). Excel displays the value .

Note 2.3Textbooks in statistics provide formulas for the computation of the median and mode. We do notprovide them here because, for our purposes, these are not as important as the arithmetic mean.In Chapters 8 and 9 we will discuss other important quantities such as the expected value, vari-ance, standard deviation, and probability distributions. We will also present numerous practicalapplications.

2.8 Interpolation and Extrapolation

Let us consider the points and shown on Figure 2.1 where, in general, thedesignation is used to indicate the intersection of the lines parallel to the and

.

Figure 2.1. Graph to define interpolation and extrapolation

26

24 26 27 23 31 29 25 28 21 23 32 25 30 24 26

24 25 26

24

P1 x1 y1 P2 x2 y2

Pn xn yn x axis–

y axis–

y1

x1 x2

y2

x

y

P1 x1 y1

P2 x2 y2

Page 77: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 2 Elementary Algebra

2-16 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

Let us assume that the values , , , and are known. Next, let us suppose that a knownvalue lies between and and we want to find the value that corresponds to the knownvalue of . We must now make a decision whether the unknown value lies on the straight linesegment that connects the points and or not. In other words, we must decidewhether the new point lies on the line segment , above it, or below it. Linear inter-

polation implies that the point lies on the segment between points and, and linear extrapolation implies that the point lies to the left of point or to the right of but on the same line segment which may be extended either

to the left or to the right. Interpolation and extrapolation methods other than linear are discussedin numerical analysis* textbooks where polynomials are used very commonly as functional forms.Our remaining discussion and examples will be restricted to linear interpolation.

Linear interpolation and extrapolation can be simplified if the first calculate the slope of thestraight line segment.

The slope, usually denoted as m, is the rise in the vertical (y-axis) direction over the run in theabscissa (x-axis) direction. Stated mathematically, the slope is defined as

(2.41)

Example 2.19

Compute the slope of the straight line segment that connects the points and shown in Figure 2.2.

Figure 2.2. Graph for example 2.19Solution:

* Refer, for example, to Numerical Analysis Using MATLAB and Spreadsheets, ISBN 0-9709511-1-6, by OrchardPublications.

x1 y1 x2 y2

xi x1 x2 yi

xi yi

P1 x1 y1 P2 x2 y2

Pi xi yi P1P2

Pi xi yi P1P2 P1 x1 y1

P2 x2 y2 Pi xi yi

P1 x1 y1 P2 x2 y2

slope m= riserun----------

y2 y1–

x2 x1–----------------= =

P1 3 2 P2 7 4

2

3 7 x

y

4

P1 3 2

P2 7 4

slope m= riserun---------- 4 2–

7 3–------------ 2

4--- 0.5= = = =

Page 78: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 2-17Orchard Publications, Fremont, California

Interpolation and Extrapolation

In the graph of Figure 2.1, if we know the value and we want to find the value , we use theformula

(2.42)

or(2.43)

and if we know the value of and we want to find the value , we solve (2.46) for and we get

(2.44)

We observe that, if in (2.47) we let , , , and , we obtain the equationof any straight line

(2.45)

which will be introduced on Chapter 3.

Example 2.20Given the graph of Figure 2.3, perform linear interpolation to compute the value of y that corre-sponds to the value

Figure 2.3. Graph for example 2.20Solution:

Using (2.43) we get

Note 2.4

The smaller the interval, the better the approximation will be obtained by linear interpolation.

xi yi

yi y1–

xi x1–--------------- slope=

yi slope xi x1– y1+ m xi x1– y1+= =

yi xi xi

xi1

slope-------------- yi y1– x1+

1m---- yi y1– x1+= =

x1 0= xi x= yi y= y1 b=

y mx b+=

x 7.5=

8

5 11 x

y

16

P1 5 8

P2 11 16

yx 7.5= slope xi x1– y1+16 8–11 5–--------------- 7.5 5– 8+

86--- 2.5 8+ 10

3------ 8+ 11.33= = = = =

Page 79: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 2 Elementary Algebra

2-18 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

Note 2.5

It is highly recommended that the data points are plotted so that we can assess how reasonable ourapproximation will be.

Note 2.6

We must exercise good judgement when we use linear interpolation since we may obtain unrealis-tic values. As as example, let us consider the following table where x represents the indicated

numbers and y represents the square of x, that is, .

If we use linear interpolation to find the square of 5 with the data of the above table we will findthat

and obviously this is gross error since the square of is , not .

2.9 Infinite Sequences and SeriesAn infinite sequence is a function whose domain is the set of positive integers. For example, when

is successively assigned the values , , , ... , the function defined as

yields the infinite sequence , , , .... and so on. This sequence is referred to as infinitesequence to indicate that there is no last term. We can create a sequence by addition ofnumbers. Let us suppose that the numbers to be added are

We let

(2.46)

x y1 1

....... ........6 36

y x2=

yx 5= slope xi x1– y1+36 1–6 1–

--------------- 5 1– 1+355

------ 4 1+ 29= = = =

5 25 29

x 1 2 3

f x 11 x+------------=

1 2 1 3 1 4sn

u1 u2 u3 un

s1 u1=

s2 u1 u2+=

sn u1 u2 u3 un+ + + + uk

k 1=

n= =

Page 80: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 2-19Orchard Publications, Fremont, California

Arithmetic Series

An expression such as (2.46) is referred to as an infinite series. There are many forms of infiniteseries with practical applications. In this text, we will discuss only the arithmetic series, geometricseries, and harmonic series.

2.10 Arithmetic SeriesAn arithmetic series (or arithmetic progression) is a sequence of numbers such that each number dif-fers from the previous number by a constant amount, called the common difference.

If is the first term, is the nth term, d is the common difference, n is the number of terms, and is the sum of n terms, then

(2.47)

(2.48)

(2.49)

The expression

(2.50)

is known as the sum identity.

Example 2.21

Compute the sum of the integers from to

Solution:

Using the sum identity, we get

2.11 Geometric SeriesA geometric series (or geometric progression) is a sequence of numbers such that each number bearsa constant ratio, called the common ratio, to the previous number.

If is the first term, is the term, is the common ratio, is the number of terms, and is the sum of terms, then

a1 an

sn

an a1 n 1– d+=

snn2--- a1 an+=

snn2--- 2a1 n 1– d+=

kk 1=

n12---n n 1+=

1 100

kk 1=

100 12---100 100 1+ 50 101 5050= = =

a1 an nth r n sn

n

Page 81: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 2 Elementary Algebra

2-20 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

(2.51)

and for ,

(2.52)

The first sum equation in (2.52) is derived as follows:

The general form of a geometric series is

(2.53)

The sum of the first n terms of (2.57) is

(2.54)

Multiplying both sides of (2.58) by r we get

(2.55)

If we subtract (2.59) from (2.58) we will find that all terms on the right side cancel except the firstand the last leaving

(2.56)

Provided that , division of (2.60) by yields

(2.57)

It is shown in advanced mathematics textbooks that if , the geometric series

converges to the sum

(2.58)

Example 2.22A ball is dropped from x feet above a flat surface. Each time the ball hits the ground after falling adistance h, it rebounds a distance rh where . Compute the total distance the ball travels.

an a1rn 1–=

r 1

sn a11 rn–1 r–-------------=

a1 ran–

1 r–-------------------=

ran a1–

r 1–-------------------=

a1 a1r a1r2 a1r3 a1rn 1–+ + + + + +

sn a1 a1r a1r2 a1r3 a1rn 1–+ + + + +=

rsn a1r a1r2 a1r3 a1rn 1– a1rn+ + + + +=

1 r– sn a1 1 rn–=

r 1 1 r–

sn a11 rn–1 r–

------------=

r 1

a1 a1r a1r2 a1r3 a1rn 1–+ + + + + +

sna1

1 r–-----------=

r 1

Page 82: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 2-21Orchard Publications, Fremont, California

Harmonic Series

Solution:

The path and the distance the ball travels is shown on the sketch of Figure 2.4.

Figure 2.4. Sketch for Example 2.22

The total distance s is computed by the geometric series

(2.59)

By analogy to equation of (2.62), the second and subsequent terms in (2.63) can be expressed asthe sum of

(2.60)

Adding the first term of (2.63) with (2.64) we form the total distance as

(2.61)

For example, if and , the total distance the ball travels is

2.12 Harmonic Series A sequence of numbers whose reciprocals form an arithmetic series is called an harmonic series (orharmonic progression). Thus

(2.62)

a1

a1r3

a1r

a1r2

dis cetan a1=

dis cetan 2a1r=

dis cetan 2a1r2=

dis cetan 2a1r3=

s a1 2a1r 2a1r2 2a1r3+ + + +=

2a1r1 r–-----------

s a12a1r1 r–-----------+ a1

1 r+1 r–-----------= =

a1 6 ft= r 2 3=

a 6 1 2 3+1 2 3–------------------- 30 ft= =

1a1----- 1

a1 d+-------------- 1

a1 2d+------------------ 1

a1 n 1– d+--------------------------------

Page 83: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 2 Elementary Algebra

2-22 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

where

(2.63)

forms an harmonic series.

Harmonic series provide quick answers to some very practical applications such as the examplethat follows.

Example 2.23

Suppose that we have a list of temperature numbers on a particular day and time for years. Letus assume the numbers are random, that is, the temperature on a particular day and time of oneyear has no relation to the temperature on the same day and time of any subsequent year.

The first year was undoubtedly a record year. In the second year, the temperature could equallylikely have been more than, or less than, the temperature of the first year. So there is a probabilityof that the second year was a record year. The expected number of record years in the firsttwo years of record-keeping is therefore . For the third year. the probability is that thethird observation is higher than the first two, so the expected number of record temperatures inthree years is . Continuing this line of reasoning leads to the conclusion that theexpected number of records in the list of observations is

For our example, and thus the sum of the first terms of harmonic series is or record years. Of course, this is the expected number of record temperatures, not the actual.

The partial sums of this harmonic series are plotted on Figure 2.5.

Figure 2.5. Plot for Example 2.23

1an----- 1

a1 n 1– d+--------------------------------=

50

1 21 1 2+ 1 3

1 1 2 1 3+ +

n

1 1 2 1 3 1 n+ + + +

n 50= 50 4.499 5

1 1.0000002 1.5000003 1.8333334 2.0833335 2.2833336 2.4500007 2.5928578 2.7178579 2.828968

10 2.92896811 3.01987712 3.103211

0

1

2

3

4

5

0 10 20 30 40 50

Page 84: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 2-23Orchard Publications, Fremont, California

Proportions

2.13 ProportionsA proportion is defined as two ratios being equal to each other. If

(2.64)

where a, b, c, and d are non-zero values, then

(2.65)

(2.66)

(2.67)

Consider a line segment with a length of one unit. Let us divide this segment into two unequalsegments and let

= shorter segment

= longer segment

The golden proportion is the one where the ratio of the shorter segment to the longer segment, thatis, is equal to the ratio of the longer segment to the whole segment, that is, . Inother words, the golden proportion states that

(2.68)

Solving for we get

Solution of this quadratic equation yields

and since cannot be more than unity, we reject the largest value and we accept x as .Then, and thus the golden proportion is

ab--- c

d---=

a b+b

------------ c d+d

------------=

a b–b

------------ c d–d

-----------=

a b–a b+------------ c d–

c d+------------=

x

1 x–

x 1 x– 1 x– 1

x1 x–

---------------- 1 x–1

----------------=

x

1 x– 2 x=

1 2x– x2+ x=

x2 3x 1+– 0=

x1 x23 9 4–

2------------------------- 3 5

2---------------- 3 2.236

2----------------------= = =

x x 0.382=

1 x– 0.618=

Page 85: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 2 Elementary Algebra

2-24 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

(2.69)

The golden rectangle is defined as one whose length is and its width is as shown in Figure2.6.

Figure 2.6. The golden rectangle

2.14 Summary• Algebra is the branch of mathematics in which letters of the alphabet represent numbers or a

set of numbers.

• Equations are equalities that indicate how some quantities are related to others.

• In algebra, the order of precedence, where 1 is the highest and 4 is the lowest, is as follows:

1. Quantities inside parentheses ( )

2. Exponentiation

3. Multiplication and Division

4. Addition or Subtraction

• An algebraic equation is an equality that contains one or more unknown quantities, normallyrepresented by the last letters of the alphabet such as x, y, and z.

• Solving an equation means finding the value of the unknown quantity that will make the equa-tion an equality with no unknowns.

• The same number may be added to, or subtracted from both sides of an equation.

• Each side of an equation can be multiplied or divided by the same number. Division by zeromust be avoided.

• The laws of exponents state that

0.3820.618------------- 0.618

1-------------=

1 0.618

1

0.618

am an am n+=

Page 86: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 2-25Orchard Publications, Fremont, California

Summary

• The nth root is defined as the inverse of the nth exponent, that is, if

• The laws of logarithms state that

• Logarithms consist of an integer, called the characteristic and an endless decimal called themantissa.

• If the decimal point is located immediately to the right of the msd of a number, the character-istic is zero; if the decimal point is located after two digits to the right of the msd, the charac-teristic is ; if after three digits, it is and so on.

• If the decimal point is located immediately to the left of the msd of a number, the characteris-tic is , if located two digits to the left of the msd, it is , if after three digits, it is and soon.

• The mantissa cannot be determined by inspection; it must be extracted from tables of commonlogarithms.

• Although the common logarithm of a number less than one is negative, it is written with anegative characteristic and a positive mantissa. This is because the mantissas in tables are givenas positive numbers.

• Because mantissas are given in math tables as positive numbers, the negative sign is writtenabove the characteristic. This is to indicate that the negative sign does not apply to the man-tissa.

• A convenient method to find the characteristic of logarithms is to first express the given num-ber in scientific notation; the characteristic then is the exponent.

am

an------

am n– if m n 1 if m n=

1an m–------------ if m n

=

am namn=

bn a then b an= =

xyalog xalog yalog+=

xy--

alog xalog yalog–=

xnalog n xalog=

1 2

1– 2– 3–

Page 87: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 2 Elementary Algebra

2-26 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

• Quadratic equations are those that contain equations of second degree. The general form of aquadratic equation is

where a, b and c are real constants (positive or negative).

• The roots of a quadratic equations can be found from the formulas

• The quantity under the square root is called the discriminant of a quadratic equation.

• A cubic equation has the form

and higher degree equations have similar forms. Formulas and procedures for solving theseequations are included in books of mathematical tables.

• The arithmetic mean is the value obtained by dividing the sum of a set of quantities by the num-ber of quantities in the set. It is also referred to as the average. The arithmetic mean or simplymean, is denoted with the letter x with a bar above it, and is computed from the equation

where the symbol stand for summation and is the number of data, usually called sample.The mean can also be found with the Excel =AVERAGE function.

• The median of a sample is the value that separates the lower half of the data, from the upperhalf. To find the median, we arrange the values of the sample in increasing (ascending) order.If the number of the sample is odd, the median is in the middle of the list; if even, the medianis the mean (average) of the two values closest to the middle of the list. The median can also befound with the Excel =MEDIAN function.

• The mode is the value in a sample that occurs most often. If, in a sequence of numbers, no num-ber appears two or more times, the sample has no mode. The mode, if it exists, may or may notbe unique. If two such values exist, we say that the sample is bimodal, and if three values exist,we call it trimodal. The mode can also be found with the Excel =MODE function.

• Linear interpolation implies that the point lies on the segment between points and on a straight line

ax2 bx c+ + 0=

x1b– b2 4ac–+

2a--------------------------------------= x2

b– b2 4ac––2a

--------------------------------------=

b2 4ac–

ax3 bx2 cx d+ + + 0=

xx

n----------=

n

Pi xi yi P1P2

P1 x1 y1 P2 x2 y2

Page 88: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 2-27Orchard Publications, Fremont, California

Summary

• Linear extrapolation implies that the point lies to the left of point or to theright of but on the same line segment which may be extended either to the left or tothe right.

• An infinite sequence is a function whose domain is the set of positive integers.

• An expression such as the one shown below is referred to as an infinite series.

• An arithmetic series (or arithmetic progression) is a sequence of numbers such that each numberdiffers from the previous number by a constant amount, called the common difference.

• A geometric series (or geometric progression) is a sequence of numbers such that each numberbears a constant ratio, called the common ratio, to the previous number.

• A sequence of numbers whose reciprocals form an arithmetic series is called an harmonic series(or harmonic progression).

• A proportion is defined as two ratios being equal to each other.

• The golden proportion states that

• The golden rectangle is defined as one whose length is and its width is .

Pi xi yi P1 x1 y1

P2 x2 y2

sn u1 u2 u3 un+ + + + uk

k 1=

n= =

x1 x–

---------------- 1 x–1

----------------=

1 0.618

Page 89: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 2 Elementary Algebra

2-28 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

2.15 Exercises1. In the following equations V, I, R and P are the unknowns. Solve the following equations, that

is, find the value of each unknown.

a. b. c.

d. e. f.

2. The notation stands for the rth root of a number x. Thus stands for the fourth root of

, for the fifth root of and so on. Solve the following equations.

a. b.

3. Mathematical tables show that the mantissa of the common logarithm of is .However, Excel displays the number rounded to five decimal places when we use thefunction =LOG(0.000417). Is there something wrong with the formula that we used, or is Excelgiving us the wrong answer? Explain.

4. The formula below computes the terms of an annuity with an initial payment and periodic pay-ments.

fv =future value, that is, the cash value we want to receive after the last payment is made

int = interest rate per period

pmt = payment made at the end of each period

pv = initial payment.

Use this formula to compute the number of months required to accumulate by mak-ing an initial payment of now and monthly payments of into a savings accountpaying annual interest compounded monthly. Verify your answer with Excel’s NPER func-tion remembering that the initial and monthly payments are cash outflows and, as such, mustbe entered as negative numbers. However, in the formula above, these must be entered as pos-itive values.

5. Solve the following quadratic equations.

a. b.

R 50+ 150= V 25– 15= 5I 10– 45=

1R--- 0.1= 5P 10= 100 R+ 10 3– 1=

xr 2564

256 31255 3125

2621446 x= 10000000009 y=

0.000417 0.620143.37986–

n

1 fv int pmt+1 pv int pmt+----------------------------------------------------log

1 int+log------------------------------------------------------------------=

$1,000,000$10,000 $2,000

6%

x2 5x 6+ + x2 6x– 9+

Page 90: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 2-29Orchard Publications, Fremont, California

Exercises

6. Twenty houses were sold for the prices listed below where, for simplicity, the dollar ($) sign hasbeen omitted.

Compute the mean, median, and mode.

547,000 670,000 458,000 715,000 812,000678,000 595,000 760,000 490,000 563,000805,000 715,000 635,000 518,000 645,000912,000 873,000 498,000 795,000 615,000

Page 91: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 2 Elementary Algebra

2-30 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

2.16 Solutions to Exercises1.

a. , ,

b. , ,

c. , , , ,

d. , , , ,

e. , , , , ,

f. , , ,

, ,

2.

a. , , and in Excel we enter the formula =262144^(1/6) whichyields and thus

b. , , and in Excel we enter the formula=1000000000^(1/9) which yields and thus

3.

Mathematical tables show only the mantissa which is the fractional part of the logarithm, andas explained in Section 2.4, mantissas in tables are given as positive numbers. Review Example2.14 to verify that the answer displayed by Excel is correct.

4.

We construct the spreadsheet below

and in Cell A4 we type the formula =LOG((1+D2*A2/B2)/(1+C2*A2/B2))/LOG(1+A2)

This yields 246.23 months.

R 50+ 150= R 50 50–+ 150 50–= R 50=

V 25– 15= V 25– 25+ 15 25+= V 40=

5I 10– 45= 5I 10– 10+ 45 10+= 5I 55= 5I 5 55 5= I 11=

1R--- 0.1=

1R--- R 0.1 R= 1 0.1 R= 1 0.1 R= R 10=

5P 10= 5P 1 2 10= 5P 1 2 2 102= 5P 100= 5P 5 100 5= P 20=

100 R+ 10 3– 1= 100 R+ 10 3– 103 1 103= 100 R+ 100 1000=

100 R+ 1 1000= 100 R 100–+ 1000 100–= R 900=

2621446 x= 262144 1 6 x=

8 x 8=

10000000009 y= 1000000000 1 9 y=

10 y 10=

Page 92: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 2-31Orchard Publications, Fremont, California

Solutions to Exercises

The same result is obtained with Excel’s NPER function as shown below.

=NPER(0.06/12, 2000, 10000,1000000,0)

yields 246.23 months.

5.

a.

b.

6.

We find the mean, median, and mode using the procedures of Examples 2.16, 2.17, and 2.18respectively. Then we verify the answers with the spreadsheet below where the values wereentered in Cells A1 through A20 in the order given, and they were copied in B1 through B20and were sorted.

The mean was found with the formula =AVERAGE(B1:B20) entered in D1.

The median was found with the formula =MEDIAN(B1:B20) entered in D2.

The mode was found with the formula =MODE(B1:B20) entered in D3.

x15– 52 4 1 6–+

2 1--------------------------------------------------- 5– 25 24–+

2------------------------------------ 5– 1+

2---------------- 2–= = ==

x25– 52 4 1 6––

2 1-------------------------------------------------- 5– 25 24––

2----------------------------------- 5– 1–

2---------------- 3–= = = =

x16 62 4 1 9–+

2 1---------------------------------------------- 6 36 36–+

2------------------------------- 6 0+

2------------ 3= = ==

x26 62 4 1 9––

2 1---------------------------------------------- 6 36 36––

2------------------------------- 6 0–

2------------ 3= = = =

Page 93: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 2 Elementary Algebra

2-32 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

Page 94: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 3-1Orchard Publications

Chapter 3

Intermediate Algebra

his chapter is a continuation of Chapter 2. It is intended for readers who need the knowl-edge for more advanced topics in mathematics. It serves as a prerequisite for probabilityand statistics. Readers with a strong mathematical background may skip this chapter. Oth-

ers will find it useful, as well as a convenient source for review.

3.1 Systems of Two EquationsQuite often, we are faced with problems that seem impossible to solve because they involve two ormore unknowns. However, a solution can be found if we write two or more linear independentequations* with the same number of unknowns, and solve these simultaneously. Before we discussgeneralities, let us consider a practical example.

Example 3.1

Jeff Simpson plans to start his own business, manufacturing and selling bicycles. He wants to com-pute the break-even point; this is defined as the point where the revenues are equal to costs. Inother words, it is the point where Jeff neither makes nor loses money.

Jeff estimates that his fixed costs (rent, electricity, gas, water, telephone, insurance etc.), would bearound per month. Other costs such as material, production and payroll are referred to asvariable costs and will increase linearly (in a straight line fashion). Preliminary figures show thatthe variable costs for the production of bicycles will be per month. Then,

(3.1)

Let us plot cost (y-axis), versus number of bicycles sold (x-axis) as shown in Figure 3.1.

* Linear equations are those in which the unknowns, such as x and y, have exponent 1. Thus, the equation is linear since the exponents of x and y are both unity. However, the equation is non-

linear because the exponent of x is 2. By independent equations we mean that these they do not depend on eachother. For instance, the equations and are not independent since the second can beformed from the first by multiplying both sides by 2.

T

7x 5y+ 24= 2x2 y+ 8=

3x 2y+ 5= 6x 4y+ 10=

$1,000

500 $9,000

Total Costs Fixed Variable+ 1000 9000+ 10 000= = =

Page 95: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 3 Intermediate Algebra

3-2 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

Figure 3.1. Total cost versus bicycles sold.

In Figure 3.1, the x-axis is the abscissa and the y-axis is the ordinate. Together, these axes consti-tute a Cartesian coordinate system; this was also mentioned in Chapter 1. The straight line drawnfrom point to point , is a graphical presentation of the total costs for the production of thebicycles. It starts at the point because this represents a fixed cost; it occurs even though nobicycles are sold. We denote this point as where the first number , within the paren-theses, denotes the x-axis value at this point, and the second number denotes the y-axisvalue at that point. For simplicity, the dollar sign has been omitted. Thus, we say that the coordi-nates of point are . Likewise, the coordinates of the end point are denoted as

since the total costs to produce bicycles is . We will now derive theequation that describes this straight line.

In general, a straight line is represented by the equation

(3.2)

where is the slope, is the abscissa, is the ordinate, and is the y-intercept of the straight line,that is, the point where the straight line crosses the y-axis.

As we indicated in Chapter 2, the slope is the rise in the vertical (y-axis) direction over the runin the abscissa (x-axis) direction. We recall from Chapter 2 that the slope is defined as

x

y

100 200 300 400 500

2000

4000

6000

8000

10000

0

Bicycles Sold (Units)

Tot

al C

ost (

Dol

lars

)P2 (500, 10,000)

P1 (0, 1000)

P1 P2

$1,000P1 0 1000 0

1000

P1 0 1000 P2

P2 500 10000 500 $10,000

y mx b+=

m x y b

m

Page 96: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 3-3Orchard Publications

Systems of Two Equations

(3.3)

In Figure 3.1, , , and . Therefore, the slope is

and, by inspection, the y-intercept is 1000. Then, in accordance with (3.2), the equation of theline that represents the total costs is

(3.4)

It is customary, and convenient, to show the unknowns of an equation on the left side and theknown values on the right side. Then, (3.4) is written as

* (3.5)

This equation has two unknowns and and thus, no unique solution exists; that is, we can findan infinite number of and combinations that will satisfy this equation. We need a secondequation, and we will find it by making use of additional facts. These are stated below.

Jeff has determined that if the sells bicycles at each, he will generate a revenue of. This fact can be represented by another straight line which is added to the

previous figure. It is shown in Figure 3.2.

The new line starts at because there will be no revenue if no bicycles are sold. It ends at which represents the condition that Jeff will generate when bicycles

are sold.

The intersection of the two lines shown as a small circle, establishes the break-even point and thisis what Jeff is looking for. The projection of the break-even point on the x-axis, shown as a brokenline, indicates that approximately bicycles must be sold just to break even. Also, the projec-tion on the y-axis shows that at this break-even point, the generated revenue is approximately

. This procedure is known as graphical solution. A graphical solution gives approximate val-ues.

We will now proceed to find the so-called analytical solution. This solution will produce exact val-ues.

* We assume that the reader has become proficient with the properties which we discussed in the previous chapter,and henceforth, the details for simplifying or rearranging an equation will be omitted.

m riserun----------

y2 y1–

x2 x1–----------------= =

y2 10000= y1 1000= x2 500= x1 0=

m riserun----------

y2 y1–

x2 x1–---------------- 10000 1000–

500 0–--------------------------------- 9000

500------------ 18= = = = =

y 18x 1000+=

y 18x– 1000=

x yx y

500 $25$25 500 $12500=

P3 0 0

P4 500 12500 $12500 500

140

$3 500

Page 97: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 3 Intermediate Algebra

3-4 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

Figure 3.2. Graph showing the intersection of two straight lines.

As stated above, we need a second equation. This is obtained from the straight line in Figure 3.2which represents the revenue. To obtain the equation of this line, we start with the equation of(3.2) which is repeated here for convenience.

(3.6)The slope m of the revenue line is

(3.7)

and, by inspection, , that is, the y-intercept, is . Therefore, the equation that describes the reve-nue line is

(3.8)

By grouping equations (3.5) and (3.8), we get the system of equations

(3.9)

x

y

100 200 300 400 500

2000

4000

6000

8000

10000

0

Bicycles Sold (Units)

Tot

al C

ost (

Dol

lars

) an

d R

even

ue

P2 (500, 10,000)

P1 (0, 1000)

12000

14000

Revenue

Total Cost

Break-Even Point

P4 (500, 12,500)

P3 (0, 0)

Profit

y mx b+=

m riserun----------

y2 y1–

x2 x1–---------------- 12500 0–

500 0–------------------------ 125

5--------- 25= = = = =

b 0

y 25x=

y 18x– 1000=

y 25x=

Page 98: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 3-5Orchard Publications

Systems of Two Equations

Now, we must solve the equations of (3.9) simultaneously. This means that we must find uniquevalues for and , so that both equations of (3.9) will be satisfied at the same time. An easy wayto solve these equations is by substitution of the second into the first. This eliminates from thefirst equation which now becomes

(3.10)or

or* (3.11)

To find the unknown , we substitute (3.11) into either the first, or the second equation of (3.9).Thus, by substitution into the second equation, we get

(3.12)

Therefore, the exact solutions for and are

(3.13)

Since no further substitutions are needed, we simplify the values of (3.13) by division and we get and . Of course, bicycles must be expressed as whole

numbers and therefore, the break-even point for Jeff’s business is bicycles which, when sold,will generate a revenue of

Recall that for the break-even point, the graphical solution produced approximate values of bicycles which would generate a revenue of . Although the graphical solution is not asaccurate as the analytical solution, it nevertheless provides us with some preliminary information,which can be used as a check for the answers found using the analytical solution.

Note 3.1

The system of equations of (3.9) was solved by the so-called substitution method, also known asGauss’s elimination method. In Section 3.3, we will discuss this method in more detail, and twoadditional methods, the solution by matrix inversion, and the solution by Cramer’s rule.

* It is not advisable to divide 1000 by 7 at this time. This division will produce an irrational (endless) numberwhich can only be approximated and, when substituted to find the unknown y, it will produce another approxima-tion. Usually, we perform the division at the last step, that is, after the solutions are completed.

x yy

25x 18x– 1000=

7x 1000=

x 10007

------------=

y

y 25 10007

------------ 250007

---------------= =

x y

x 10007

------------=

y 250007

---------------=

x 1000 7 142.86= = y 25000 7 3571.40= =

143

y $25 143 $3575= =

140$3 500

Page 99: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 3 Intermediate Algebra

3-6 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

3.2 Systems of Three EquationsSystems of three or more equations also appear in practical applications. We will now consideranother example consisting of three equations with three unknowns. It is imperative to rememberthat we must have the same number of equations as the number of unknowns.

Example 3.2

In an automobile dealership, the most popular passenger cars are Brand A, B and C. Because buy-ers normally bargain for the best price, the sales price for each brand is not the same. Table 3.1shows the sales and revenues for a 3-month period.

Compute the average sales price for each of these brands of cars.

Solution:

In this example, the unknowns are the average sales prices for the three brands of automobiles.Let these be denoted as for Brand A, for Brand B, and for Brand C. Then, the sales for eachof the three month period can be represented by the following system of equations*.

(3.14)

The next task is to solve these equations simultaneously, that is, find the values of the unknowns, , and at the same time. In the next section, we will discuss matrix theory and methods for

solving systems of equations of this type. We will return to this example at the conclusion of thenext section.

3.3 Matrices and Simultaneous Solution of Equations

A matrix† is a rectangular array of numbers such as those shown below.

TABLE 3.1 Sales and Revenues for Example 3.2

Month Brand A Brand B Brand C Revenue

1 25 60 50 $2,756,000

2 30 40 60 2,695,000

3 45 53 58 3,124,000

* The reader should observe that these equations are consistent with each side, that is, both the left and the rightside in all equations represent dollars. This observation should be made always when writing equations, since itis a very common mistake to add and equate unrelated quantities.

† To some readers, this material may seem too boring and uninteresting. However, it should be read at least onceto become familiar with matrix terminology. We will use it for some practical examples in later chapters.

x y z

25x 62y 54z+ + 2756000=

28x 42y 58z+ + 2695000=

45x 53y 56z+ + 3124000=

x y z

Page 100: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 3-7Orchard Publications

Matrices and Simultaneous Solution of Equations

In general form, a matrix is denoted as

(3.15)

The numbers are the elements of the matrix where the index indicates the row and indi-cates the column in which each element is positioned. Thus, represents the element posi-tioned in the fourth row and third column.

A matrix of rows and columns is said to be of order matrix.

If , the matrix is said to be a square matrix of order (or ). Thus, if a matrix has five rowsand five columns, it is said to be a square matrix of order 5.

In a square matrix, the elements are called the diagonal elements. Alternately,we say that the elements are located on the main diagonal.

A matrix in which every element is zero, is called a zero matrix.

Two matrices and are said to be equal, that is, , if, and only if

for and .

Two matrices are said to be conformable for addition (subtraction) if they are of the same order, thatis, both matrices must have the same number of rows and columns.

If and are conformable for addition (subtraction), their sum (difference) will

be another matrix C with the same order as A and B, where each element of C represents the sum(difference) of the corresponding elements of A and B, that is,

Example 3.3Compute and given that

and

2 3 71 1– 5

or1 3 12– 1 5–

4 7– 6

A

A

a11 a12 a13 a1n

a21 a22 a23 a2n

a31 a32 a33 a3n

am1 am2 am3 amn

=

aij i j

a43

m n m n

m n= m n

a11 a22 a33 ann

a11 a22 a33 ann

A aij= B bij= A B= aij bij=

i 1 2 3 m= j 1 2 3 n=

A aij= B bij=

C A B aij bij= =

A B+ A B–

A 1 2 30 1 4

= B 2 3 01– 2 5

=

Page 101: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 3 Intermediate Algebra

3-8 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

Solution:

and

If is any scalar (a positive or negative number) and not [ ] which is a matrix, then multi-plication of a matrix by the scalar is the multiplication of every element of by .

Example 3.4

Multiply the matrix

by

Solution:

Two matrices and are said to be conformable for multiplication in that order, only whenthe number of columns of matrix is equal to the number of rows of matrix . The product ,which is not the same as the product , is conformable for multiplication only if is an and matrix is an matrix. The product will then be an matrix. A convenientway to determine whether two matrices are conformable for multiplication, and the dimension ofthe resultant matrix, is to write the dimensions of the two matrices side-by-side as shown below.

For the product we have:

For matrix multiplication, the operation is row by column. Thus, to obtain the product , we

A B+ 1 2+ 2 3+ 3 0+

0 1– 1 2+ 4 5+

3 5 31– 3 9

= =

A B– 1 2– 2 3– 3 0–

0 1+ 1 2– 4 5–

1– 1– 31 1– 1–

= =

k k 1 1A k A k

A 1 2–

2 3= k 5=

k A 5 1 2–

2 35 1 5 2–

5 2 5 35 10–

10 15= = =

A B A BA B A B

B A A m pB p n A B m n

m p p nA B

Shows that A and B are conformable for multiplication

Indicates the dimension of the product A B

B A

Here, B and A are not conformable for multiplication since n m

p n m pAB

A B

Page 102: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 3-9Orchard Publications

Matrices and Simultaneous Solution of Equations

multiply each element of a row of by the corresponding element of a column of , and then weadd these products.

Example 3.5

It is given that

and

Compute the products and

Solution:

The dimensions of matrices and are and respectively; therefore, the product is feasible, and results in a matrix as shown below.

The dimensions for and are and respectively and therefore, the product isalso feasible. However, multiplication of these results in a matrix as shown below.

Division of one matrix by another is not defined. However, an equivalent operation exists. It willbecome apparent later when we discuss the inverse of a matrix.

An identity matrix is a square matrix where all the elements on the main diagonal are ones, andall other elements are zero. Shown below are , , and identity matrices.

Let matrix be defined as the square matrix

A B

C 2 3 4= D11–

2=

C D D C

C D 1 3 3 1 C D1 1

C D 2 3 411–

22 1 3 1– 4 2+ + 7= = =

D C 3 1 1 3 D C3 3

D C11–

22 3 4

1 2 1 3 1 41– 2 1– 3 1– 4

2 2 2 3 2 4

2 3 42– 3– 4–

4 6 8= = =

I2 2 3 3 4 4

1 00 1

1 0 00 1 00 0 1

1 0 0 00 1 0 00 0 1 00 0 0 1

A

Page 103: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 3 Intermediate Algebra

3-10 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

(3.16)

then, the determinant of , denoted as , is defined as

(3.17)

The determinant of a square matrix of order is referred to as determinant of order .

Let be a determinant of order , that is,

(3.18)

Then, by (3.17), (3.18) reduces to

(3.19)

Example 3.6

Compute and given that

and

Solution:

Using (3.19), we get

Let be a determinant of order , that is,

then,

A

a11 a12 a13 a1n

a21 a22 a23 a2n

a31 a32 a33 a3n

an1 an2 an3 ann

=

A detA

detA a11a22a33 ann a12a23a34 an1 a13a24a35 an2 an1 a22a13 an2– a23a14 an3 a24a15 –––

+ + +=

n n

A 2

Aa11 a12

a21 a22=

detA a11 a22 a21 a12–=

detA detB

A 1 23 4

= B 2 1–

2 0=

detA 1 4 3 2– 4 6– 2–= = =

detB 2 0 2 1–– 0 2–– 2= = =

A 3

Aa11 a12 a13

a21 a22 a23

a31 a32 a33

=

Page 104: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 3-11Orchard Publications

Matrices and Simultaneous Solution of Equations

(3.20)

A convenient method to evaluate the determinant of order is to write the first two columns tothe right of the matrix, and add the products formed by the diagonals from upper left tolower right; then subtract the products formed by the diagonals from lower left to upper right asshown below. When this is done properly, we obtain (3.20) above.

This method works only with second and third order determinants. To evaluate higher orderdeterminants, we must first compute the cofactors; these will be defined shortly.

Example 3.7

Compute and given that

and

Solution:

or

Likewise,

or

detA a11a22a33 a12a23a31 a11a22a33+ +=

a11a22a33 a11a22a33 a11a22a33–––

33 3

a11 a12 a13

a21 a22 a23

a31 a32 a33

a11 a12

a21 a22

a31 a32 +

detA detB

A2 3 51 0 12 1 0

= B2 3– 4–

1 0 2–

0 5– 6–

=

detA2 3 5 2 31 0 1 1 02 1 0 2 1

=

detA 2 0 0 3 1 1 5 1 12 0 5– 1 1 2 0 1 3––

+ +11 2– 9= =

=

detB2 3– 4– 2 3–

1 0 2– 1 2–

0 5– 6– 2 6–

=

detB 2 0 6– 3– 2– 0 4– 1 5–+ +=

0 0 4–– 5– 2– 2 6– 1 3–––

20 38– 18–==

Page 105: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 3 Intermediate Algebra

3-12 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

Let matrix be defined as the square matrix of order as shown below.

If we remove the elements of its row and column, the determinant of the remaining

square matrix is called a minor of determinant , and it is denoted as .

The signed minor is called the cofactor of , and it is denoted as .

Example 3.8

Compute the minors , , , and the cofactors , , and given that

Solution:

and

The remaining minors , and the remaining cofactors

are defined similarly.

Example 3.9

Compute the cofactors of

A n

A

a11 a12 a13 a1n

a21 a22 a23 a2n

an1 an2 an3 ann

=

ith jth n 1–

A Mij

1–i j+

Mij aij ij

M11 M12 M13 11 12 13

Aa11 a12 a13

a21 a22 a23

a31 a32 a33

=

M11a22 a23

a32 a33= M12

a21 a23

a31 a33= M11

a21 a22

a31 a32=

11 1–1 1+

M11 M11= = 12 1–1 2+

M12 M12–= =

13 1–1 3+

M13 M13= =

M21 M22 M23 M31 M32 M33

21 22 23 31 32 33

A1 2 3–

2 4– 21– 2 6–

=

Page 106: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 3-13Orchard Publications

Matrices and Simultaneous Solution of Equations

Solution:

and

It is useful to remember that the signs of the cofactors follow the pattern

that is, the cofactors on the diagonals, have the same sign as their minors.

It was shown earlier, that the determinant of a or matrix can be found by the methodof Example 3.7. This method cannot be used for matrices of higher order. In general, the determi-nant of a matrix of any order, is the sum of the products obtained by multiplying each element of anyrow or any column by its cofactor.

Example 3.10

Compute the determinant of from the elements of the first row and their cofactors given that

11 1–1 1+ 4– 2

2 6–20= = 12 1–

1 2+ 2 21– 6–

10= =

13 1–1 3+ 2 4–

1– 20 21 1–

2 1+ 2 3–

2 6–6= == =

22 1–2 2+ 1 3–

1– 6–9–= = 23 1–

2 3+ 1 21– 2

4–= =

31 1–3 1+ 2 3–

4– 28–= = 32 1–

3 2+ 1 3–

2 28–= =

33 1–3 3+ 1 2

2 4–8–= =

+ + ++ +

+ + ++ +

+ + +

2 2 3 3

A

A

A1 2 3–

2 4– 21– 2 6–

=

Page 107: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 3 Intermediate Algebra

3-14 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

Solution:

The determinant of a matrix of order or higher, must be evaluated using the above procedure.Thus, the determinant of a fourth-order matrix can first be expressed as the sum of the productsof the elements of its first row, by its cofactor as shown in (3.21) below.

(3.21)

Example 3.11

Compute the determinant of

Solution:

Using the procedure of (3.21), we multiply each element of the first column by its cofactor. Then,

Next, using the procedure of Example 3.7 or Example 3.10, we find

, , ,and thus

We can also use the MATLAB function det(A) to compute the determinant. For this example,

A=[2 1 0 3; 1 1 0 1; 4 0 3 2; 3 0 0 1]; det(A)

ans =

-33

detA 1 4– 22 6–

= 2 2 21– 6–

3 2 4–

1– 2–– 1 20 2 10– 3 0–– 40= =

4

A

a11 a12 a13 a14

a21 a22 a23 a24

a31 a32 a33 a34

a41 a42 a43 a44

a11

a22 a23 a24

a32 a33 a34

a42 a43 a44

a21

a12 a13 a14

a32 a33 a34

a42 a43 a44

– a31

a12 a13 a14

a22 a23 a24

a42 a43 a44

a41

a12 a13 a14

a22 a23 a24

a32 a33 a34

–+= =

A

2 1– 0 3–

1– 1 0 1–

4 0 3 2–

3– 0 0 1

=

A=21 0 1–

0 3 2–

0 0 1

a

1–1– 0 3–

0 3 2–

0 0 1–

b

+41– 0 3–

1 0 1–

0 0 1

c

3–1– 0 3–

1 0 1–

0 3 2–

d

a 6= b 3–= c 0= d 36–=

detA a b c d+ + + 6 3– 0 36–+ 33–= = =

Page 108: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 3-15Orchard Publications

Matrices and Simultaneous Solution of Equations

The determinants of matrices of order five or higher can be evaluated similarly.

Some useful properties of determinants are given below.

1. If all elements of one row or one column of a square matrix are zero, the determinant is zero. Anexample of this is the determinant of the cofactor in Example 3.11.

2. If all the elements of one row (column) of a square matrix are times the corresponding elementsof another row (column), is zero. For instance, if

then,

Here, is zero because the second column in is times the first column.

We can use the MATLAB function det(A) to compute the determinant.

Consider the systems of the three equations below.

(3.22)

Cramer’s rule states that the unknowns , , and can be found from the relations

(3.23)

where

provided that the determinant (delta) is not zero.

We observe that the numerators of (3.23) are determinants that are formed from by the substi-tution of the known values , , and for the coefficients of the desired unknown.

c

A mdetA

A2 4 13 6 11 2 1

=

detA2 4 13 6 11 2 1

2 43 61 2

12 4 6 6 4–– 12–+ + 0= = =

detA A 2

a11x a12y a13z+ + A=

a21x a22y a23z+ + B=

a31x a32y a33z+ + C=

x y z

xD1------= y

D2------= zD3------=

a11 a12 a13

a21 a22 a23

a31 a32 a33

D1

A a12 a13

B a22 a23

C a32 a33

D2

a11 A a13

a21 B a23

a31 C a33

D3

a11 a12 A

a21 a22 B

a31 a32 C

====

A B C

Page 109: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 3 Intermediate Algebra

3-16 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

Cramer’s rule applies to systems of two or more equations.

If (3.22) is a homogeneous set of equations, that is, if , then , , and are allzero as we found in Property 1 above. In this case, also.

Example 3.12

Use Cramer’s rule to find the unknowns , , and if

Solution:

Rearranging the unknowns and transferring known values to the right side we get

Now, by Cramer’s rule,

Also,

and

Therefore,

A B C 0= = = D1 D2 D3

x y z 0= = =

v1 v2 v3

2v1 5– v2– 3v3+ 0=

2v3 3v2 4v1––– 8=

v2 3v1 4– v3–+ 0=

v

2v1 v2– 3v3+ 5=

4v1 3v2 2v3––– 8=

3v1 v2 v3–+ 4=

2 1– 34– 3– 2–

3 1 1–

2 1–

4– 3–

3 16 6 12– 27 4 4+ + + + 35= = =

D1

5 1– 38 3– 2–

4 1 1–

5 1–

8 3–

4 115 8 24 36 10 8–+ + + + 85= = =

D2

2 5 34– 8 2–

3 4 1–

2 54– 83 4

16– 30– 48– 72– 16 20–+ 170–= = =

D3

2 1– 54– 3– 83 1 4

2 1–

4– 3–

3 124– 24– 20– 45 16– 16–+ 55–= = =

Page 110: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 3-17Orchard Publications

Matrices and Simultaneous Solution of Equations

We can verify the first equation as follows:

We can also find the unknowns in a system of two or more equations by the Gaussian EliminationMethod. With this method, the objective is to eliminate one unknown at a time. This is done bymultiplying the terms of any of the given equations of the system, by a number such that we canadd (or subtract) this equation to (from) another equation in the system, so that one of theunknowns is eliminated. Then, by substitution to another equation with two unknowns, we canfind the second unknown. Subsequently, substitution of the two values that were found, can bemade into an equation with three unknowns from which we can find the value of the thirdunknown. This procedure is repeated until all unknowns are found. This method is best illus-trated with the following example which consists of the same equations as the previous example.

Example 3.13

Use the Gaussian elimination method to find , , and of

(3.24)

Solution:

As a first step, we add the first equation of (3.24) with the third, to eliminate the unknown .When this is done, we obtain the equation

(3.25)

Next, we multiply the third equation of (3.24) by and we add it with the second to eliminate. When this step is done, we obtain the following equation.

(3.26)

Subtraction of (3.26) from (3.25) yields

v1D1------ 85

35------ 17

7------= = =

v2D2------ 170

35---------– 34

7------–= = =

v3D3------ 55

35------– 11

7------–= = =

2v1 v2– 3v3+ 2 177

------ 347

------–– 3 117

------–+ 34 34 33–+7

------------------------------ 357

------ 5= = ==

v1 v2 v3

2v1 v2– 3v3+ 5=

4v1 3v2 2v3––– 8=

3v1 v2 v3–+ 4=

v2

5v1 2v3+ 9=

3v2

5v1 5v3– 20=

Page 111: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 3 Intermediate Algebra

3-18 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

* (3.27)

Now, we can find the unknown from either (3.25) or (3.26). Thus, by substitution of (3.27)into (3.25), we get

(3.28)

Finally, we can find the last unknown from any of the three equations of (3.24). Then, by sub-stitution into the first equation, we get

These are the same values as those we found in Example 3.12.

Let be an square matrix, and be the cofactor of . Then, the adjoint of , denoted as, is defined as the square matrix of (3.29) below.

(3.29)

We observe that the cofactors of the elements of the row (column) of , are the elements ofthe column (row) of .

Example 3.14

Given that

compute .

* As stated earlier, it is advisable to leave the values in rational form until the last step.

7v3 11 or v3117------–=–=

v1

5v1 2 117

------–+ 9 or v1177------==

v2

v2 2v1 3v3 5–+ 347

------ 337

------– 357

------– 347

------–= = =

A n ij aij A

adjA n

adjA

11 21 31 n1

12 22 32 n2

1n 2n 3n nn

=

ith Aith adjA

A1 2 31 3 41 4 3

=

adjA

Page 112: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 3-19Orchard Publications

Matrices and Simultaneous Solution of Equations

Solution:

An square matrix is called singular if ; if , it is called non-singular.

Example 3.15

Given that

determine whether this matrix is singular or non-singular.

Solution:

Therefore, matrix is singular.

If and are square matrices such that where is the identity matrix, iscalled the inverse of , denoted as , and likewise, is called the inverse of , that is,

.

If a matrix is non-singular, we can compute its inverse from the relation

(3.30)

Example 3.16

Given that

adjA

3 44 3

2 34 3

– 2 33 4

1 41 3

– 1 31 3

2 33 4

1 31 4

1 21 4

– 1 21 3

7– 6 1–

1 0 1–

1 2– 1= =

n A detA 0= detA 0

A1 2 32 3 43 5 7

=

detA1 2 32 3 43 5 7

1 22 33 5

21 24 30 27– 20– 28–+ + 0= = =

A

A B n AB BA I= = I B

A B A 1–= A B

A B 1–=

A

A 1– 1detA------------adjA=

A1 2 31 3 41 4 3

=

Page 113: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 3 Intermediate Algebra

3-20 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

compute its inverse, that is, find .Solution:For this example,

and since , it is possible to compute the inverse of using (3.30).

From Example 3.14,

Then,

Multiplication of a matrix by its inverse produces the identity matrix , that is,

(3.31)Example 3.17

Prove the validity of (3.31) for

Proof:

then,

Therefore,

Consider the relation(3.32)

where and are matrices whose elements are known, and is a matrix whose elements are theunknowns. Here, we assume that and are conformable for multiplication. Multiplication of

A 1–

detA 9 8 12 9– 16– 6–+ + 2–= =

detA 0 A

adjA7– 6 1–

1 0 1–

1 2– 1=

A 1– 1detA------------adjA 1

2–------

7– 6 1–

1 0 1–

1 2– 1

3.5 3– 0.50.5– 0 0.50.5– 1 0.5–

= = =

A A 1– I

AA 1– I or A 1– A I==

A 4 32 2

=

detA 8 6– 2 and adjA 2 3–

2– 4== =

A 1– 1detA------------adjA 1

2--- 2 3–

2– 41 3– 21– 2

= = =

AA 1– 4 32 2

1 3– 21– 2

4 3– 6– 6+

2 2– 3– 4+

1 00 1

I= = = =

AX B=

A B XA X

Page 114: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 3-21Orchard Publications

Matrices and Simultaneous Solution of Equations

both sides of (3.32) by yields:

and since , we obtain the important matrix relation

(3.33)

We can use (3.33) to solve any set of simultaneous equations that have solutions. We call thismethod, the inverse matrix method of solution.

Example 3.18

For the system of equations

compute the unknowns , , and using the inverse matrix method.

Solution:

In matrix form, the given set of equations is where

and from (3.33),

or

Next, we compute the determinant and the adjoint of . Following the procedures of Examples3.7 or 3.10, and 3.14 we find that

Then,

A 1–

A 1– AX A 1– B IX A 1– B = = =

IX X=

X=A 1– B

2x1 3x2 x3+ + 9=

x1 2x2 3x3+ + 6=

3x1 x2 2x3+ + 8=

x1 x2 x3

AX B=

A2 3 11 2 33 1 2

= Xx1

x2

x3

= B968

=

X A 1– B=

x1

x2

x3

2 3 11 2 33 1 2

1–968

=

A

detA 18= and adjA1 5– 77 1 5–

5– 7 1=

Page 115: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 3 Intermediate Algebra

3-22 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

Now, using (3.33) we obtain the solution shown below.

We can also use Microsoft Excel’s MINVERSE (Matrix Inversion) and MMULT (Matrix Multipli-cation) functions to obtain the values of the three unknowns of Example 3.18.

The procedure is as follows:

1. We start with a blank spreadsheet, and in a block of cells, say B4:D6, we enter the elements ofmatrix as shown on the spreadsheet of Figure 3.3. Then, we enter the elements of matrix in G4:G6.

2. Next, we compute and display the inverse of , that is, . We choose B8:D10 for the ele-ments of this inverted matrix. We format this block for number display with three decimalplaces. With this range highlighted, and making sure that the selected cell is B8, we type theformula

=MINVERSE(B4:D6)

and we press the Crtl-Shift-Enter keys simultaneously. We observe that appears in thesecells.

3. Now, we choose the block of cells G8:G10 for the values of the unknowns. As before, we high-light them, and with the cell marker positioned in G8, we type the formula

=MMULT(B8:D10,G4:G6)

and we press the Crtl-Shift-Enter keys simultaneously. The values of then appear in G8:G10.

A 1– 1detA------------adjA 1

18------

1 5– 77 1 5–

5– 7 1= =

Xx1

x2

x3

118------

1 5– 77 1 5–

5– 7 1

968

118------

35295

35 1829 185 18

1.941.610.28

= = = = =

A B

A A 1–

A 1–

X

Page 116: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 3-23Orchard Publications

Matrices and Simultaneous Solution of Equations

Figure 3.3. Spreadsheet for Example 3.18

We should not erase this spreadsheet; we will use it to finish Example 3.2.

To continue with Example 3.2, we type-in (overwrite) the existing entries as follows:

1. Replace the contents of matrix , in A4:D6 with the coefficients of the unknowns in (3.14),which is repeated here for convenience. These are shown in the spreadsheet of Figure 3.4.

(3.34)

2. In G4:G6, we enter the values that appear on the right side of (3.34). The values of theunknowns , , and appear in G8:G10*.

The updated spreadsheet is shown in Figure 3.4.

The range G8:G10 shows that Brand A car was sold at an average price of , Brand Bat , and Brand C at .

The last step is to verify that these values satisfy all three equations in (3.34). This can be doneeasily with Excel as follows:

In any cell, say A11, we type the formula

=B4*G8+C4*G9+D4*G10

* Make sure that Excel is configured for automatic recalculation. This can be done with the sequential commandsTool>Options>Calculation>Automatic.

123456789

1011

A B C D E F G HSpreadsheet for Matrix Inversion and Matrix MultiplicationExample 3.17

2 3 1 9A= 1 2 3 B= 6

3 1 2 8

0.056 -0.278 0.389 1.9444A-1= 0.389 0.056 -0.278 X= 1.6111

-0.278 0.389 0.056 0.2778

A

25x 62y 54z+ + 2756000=

28x 42y 58z+ + 2695000=

45x 53y 56z+ + 3124000=

x y z

$20,904.99$11,757.61 $27,589.32

Page 117: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 3 Intermediate Algebra

3-24 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

Figure 3.4. Spreadsheet for Example 3.2

This formula instructs Excel to multiply the contents of B4 by the contents of G8, C4 by G9, D4by G10, and add these. We observe that A11 displays ; this verifies the first equation. Thesecond and third equations can be verified similarly.

MATLAB*, which is discussed in Appendix A, offers a more convenient method for matrix oper-

ations. To verify our results, we could use the MATLAB inv(A) function, and then multiply by B. However, it is easier to use the matrix left division operation ; this is MATLAB’s

solution of for the matrix equation , where matrix X is the same size as matrix B.For this example, we enter

A=[25 62 54; 28 42 58; 45 53 56]; B=[2756000 2695000 3124000]';

X=A\B

and MATLAB displays , , and

* For readers not familiar with it, it is highly recommended that it is studied next.

123456789

10

A B C D E F G HSpreadsheet for Matrix Inversion and Matrix MultiplicationExample 3.2

25 62 54 2756000A= 28 42 58 B= 2695000

45 53 56 3124000

-0.029 -0.025 0.054 20904.99A-1= 0.042 -0.042 0.003 X= 11757.61

-0.016 0.059 -0.028 27859.32

2756000

A 1–

X A \ B=

A 1– B A X B=

x1 2.0905 104= x2 1.1758 104

= x3 2.7859 104=

Page 118: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 3-25Orchard Publications

Summary

3.4 Summary• In general, a straight line is represented by the equation

where is the slope, is the abscissa, is the ordinate, and is the y-intercept of the straightline.

• The slope is the rise in the vertical (y-axis) direction over the run in the abscissa (x-axis)direction. In other words,

• A matrix is a rectangular array of numbers. The general form of a matrix is

• The numbers are the elements of the matrix where the index indicates the row and indi-cates the column in which each element is positioned. Thus, represents the element posi-tioned in the fourth row and third column.

• A matrix of rows and columns is said to be of order matrix. If , the matrix issaid to be a square matrix of order (or ).

• In a square matrix, the elements are called the diagonal elements.

• A matrix in which every element is zero, is called a zero matrix.

• Two matrices and are said to be equal, that is, , if, and only if

for and .

• Two matrices are said to be conformable for addition (subtraction) if they are of the same order,that is, both matrices must have the same number of rows and columns.

• If and are conformable for addition (subtraction), their sum (difference)

will be another matrix C with the same order as A and B, where each element of C representsthe sum (difference) of the corresponding elements of A and B, that is,

y mx b+=

m x y b

m

m riserun----------

y2 y1–

x2 x1–----------------= =

A

A

a11 a12 a13 a1n

a21 a22 a23 a2n

a31 a32 a33 a3n

am1 am2 am3 amn

=

aij i j

a43

m n m n m n=

m n

a11 a22 a33 ann

A aij= B bij= A B=

aij bij= i 1 2 3 m= j 1 2 3 n=

A aij= B bij=

C A B aij bij= =

Page 119: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 3 Intermediate Algebra

3-26 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

• If is any scalar (a positive or negative number) and not [ ] which is a matrix, then mul-tiplication of a matrix by the scalar is the multiplication of every element of by .

• Two matrices and are said to be conformable for multiplication in that order, onlywhen the number of columns of matrix is equal to the number of rows of matrix . That is,matrix product is conformable for multiplication only if is an and matrix is an

matrix. The matrix product will then be an matrix.

• The matrix product , is not the same as the matrix product .

• For matrix multiplication, the operation is row by column. Thus, to obtain the product ,we multiply each element of a row of by the corresponding element of a column of , andthen we add these products.

• Division of one matrix by another is not defined. An equivalent operation is performed withthe inverse of a matrix.

• An identity matrix is a square matrix where all the elements on the main diagonal are ones,and all other elements are zero.

• If a matrix be defined as the square matrix

the determinant of , denoted as , is defined as

• The determinant of a square matrix of order is referred to as determinant of order .

• If a matrix be defined as the square matrix of order as shown below

and we remove the elements of its row and column, the determinant of the remaining

k k 1 1A k A k

A B A BA B

A B A m p Bp n A B m n

A B B A

A BA B

I

A

A

a11 a12 a13 a1n

a21 a22 a23 a2n

a31 a32 a33 a3n

an1 an2 an3 ann

=

A detA

detA a11a22a33 ann a12a23a34 an1 a13a24a35 an2 an1 a22a13 an2– a23a14 an3 a24a15 –––

+ + +=

n n

A n

A

a11 a12 a13 a1n

a21 a22 a23 a2n

an1 an2 an3 ann

=

ith jth

Page 120: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 3-27Orchard Publications

Summary

square matrix is called a minor of determinant , and it is denoted as .

• The signed minor is called the cofactor of , and it is denoted as .

• In general, the determinant of a matrix of any order, is the sum of the products obtained by multi-plying each element of any row or any column by its cofactor.

• If all elements of one row or one column of a square matrix are zero, the determinant is zero.

• If all the elements of one row (column) of a square matrix are times the corresponding elementsof another row (column), is zero.

• Cramer’s rule states that the unknowns , , and can be found from the relations

where

provided that the determinant (delta) is not zero.

• We can also find the unknowns in a system of two or more equations by the Gaussian Elimina-tion Method. With this method we eliminate one unknown at a time. This is done by multiply-ing the terms of any of the given equations of the system, by a number such that we can add(or subtract) this equation to (from) another equation in the system, so that one of theunknowns is eliminated. Then, by substitution to another equation with two unknowns, wecan find the second unknown. Subsequently, substitution of the two values that were found,can be made into an equation with three unknowns from which we can find the value of thethird unknown. This procedure is repeated until all unknowns are found.

• If a matrix is an square matrix, and is the cofactor of , the adjoint of , denoted as, is defined as the square matrix below.

• The cofactors of the elements of the row (column) of , are the elements of the col-umn (row) of .

n 1– A Mij

1–i j+

Mij aij ij

A

A mdetA

x y z

xD1------= y

D2------= zD3------=

a11 a12 a13

a21 a22 a23

a31 a32 a33

D1

A a12 a13

B a22 a23

C a32 a33

D2

a11 A a13

a21 B a23

a31 C a33

D3

a11 a12 A

a21 a22 B

a31 a32 C

====

A n ij aij A

adjA n

adjA

11 21 31 n1

12 22 32 n2

1n 2n 3n nn

=

ith A ithadjA

Page 121: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 3 Intermediate Algebra

3-28 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

• An square matrix is called singular if ; if , it is called non-singular.

• If and are square matrices such that where is the identity matrix, iscalled the inverse of , denoted as , and likewise, is called the inverse of , that is,

.

• If a matrix is non-singular, we can compute its inverse from the relation

• The relation

where and are matrices whose elements are known, is a matrix whose elements are theunknowns, and and are conformable for multiplication, can be used to solve any set ofsimultaneous equations that have solutions. We call this method, the inverse matrix method ofsolution.

• We can also use Microsoft Excel’s MINVERSE (Matrix Inversion) and MMULT (Matrix Multi-plication) functions to obtain the values of the unknowns in a system of equations.

• The matrix left division operation is MATLAB’s solution of for the matrixequation , where matrix X is the same size as matrix B.

n A detA 0= detA 0

A B n AB BA I= = I B

A B A 1–= A B

A B 1–=

A

A 1– 1detA------------adjA=

X=A 1– B

A B XA X

X A \ B= A 1– BA X B=

Page 122: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 3-29Orchard Publications

Exercises

3.5 ExercisesFor Exercises 1 through 3 below, the matrices , , and are defined as:

1. Perform the following computations, if possible. Verify your answers with Excel or MATLAB.

a. b. c. d. e. f. g. h.

2. Perform the following computations, if possible. Verify your answers with Excel or MATLAB.

a. b. c. d. e. f. g. h.

3. Perform the following computations, if possible. Verify your answers with Excel or MATLAB.

a. b. c. d. e. f.

4. Solve the following system of equations using Cramer’s rule. Verify your answers with Excel orMATLAB.

5. Repeat Exercise 4 using the Gaussian elimination method.

6. Use the MATLAB det(A) function to find the unknowns of the system of equations below.

7. Solve the following system of equations using the inverse matrix method. Verify your answerswith Excel or MATLAB.

A B C D

A1 1– 4–

5 7 2–

3 5– 6= B

5 9 3–

2– 8 27 4– 6

= C=4 63– 85 2–

D 1 2– 33– 6 4–

=

A B+ A C+ B D+ C D+ A B– A C– B D– C D–

A B A C B D C D B A C A D A D· C

detA detB detC detD det A B det A C

x1 2x2 x3+– 4–=

2x– 1 3x2 x3+ + 9=

3x1 4x2 5x3–+ 0=

x1– 2x2 3x3– 5x4+ + 14=

x1 3x2 2x3 x4–+ + 9=

3x1 3– x2 2x3 4x4+ + 19=

4x1 2x2 5x3 x4+ + + 27=

1 3 43 1 2–

2 3 5

x1

x2

x3

3–

2–

0=

Page 123: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 3 Intermediate Algebra

3-30 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

8. Use Excel to find the unknowns for the system

Verify your answers with the MATLAB left division operation.

2 4 3 2–

2 4– 1 31– 3 4– 22 2– 2 1

x1

x2

x3

x4

11014–

7

=

Page 124: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 3-31Orchard Publications

Solutions to Exercises

3.6 Solutions to Exercises1.

a. b. not conformable for addition

c. not conformable for addition d. not conformable for addition

e. f. not conformable for subtraction

g. not conformable for subtraction h. not conformable for subtraction

2.

a.

Check with MATLAB:

A=[1 1 4; 5 7 2; 3 5 6]; B=[5 9 3; 2 8 2; 7 4 6]; A*B

ans =

-21 17 -29

-3 109 -13

67 -37 17

b.

c. not conformable for multiplication

d.

A B+1 5+ 1– 9+ 4– 3–

5 2– 7 8+ 2– 2+

3 7+ 5– 4– 6 6+

6 8 7–

3 15 010 9– 12

= = A C+

B D+ C D+

A B–1 5– 1– 9– 4– 3+

5 2+ 7 8– 2– 2–

3 7– 5– 4+ 6 6–

4– 10– 1–

7 1– 4–

4– 1– 0= = A C–

B D– C D–

A B1 5 1– 2– 4– 7++ 1 9 1– 8 4– 4–++ 1 3– 1– 2 4– 6++

5 5 7 2– 2– 7++ 5 9 7 8 2– 4–++ 5 3– 7 2 2– 6++

3 5 5– 2– 6 7++ 3 9 5– 8 6 4–++ 3 3– 5– 2 6 6++

=

21– 17 29–

3– 109 13–

67 37– 17=

A C1 4 1– 3– 4– 5++ 1 6 1– 8 4– 2–++

5 4 7 3– 2– 5++ 5 6 7 8 2– 2–++

3 4 5– 3– 6 5++ 3 6 5– 8 6 2–++

13– 611– 90

57 34–

= =

B D

C D4 1 6 3–+ 4 2– 6 6+ 4 3 6 4–+

3– 1 8 3–+ 3– 2– 8 6+ 3– 3 8 4–+

5 1 2– 3–+ 5 2– 2– 6+ 5 3 2– 4–+

14– 28 12–

27– 54 41–

11 22– 23= =

Page 125: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 3 Intermediate Algebra

3-32 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

e.

f. not conformable for multiplication

g.

h.

3.

a.

b.

c. does not exist; matrix must be square

d. does not exist; matrix must be square

e. and from parts (a) and (b),

f. does not exist because does not exist

B A5 1 9 5 3– 3++ 2– 1 8 5 2 3++ 7 1 4– 5 6 3++

5 1– 9 7 3– 5–++ 2– 1– 8 7 2 5–++ 7 1– 4– 7 6 5–++

5 4– 9 2– 3– 6++ 2– 4– 8 2– 2 6++ 7 4– 4– 2– 6 6++

=

41 73 56–

44 48 45 65– 16

=

C A

D A 1 1 2– 5 3 3++ 1 1– 2– 7 3 5–++ 1 4– 2– 2– 3 6++

3– 1 6 5 4– 3++ 3– 1– 6 7 4– 5–++ 3– 4– 6 2– 4– 6++=

0 30– 1815 65 24–

=

D C 1 4 2– 3– 3 5++ 1 6 2– 8 3 2–++

3– 4 6 3– 4– 5++ 3– 6 6 8 4– 2–++

25 16–

50– 38= =

detA1 1– 4– 1 1–

5 7 2– 5 73 5– 6 3 5–

=

1 7 6 1– 2– 3 4– 5 5–+ 3 7 4– 5–+ 2– 1 6 5 1–+–+=

42 6 100 84–– 10– 30––+ + 252==

detB5 9 3– 5 92– 8 2 2– 87 4– 6 7 4–

=

5 8 6 9 2 7 3– 2– 4–+ 7 8 3– 4–+ 2 5 6 2– 9+–+=

240 126 24– 168–– 40 108––+ + 658==

detC

detD

det A B detA detB= det A B 252 658 165816= =

det A C detC

Page 126: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 3-33Orchard Publications

Solutions to Exercises

4.

5. (1)

(2)

(3)

Multiplication of (1) by yields (4)

Addition of (2) and (4) yields

(5)

1 2– 1 1 2–

2– 3 1 2– 33 4 5– 3 4

=

1 3 5– 2– 1 3 1 2– 4 3 3 1 4 1 1 5– 2– 2–++–++=

15– 6– 8– 9– 4– 20+ 22–==

D1

4– 2– 1 4 2–

9 3 1 9 30 4 5– 0 4

=

4– 3 5– 2– 1 0 1 9 4 0 3 1 4 1 4 5– 9 2–++–++=

60 0 36 0– 16 90–+ + + 22==

D2

1 4– 1 1 4–

2– 9 1 2– 93 0 5– 3 0

=

1 9 5– 4– 1 3 1 2– 0 3 9 1 0 1 1 5– 2– 4–++–++=

45– 12– 0– 27– 0– 40+ 44–==

D3

1 2– 4– 1 2–

2– 3 9 2– 33 4 0 3 4

=

1 3 0 2– 9 3 4– 2– 4 3 3 4– 4 9 1 0 2– 2–++–++=

0 54– 32 36 36– 0–+ + 22–==

x1D1------ 22

22–--------- 1–= = = x2

D2------ 44–22–

--------- 2= = = x3D3------ 22–

22–--------- 1= = =

x1 2x2 x3+– 4–=

2x– 1 3x2 x3+ + 9=

3x1 4x2 5x3–+ 0=

22x1 4x2 2x3+– 8–=

x2 3x3+– 1=

Page 127: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 3 Intermediate Algebra

3-34 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

Multiplication of (1) by yields (6)

Addition of (3) and (6) yields

(7)

Multiplication of (5) by 10 yields

(8)

Addition of (7) and (8) yields (9)

or (10)

Substitution of (10) into (7) yields (11)

or (12)

and substitution of (10) and (12) into (1) yields

(13)

or (14)

6.

Delta=[ 1 2 3 5; 1 3 2 1; 3 3 2 4; 4 2 5 1];

D1=[14 2 3 5; 9 3 2 1; 19 3 2 4; 27 2 5 1];

D2=[ 1 14 3 5; 1 9 2 1; 3 19 2 4; 4 27 5 1];

D3=[ 1 2 14 5; 1 3 9 1; 3 3 19 4; 4 2 27 1];

D4=[ 1 2 3 14; 1 3 2 9; 3 3 2 19; 4 2 5 27];

x1=det(D1)/det(Delta), x2=det(D2)/det(Delta),...

x3=det(D3)/det(Delta), x4=det(D4)/det(Delta)

x1=1 x2=2 x3=3 x4=4

3–

3– x1 6x2 3x3–+ 12=

10x2 8x3– 12=

10x2 30x3+– 10=

22x3 22=

x3 1=

10x2 8– 12=

x2 2=

x1 4 1+– 4–=

x1 1–=

Page 128: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 3-35Orchard Publications

Solutions to Exercises

7.

detA

1 3 43 1 2–

2 3 5

1 33 12 3

1 1 5 3 2– 2 4 3 3 2 1 4 3 2–+ 1 5 3 3+–++=

=

5 12– 36 8– 6 45–+ + 18–==

adjA11 3– 10–

19– 3– 147 3 8–

=

A 1– 1detA------------ adjA 1

18–---------

11 3– 10–

19– 3– 147 3 8–

11 18– 3 18 10 1819 18 3 18 14 18–

7 18– 3– 18 8 18= = =

Xx1

x2

x3

11 18– 3 18 10 1819 18 3 18 14 18–

7 18– 3– 18 8 18

3–

2–

0

33 18 6 18– 0+

57– 18 6 18 0+–

21 18 6 18 0+ +

27 1863– 1827 18

1.503.50–

1.50= = = = =

Page 129: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 3 Intermediate Algebra

3-36 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

8.

A=[2 4 3 2; 2 4 1 3; 1 3 4 2; 2 2 2 1];

B=[1 10 14 7]'; A\B

ans =

-11.5000

1.5000

12.0000

9.0000

Page 130: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 4-1Orchard Publications

Chapter 4

Fundamentals of Geometry

his chapter discusses the basic geometric figures. It is intended for readers who need tolearn the basics of geometry. Readers with a strong mathematical background may skip thischapter. Others will find it useful, as well as a convenient source for review.

4.1 IntroductionGeometry is the mathematics of the properties, measurement, and relationships of points, lines,angles, surfaces, and solids. The science of geometry also includes analytic geometry, descriptivegeometry, fractal geometry, non-Euclidean geometry*, and spaces with four or more dimensions.It is beyond the scope of this text to discuss the different types of geometry in detail; we will onlypresent the most common figures and their properties such as the number of sides, angles, perim-eters, and areas. In this text, we will only be concerned with the so-called Euclidean Geometry†.

4.2 Plane Geometry FiguresA triangle is a plane figure that is formed by connecting three points, not all in a straight line, bystraight line segments. It is a special case of a polygon which is defined as a closed plane figure

* In analytic geometry straight lines, curves, and geometric figures are represented by algebraic expressions. Any point in aplane may be located by specifying the distance of the point from each of a pair of perpendicular axes. Points in three-dimen-sional space can be similarly located with respect to three axes. A straight line can always be represented by an equation inthe form ax + by + c = 0.

The science of making accurate, two-dimensional drawings of three-dimensional geometrical forms is called descriptivegeometry. The usual technique is by means of orthographic projection, in which the object to be drawn is referred to one ormore imaginary planes that are at right angles to one another.A fractal is a geometric pattern that is repeated at ever smaller scales to produce irregular shapes and surfaces that cannotbe represented by classical geometry. Fractals are used especially in computer modeling of irregular patterns and structuresin nature.

† Euclidean Geometry is based on one of Euclid's postulates which states that through a point outside a line it is possible todraw only one line parallel to that line. For many centuries mathematicians believed that this postulate could be proved onthe basis of Euclid's other postulates, but all efforts to discover such a proof were unsuccessful. In the first part of the 19thcentury the German mathematician Carl Friedrich Gauss, the Russian mathematician Nikolay Ivanovich Lobachevsky,and the Hungarian mathematician János Bolyai independently demonstrated a consistent system of geometry in whichEuclid's postulate was replaced by one stating that an infinite number of parallels to a particular line could be drawn.About 1860 the German mathematician Georg Friedrich Bernhard Riemann showed that a geometry with no parallel lineswas equally possible. For comparatively small distances, Euclidean geometry and the non-Euclidean geometries are aboutthe same. However, in dealing with astronomical distances and relativity, non-Euclidean geometries give a more precisedescription of the observed facts than Euclidean geometry.

T

Page 131: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 4 Fundamentals of Geometry

4-2 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

bounded by three or more line segments. The general form of a triangle is shown in Figure 4.1where the capital letters A, B, and C denote the angles, and the lower case letters denote thethree sides of the triangle.

Figure 4.1. General Form of a Triangle

It is customary to show the sides of a triangle opposite to the angles. Thus, side is opposite toangle , side is opposite to angle and so on.

We will denote the angles with the symbol . Thus, will mean angle .

The perimeter of a polygon is defined as the closed curve that bounds the plane area of the poly-gon. In other words, it is the entire length of the polygon’s boundary.

The area of a polygon is the space inside the boundary of the polygon, and it is expressed in squareunits. In Figure 4.1, the shaded portion represents the area of this triangle.

Note 4.1

The area of some basic polygons can be computed with simple formulas. However, the formulasfor the area of most polygons involve trigonometric functions. We will discuss the most commonon the next chapter. It is also possible to compute the areas of irregular polygons with a spread-sheet, as we will see later in this chapter.

A perpendicular line is one that intersects another line to form a angle. Thus, a vertical linethat intersects a horizontal line, is a perpendicular to the horizontal since it forms a anglewith it.

For the triangle of Figure 4.1, line is a perpendicular line drawn from down to line form-ing angle as shown.

In geometry, the line that joins a vertex of a triangle to the midpoint of the opposite side is calledthe median. Thus in Figure 4.1, line e is a median from to the midpoint of line .

Property 1

The sum of the three angles of any triangle is .

A B

C

ab

c

90 0

d e

aA b B

A A

9090

d C c90

C c

180

Page 132: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 4-3Orchard Publications

Plane Geometry Figures

Example 4.1

In Figure 4.1, and . Find .

Solution:

From Property 1,

or(4.1)

and since

by substitution into (4.1),

Example 4.2

In Figure 4.1, , , and . Find the perimeter of the triangle.

Solution:

The perimeter is the sum of the lengths of the three sides of the triangle. Therefore,

The right, the isosceles, and the equilateral triangles are special cases of the general triangle ofFigure 4.1. We will discuss each separately. Formulas involving trigonometric functions will begiven on the next chapter.

A triangle containing an angle of is a right triangle. Thus, Figure 4.2 is a right triangle.

Figure 4.2. Right Triangle

Property 2

If, in a right triangle, , then . This is a consequence of the fact that in atriangle, the sum of the three angles is .

In a right triangle, the side opposite to the right angle is called the hypotenuse of the right triangle.Thus, side in Figure 4.2, is the hypotenuse of that triangle.

A 53= B 48= C

A B C+ + 180=

C 180 A B+–=

A B+ 53 48+ 101= =

C 180 101– 79= =

a 45 cm= b 37 cm= c 57 cm=

perimeter a b c+ + 45 37 57+ + 139 cm= = =

90

cb

aB C

A

90 0

C 90= A B+ 90=

180

c

Page 133: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 4 Fundamentals of Geometry

4-4 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

Property 3

If is the hypotenuse of a right triangle, then

(4.2)

This relation is known as the Pythagorean theorem.

Example 4.3

In Figure 4.2, and . Find the length of the line segment .

Solution:

We express (4.2) as

or

Then, with the given values*

Property 4

If is the hypotenuse of a right triangle, the area of this triangle is found from the relation

(4.3)

Example 4.4

In Figure 4.2, and . Find the area of this triangle.

Solution:

From (4.3),†

* As we know, but we reject the negative value since it is unrealistic for this example.† In area calculations, besides multiplication of the numbers, we must multiply the units also. Thus, for this exam-

ple, inches inches = square inches. Otherwise, the result is meaningless.

c

c2 a2 b2+=

Pythagorean Theorem

c 5 cm= b 3 cm= a

a2 c2 b2–=

a c2 b2–=

a 52 32– 25 9– 16 4 in.= = = =

16 4=

c

Area 12--- a b=

Area of Right Triangle

a 4 cm.= b 3 cm=

Area 12---ab 1

2--- 4 3 6 cm2.= = =

Page 134: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 4-5Orchard Publications

Plane Geometry Figures

A triangle that has two equal sides is called isosceles triangle. Figure 4.3 shows an isosceles trianglewhere sides a and b are equal. Consequently, .

Figure 4.3. Isosceles Triangle

Example 4.5

In Figure 4.3, , and . Compute:

a. the perimeter

b.

c. the area

Solution:

a.

and since this is an isosceles triangle,

Therefore,

b. By Property 1,

or

Since this is an isosceles triangle,

Therefore,

c. No formula was given to compute the area of an isosceles triangle; however, we can use theformula of the right triangle after we split the isosceles triangle into two equal right triangles.We do this by drawing a perpendicular line from down to line forming a angle asshown in Figure 4.4. We denote this line as (for height).

A B=

A B

C

ab

c

a 5 cm= c 4 cm= A 70=

C

Perimeter a b c+ +=

a b=

perimeter 2a c+ 2 5 4+ 14 cm= = =

A B C+ + 180=

C 180 A B+–=

B A 70= =

C 180 70 70+– 180 140– 40= = =

C c 90h

Page 135: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 4 Fundamentals of Geometry

4-6 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

Figure 4.4. Isosceles Triangle for Example 4.5

Since the perpendicular line divides the isosceles triangle into two equal right triangles, itfollows that . Therefore, we only need to compute and multiply it by

to obtain the total area. Thus,

(4.4)

where Next, we need to find the height . This is found from thePythagorean theorem stated in Property 3. Then, for the right triangle of the left side of Figure4.4,

or

By substitution of the given values,

or

Finally, by substitution into (4.5), and multiplying by 2 to obtain the total area, we get

A triangle with all sides equal is called equilateral triangle. Figure 4.5 shows an equilateral trianglewhere sides , , and are equal. Consequently, , , and are equal.

Figure 4.5. Equilateral Triangle

A B

C

ab

c

Area 1 Area 2

h

c/2 c/2

hArea 1 Area 2= Area 1

2

Area 1 12--- c

2--- h=

c 2 4 2 2 cm= = h

b2 c 2 2 h2+=

h2 b2 c 2 2–=

h2 52 4 2 2– 25 4– 21= = =

h 21 4.5826= =

Total Area 2 Area 1= 2 12--- c

2--- h 2 4.5826 9.1652 in2

= = =

a b c A B C

A B

C

ab

c

Page 136: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 4-7Orchard Publications

Plane Geometry Figures

For an equilateral triangle,

(4.5)

(4.6)

Congruent triangles are identical in shape and size. If two triangles are congruent, the followingstatements are true:

When two triangles are congruent, the six corresponding pairs of angles and sides are also con-gruent.

If all three pairs of corresponding sides in two triangles are the same as shown in Figure 4.6, thetriangles are congruent.

Figure 4.6. The three sides of one triangle are congruent to the three sides of the other triangle

If two angles and the included side of one triangle are congruent to two angles and theincluded side of another triangle as shown in Figure 4.7, the triangles are congruent.

Figure 4.7. Two angles and the included side of one triangle are congruent to two angles and the included side of the other triangle

IV If two sides and the included angle of one triangle are congruent to two sides and the includedangle of another triangle as shown in Figure 4.8, the triangles are congruent.

V If two angles and a non-included side of one triangle are congruent to the two angles and thecorresponding non-included angle of another triangle as shown in Figure 4.9, the triangles arecongruent.

VI If the hypotenuse and the leg of one right triangle are congruent to the corresponding parts ofanother triangle as shown in Figure 4.10, the two triangles are congruent.

A B C 60= = =

Area 34

-------a2=

Page 137: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 4 Fundamentals of Geometry

4-8 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

Figure 4.8. Two sides and the included angle of one triangle are congruent to two sides and the included angle of the other triangle

Figure 4.9. Two angles and a non-included side of one triangle are congruent to the two angles and the non-included side of the other triangle

Figure 4.10. The hypotenuse and the leg of one right triangle are congruent to the corresponding parts of another right triangle

VII Two triangles with two sides and a non-included angle may or may not be congruent.

VII Every triangle can be partitioned into four congruent triangles by connecting the middlepoints of its three sides as shown in Figure 4.11.

X A triangle that can be partitioned into congruent parts, it can also partitioned into

congruent parts.

n

4 n 42 n 43 n

Page 138: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 4-9Orchard Publications

Plane Geometry Figures

Figure 4.11. Triangle partitioned into four congruent triangles

X Any isosceles triangle can be partitioned into two congruent triangles by one of its heights.

XI Any equilateral triangle can be partitioned into three congruent triangles by segments con-necting its center to its vertices.

XII A right triangle whose sides forming the right angle have a ratio to can be partitionedinto five congruent triangles as shown on Figure 4.12.

Figure 4.12. Right triangle partitioned into five congruent triangles

In Figure 4.12, line BD is drawn to form right angles with line and line is drawn to be par-allel to line . From points and lines are drawn to point which is the middle of line .

Figure 4.13 shows two parallel lines and intersected by a transversal line .

Figure 4.13. Two parallel lines intersected by a transversal

With reference to the lines shown on Figure 4.13:

1. When the transversal line crosses a line or line or both, two sets of opposite angles areformed. Then, using the symbol to denote an angle, and the symbol to indicate congru-ence, the following relations are true:

2 1

A

B C

BC=2 ABD

E

F

BE=AB

G

BG=DG

AC EFBD E F G BD

x y z

x

y

z

A BC D

E FG H

z x y

Page 139: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 4 Fundamentals of Geometry

4-10 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

(4.7)

2. Corresponding angles on the same side of the transversal are congruent. Thus, on the left sideof the transversal we have

(4.8)

and on the right side of the transversal we have(4.9)

3. The angles between the two parallel lines and are referred to as the interior (or inside)angles. Thus, in Figure 4.1 , , , and are interior angles. Then,

(4.10)

4. The angles above and below the two parallel lines and are referred to as the exterior (oroutside) angles. Thus, in Figure 4.1 , , , and are exterior angles. Then,

(4.11)

Similar triangles have corresponding angles that are congruent (equal) while the lengths of the cor-responding sides are in proportion. Thus, the triangles shown on Figure 4.14 are similar if

(4.12)

Figure 4.14. Similar triangles

If (4.11) holds, then

(4.13)

A D B CE H F G

A E C G

B F D H

x yC D E F

C F D E

x yA B G H

A G B H

A D and C E

A

B

CD

E

F

ACDE-------- BC

EF-------- AB

DF--------= =

Page 140: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 4-11Orchard Publications

Plane Geometry Figures

We should also remember that:

1. All congruent triangles are similar, but not all similar triangles are congruent.

2. If the angles in two triangles are equal and the corresponding sides are the same size, the trian-gles are congruent.

3. If the angles in two triangles are equal the triangles are similar.

4. If the angles in two triangles are not equal the triangles are neither similar nor congruent.

A plane figure with four sides and four angles is called quadrilateral. Figure 4.15 shows a generalquadrilateral.

Figure 4.15. General Quadrilateral

The lines joining two non-adjacent vertices of a quadrilateral are called diagonals. Thus, in Figure4.15, the lines and are the diagonals of that quadrilateral.

Property 5

In any quadrilateral, the sum of the four angles is

Property 6

The diagonals of a quadrilateral with consecutive sides , , , and are perpendicular if andonly if

(4.14)

The square, rectangle, parallelogram, rhombus, and trapezoid are special cases of quadrilaterals. Wewill discuss each separately.

Property 7

Two lines are said to be in parallel, when the distance between them is the same everywhere. In otherwords, two lines on the same plane that never intersect, are said to be parallel lines.*

* This statement is consistent with the principles of Euclidean geometry.

C

B

A

D

a

bc

d

AC BD

360

a b c d

a2 c2+ b2 d2+=

Page 141: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 4 Fundamentals of Geometry

4-12 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

A four-sided plane figure with opposite sides in parallel, is called parallelogram. Figure 4.16 showsa parallelogram.

Figure 4.16. Parallelogram

For the parallelogram of Figure 4.16,

(4.15)

(4.16)

Note: The perpendicular distance from the center of a regular polygon to any of its sides is calledapothem.

An equilateral parallelogram is called rhombus. It is a special case of a parallelogram where allsides are equal. Figure 4.17 shows a rhombus.

Figure 4.17. Rhombus

For the rhombus of Figure 4.17,

(4.17)

(4.18)

A four-sided plane figure with four right angles, is a rectangle. It is a special case of a parallelogramwhere all angles are equal, that is, each. Figure 4.18 shows a rectangle.

A B

CD

h

a

a

b b

A C=

B D=

A B+ C D+ 180= =

Area ah=

Area of Paralle ramlog

A B

CD

a

a

aac

d

c2 d2+ 4a2=

Area 12---cd=

Area of Rhombus

90

Page 142: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 4-13Orchard Publications

Plane Geometry Figures

Figure 4.18. RectangleFor the rectangle of Figure 4.18,

(4.19)

(4.20)

(4.21)

A plane figure with four equal sides and four equal angles, is a square. It is a special case of a rect-angle where all sides are equal. Figure 4.19 shows a square.

Figure 4.19. SquareFor the square of Figure 4.19,

(4.22)

(4.23)

(4.24)

A quadrilateral with two unequal parallel sides is a trapezoid. Figure 4.20 shows a trapezoid.

Figure 4.20. Trapezoid

A B

CD

a

a

b bc

A B C D 90= = = =

c a2 b2+=

Area ab=

Area of Rec gletan

A B

CD

a

a

a ac

A B C D 90= = = =

c a 2=

Area a2=

Area of Square

A B

CDh

a

c

d bm

Page 143: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 4 Fundamentals of Geometry

4-14 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

For the trapezoid of Figure 4.20,

(4.25)

(4.26)

A plane curve that is everywhere equidistant from a given fixed point, referred to as the center, iscalled a circle. Figure 4.21 shows a circle where point o is the center of the circle. The line segmentthat joins the center of a circle with any point on its circumference is called radius, and it isdenoted with the letter . A straight line segment passing through the center of a circle, and ter-minating at the circumference is called diameter, and is denoted with the letter . Obviously,

.

Figure 4.21. Circle

The perimeter of a circle is called circumference and it is denoted with the letter C.

Note 4.2

The Greek letter represents the ratio of the circumference of a circle to its diameter. This ratiois an irrational (endless) number, so the decimal places go on infinitely without repeating. It isapproximately equal to ; to five decimal places, is equal to . With computers, thisvalue has been figured to more than million decimal places.

For the circle of Figure 4.21,

(4.27)

(4.28)

Note 4.3

Locus is defined as the set of all points whose coordinates satisfy a single equation or one or morealgebraic conditions.

m 12--- a c+=

Area 12--- a c+ h mh= =

Area of Trapezoid

rd

d 2r=

o

r

dC

22 7 3.14159100

C 2 r d= =

Area r2 14--- d2= =

Area of Circle

Page 144: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 4-15Orchard Publications

Plane Geometry Figures

The locus of points for which the sum of the distances from each point to two fixed points isequal forms an ellipse*. The two fixed points are called foci (plural for focus). Figure 4.22 showsan ellipse.

Figure 4.22. Ellipse

For the ellipse of Figure 4.22, and are the foci and C is the circumference.

In an ellipse,

(4.29)

(4.30)

(4.31)

(4.32)

The line segments and , are referred to as the major and minor axes respectively. The fociare always on the major axis; they are located symmetrically from the center that is the inter-section of the major and minor axes. The foci locations can be determined with the aid of Figure4.14, where the distance , denoted as , is found from the Pythagorean theorem, that is,

(4.33)

* The ellipse, parabola and hyperbola are topics of analytic geometry and may be skipped. Here, we give a briefdescription of each because they find wide applications in science and technology. For instance, we hear phrasessuch as the“elliptic” orbit of a satellite or planet, a“parabolic” reflector antenna of a radar system, that cometsmove in “hyperbolic” orbits, etc.

x

y

(a,0)

(0,b)

0

P(x,y)

F1 F2

C

F1 F2

PF1 PF1+ 2a cons ttan= =

x2

a2----- y2

b2-----+ 1=

C 2 a2 b2+2

-----------------

Area ab=

2a 2b0

0F2 c

c a2 b2–=

Page 145: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 4 Fundamentals of Geometry

4-16 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

Figure 4.23. Computation of the foci locations

We observe that when the major and minor axes are equal, the ellipse becomes a circle.

Note 4.4

In Figure 4.23, the ratio is called the eccentricity of the ellipse; it indicates the degree ofdeparture from circularity. In other words, if we keep point fixed and we vary the line segment

over the range , we will obtain ellipses which will vary in shape. An ellipse becomes acircle when , and a straight line when .

A plane curve formed by the locus of points equidistant from a fixed line, and a fixed point not onthe line, is called parabola. Figure 4.24 shows a parabola. The fixed line is called directrix, and thefixed point focus. The lines and at any point on the parabola, are equal.

Figure 4.24. ParabolaFor the parabola of Figure 4.24,

(4.34)

The locus of points for which the difference of the distances from two given points, called foci, is aconstant, is called hyperbola. Figure 4.25 shows a hyperbola.

For the hyperbola of Figure 4.25,(4.35)

(4.36)

(4.37)

x

y

(a,0)

(0,b)

0F1 F2c

ab

e c a=

ac 0 c a

c 0= c a=

PF PQ

x

y

P(x,y)

F(0,a)Focus

y= a Q(x, a)Directrix

x2 4ay=

PF2 PF2– 2a=

e c a=

x2

a2----- y2

b2-----– 1=

Page 146: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 4-17Orchard Publications

Solid Geometry Figures

Figure 4.25. Hyperbola

In a hyperbola, the eccentricity , can never be less than .

Note 4.5

An asymptote is a line considered a limit to a curve in the sense that the perpendicular distancefrom a moving point on the curve to the line approaches zero as the point moves an infinite dis-tance from the origin. Two such asymptotes are shown in Figure 4.25.

4.3 Solid Geometry FiguresA solid with six faces, each a parallelogram, and each being parallel to the opposite face, is calledparallelepiped.

A solid with six faces, each a rectangle and each being parallel to the opposite face, is called rect-angular parallelepiped. Figure 4.26 shows a rectangular parallelepiped.

Figure 4.26. Rectangular Parallelepiped

For the rectangular parallelepiped of Figure 4.26, let , , and. Then,

(4.38)

x

y

F1 F2

P(x,y)

a / ea

Directrices

Asymptotes

bc

a

0

Circle of radius a e passesthrough foci F1 and F2

a e

e 1

A B

C

D

ab

cd

E

G

F

d diagonal= T total surface area=

V volume=

d a2 b2 c2+ +=

Page 147: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 4 Fundamentals of Geometry

4-18 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

(4.39)

(4.40)

A regular solid that has six congruent* square faces, is called a cube. Alternately, a cube is a specialcase of a rectangular parallelepiped where all faces are squares. Figure 4.27 shows a cube.

Figure 4.27. Cube

For the cube of Figure 4.27, if we let , , and ,then,

(4.41)

(4.42)

(4.43)

A solid figure, whose bases or ends have the same size and shape, are parallel to one another, andeach of whose sides is a parallelogram, is called prism. Figure 4.28 shows triangular, quadrilateraland pentagonal prisms.

Figure 4.28. Different shapes of prisms

Prisms can assume different shapes; therefore, no general formulas for the total surface and vol-ume are given here. The interested reader may find this information in mathematical tables.

* Two or more coplanar (on the same plane) figures, such as triangles, rectangles, etc., are said to be congruentwhen they coincide exactly when superimposed (placed one over the other).

T 2 ab bc ca+ +=

V abc=

A B

CD

a

dE

G F

a

aH

d diagonal= T total surface area= V volume=

d a 3=

T 6a2=

V a2=

Triangular Quadrilateral Pentagonal

Page 148: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 4-19Orchard Publications

Solid Geometry Figures

A solid figure with a polygonal base, and triangular faces that meet at a common point, is calledpyramid. Figure 4.29 shows a pyramid whose base is a square.

Figure 4.29. Pyramid with square base

For the pyramid of Figure 4.29, the volume is given by

(4.44)

The part of a pyramid between two parallel planes cutting the pyramid, especially the sectionbetween the base and a plane parallel to the base of a pyramid, is called frustum of a pyramid. Fig-ure 4.30 shows a frustum of a pyramid.

Figure 4.30. Frustrum of a pyramid.

For the frustum of a pyramid of Figure 4.30, the volume is

(4.45)

A surface generated by a straight line that moves along a closed curve while always passingthrough a fixed point, is called a cone. The straight line is called the generatrix, the fixed point iscalled the vertex, and the closed curve is called the directrix. If the generatrix is of infinite length,it generates two conical surfaces on opposite sides of the vertex. If the directrix of the cone is acircle, the cone is referred to as a circular cone. Figure 4.31 shows a right circular cone.

A

DC

B

E

aa

h

V

V 13--- Area of base height 1

3---a2h= =

A

DC

Ba

b

h

b

a

V

V 13---h a2 b2 ab+ +=

Page 149: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 4 Fundamentals of Geometry

4-20 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

Figure 4.31. Right circular cone

For the cone of Figure 4.31, the volume is

(4.46)

The part of a cone between two parallel planes cutting the cone, especially the section betweenthe base and a plane parallel to the base, is called frustum of a cone. Figure 4.32 shows a frustum ofa cone.

Figure 4.32. Frustum of right circular cone

For the frustum of the cone in Figure 4.32, the volume is

(4.47)

The surface generated by a straight line intersecting and moving along a closed plane curve, thedirectrix, while remaining parallel to a fixed straight line that is not on or parallel to the plane ofthe directrix, is called cylinder. Figure 4.33 shows a right circular cylinder.

Figure 4.33. Right circular cylinder

h

r

V

V 13--- r2h=

r1

r2

h

V

V 13--- h r1

2 r22 r1r2+ +=

h

r

Page 150: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 4-21Orchard Publications

Using Spreadsheets to Find Areas of Irregular Polygons

For the cylinder of Figure 4.33, the volume is

(4.48)

A three-dimensional surface, all points of which are equidistant from a fixed point is called sphere.Figure 4.34 shows a sphere.

Figure 4.34. Sphere

For the sphere of Figure 4.34, the volume is

(4.49)

4.4 Using Spreadsheets to Find Areas of Irregular PolygonsThe area of any polygon can be found from the relation

(4.50)

where and are the coordinates of the vertices (corners) of the polygon whose area is to befound. The formula of 4.50 dictates that we must go around the polygon in a counterclockwise direction.The computations can be made easy with a spreadsheet, such as Excel. The procecure is illus-trated with the following example.

Example 4.6

A land developer bought a parcel from a seller who did not know its area. Instead, the seller gavethe buyer the sketch of Figure 4.26. The distances are in miles. Compute the area of this parcel.

Solution:

We arbitrarily choose the origin as our starting point, and we go around the polygon in acounterclockwise direction as indicated in Figure 4.35.

V

V r2h=

r

V

V 43--- r3=

Area 12--- x0 y1 x1 y2 x2 y3 xn 1– yn xn y0+ + + + +

x1 y0 x2 y1 x3 y2 xn yn 1– x0 yn+ + + + +–

=

xi yi

0 0

Page 151: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 4 Fundamentals of Geometry

4-22 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

Figure 4.35. Figure for Example 4.6

The spreadsheet of Figure 4.36 below, computes the area of any polygon with up to 10 vertices.The formula in F3 is

=0.5*((B3*D4+B4*D5+B5*D6+B6*D7+B7*D8+B8*D9+B9*D10+B10*D11

+B11*D12+B12*D13+B13*D3)

-(B4*D3+B5*D4+B6*D5+B7*D6+B8*D7+B9*D8+B10*D9+B11*D10+B12*D11

+B13*D12+B3*D13))

and this represents the general formula of (4.50).

N

(0,0) x

y

(4,5)

(4,9)(10,9)

(6,15)

( 6,17)

( 11,7)

( 6, 3)

Page 152: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 4-23Orchard Publications

Using Spreadsheets to Find Areas of Irregular Polygons

Figure 4.36. Spreadsheet to compute areas of irregular polygons.

The answer is displayed in F2. Thus, the total area is square miles. To verify that the spread-sheet displays the correct result, we can divide the given polygon into triangles and rectangles, asshown in Figure 4.37, find the area of each using the formulas of (4.3) and (4.16), and add theseareas. The area of each triangle or rectangle, is computed and the values are entered in Table 4.1.

TABLE 4.1 Computation of the total area of Figure 4.27

Triangle/Rectangle Area

Triangle/Rectangle Area

1 (abc) 10 7 (lmp) 1

2 (efg) 12 8 (mnop) 6

3 (degh) 12 9 (bhko) 110

4 (gij) 12 10 (pqs) 16

5 (ijk) 1 11 (acqr) 30

6 (kln) 16 12 (ars) 9

Total Area (1 through 12) in square miles 235

1234567891011121314

A B C D E FArea Calculation for Example 4.6

Area = 235x0= 0 y0= 0x1= 4 y1= 5x2= 4 y2= 9x3= 10 y3= 9x4= 6 y4= 15x5= -6 y5= 17x6= -11 y6= 7x7= -6 y7= -3x8= y8=x9= y9=

x10= y10=

235

Page 153: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 4 Fundamentals of Geometry

4-24 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

Figure 4.37. Division of Figure 4.26 to rectangles and triangles

4.5 Summary• Geometry is the mathematics of the properties, measurement, and relationships of points, lines,

angles, surfaces, and solids.

• In analytic geometry straight lines, curves, and geometric figures are represented by algebraicexpressions.

• Descriptive geometry is the science of making accurate, two-dimensional drawings of three-dimensional geometrical forms.

• A fractal is a geometric pattern that is repeated at ever smaller scales to produce irregularshapes and surfaces that cannot be represented by classical geometry. Fractals are used espe-cially in computer modeling of irregular patterns and structures in nature.

• Euclidean Geometry is based on one of Euclid's postulates which states that through a pointoutside a line it is possible to draw only one line parallel to that line.

• In dealing with astronomical distances and relativity, non-Euclidean geometries give a moreprecise description of the observed facts than Euclidean geometry.

(0,0) x

y

(4,5)

(4,9) (10,9)

(6,15)

( 6,17)

( 11,7)

( 6, 3)

1

23

45

6

7 8

9

10 11

12

a

bc

de f

gh

j

i

k

lm n

opq

r

s

2 4 6 8 10 122

4

6

8

10

12

14

16

18

246

810122

4

Page 154: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 4-25Orchard Publications

Summary

• A triangle is a plane figure that is formed by connecting three points, not all in a straight line,by straight line segments.

• A polygon is defined as a closed plane figure bounded by three or more line segments.

• The perimeter of a polygon is defined as the closed curve that bounds the plane area of the poly-gon. It is the entire length of the polygon’s boundary.

• The area of a polygon is the space inside the boundary of the polygon, and it is expressed insquare units.

• A perpendicular line is one that intersects another line to form a angle.

• The line that joins a vertex of a triangle to the midpoint of the opposite side is called themedian.

• The sum of the three angles of any triangle is .

• A triangle containing an angle of is a right triangle.

• In a right triangle, the side opposite to the right angle is called the hypotenuse of the right trian-gle.

• If is the hypotenuse of a right triangle, the Pythagorean Theorem states that

• If is the hypotenuse of a right triangle, the area of this triangle is found from the relation

• A triangle that has two equal sides is called isosceles triangle.

• A triangle with all sides equal is called equilateral triangle.

• Congruent triangles are identical in shape and size. If two triangles are congruent, the followingstatements are true:

When two triangles are congruent, the six corresponding pairs of angles and sides are alsocongruent.

If all three pairs of corresponding sides in two triangles are the same, the triangles are con-gruent.

If two angles and the included side of one triangle are congruent to two angles and theincluded side of another triangle, the triangles are congruent.

IV If two sides and the included angle of one triangle are congruent to two sides and theincluded angle of another triangle, the triangles are congruent.

90

180

90

c

c2 a2 b2+=

c

Area 12--- a b=

Page 155: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 4 Fundamentals of Geometry

4-26 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

V If two angles and a non-included side of one triangle are congruent to the two angles andthe corresponding non-included angle of another triangle, the triangles are congruent.

VI If the hypotenuse and the leg of one right triangle are congruent to the corresponding partsof another triangle, the two triangles are congruent.

VII Two triangles with two sides and a non-included angle may or may not be congruent.

VII Every triangle can be partitioned into four congruent triangles by connecting the middlepoints of its three sides.

X A triangle that can be partitioned into congruent parts, it can also partitioned into

congruent parts.

X Any isosceles triangle can be partitioned into two congruent triangles by one of its heights.

XI Any equilateral triangle can be partitioned into three congruent triangles by segmentsconnecting its center to its vertices.

XII A right triangle whose sides forming the right angle have a ratio to can be parti-tioned into five congruent triangles.

• A transversal is a line that intersects two parallel lines.• Similar triangles have corresponding angles that are congruent (equal) while the lengths of the

corresponding sides are in proportion.

• All congruent triangles are similar, but not all similar triangles are congruent.

• If the angles in two triangles are equal and the corresponding sides are the same size, the trian-gles are congruent.

• If the angles in two triangles are equal the triangles are similar.

• If the angles in two triangles are not equal the triangles are neither similar nor congruent.

• A plane figure with four sides and four angles is called quadrilateral.

• The lines joining two non-adjacent vertices of a quadrilateral are called diagonals.

• In any quadrilateral, the sum of the four angles is

• The diagonals of a quadrilateral with consecutive sides , , , and are perpendicular if andonly if

• Two lines are said to be in parallel, when the distance between them is the same everywhere.In other words, two lines on the same plane that never intersect, are said to be parallel lines.

• A four-sided plane figure with opposite sides in parallel, is called parallelogram.

n

4 n 42 n 43 n

2 1

360

a b c d

a2 c2+ b2 d2+=

Page 156: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 4-27Orchard Publications

Summary

• The perpendicular distance from the center of a regular polygon to any of its sides is calledapothem.

• An equilateral parallelogram is called rhombus. It is a special case of a parallelogram where allsides are equal.

• A four-sided plane figure with four right angles, is a rectangle. It is a special case of a parallelo-gram where all angles are equal, that is, each.

• A plane figure with four equal sides and four equal angles, is a square. It is a special case of arectangle where all sides are equal.

• A quadrilateral with two unequal parallel sides is a trapezoid.

• A plane curve that is everywhere equidistant from a given fixed point, referred to as the center,is called a circle.

• The line segment that joins the center of a circle with any point on its circumference is calledradius.

• A straight line segment passing through the center of a circle, and terminating at the circum-ference is called diameter.

• The perimeter of a circle is called circumference.

• In any circle, the ratio of the circumference of a circle to its diameter, denoted as , is an end-less number. To five decimal places is equal to

• Locus is defined as the set of all points whose coordinates satisfy a single equation or one ormore algebraic conditions.

• The locus of points for which the sum of the distances from each point to two fixed points isequal forms an ellipse. The two fixed points are called foci (plural for focus). The long andshort line segments are referred to as the major and minor axes respectively. The foci are alwayson the major axis; they are located symmetrically from the center that is the intersection ofthe major and minor axes.

• The eccentricity of the ellipse indicates the degree of departure from circularity.

• A plane curve formed by the locus of points equidistant from a fixed line, and a fixed point noton the line, is called parabola. The fixed line is called directrix, and the fixed point focus.

• The locus of points for which the difference of the distances from two given points, called foci,is a constant, is called hyperbola. In a hyperbola, the eccentricity , can never be less than .

• An asymptote is a line considered a limit to a curve in the sense that the perpendicular distancefrom a moving point on the curve to the line approaches zero as the point moves an infinitedistance from the origin.

90

3.14159

0

e 1

Page 157: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 4 Fundamentals of Geometry

4-28 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

• A solid with six faces, each a parallelogram, and each being parallel to the opposite face, iscalled parallelepiped.

• A solid with six faces, each a rectangle and each being parallel to the opposite face, is calledrectangular parallelepiped.

• A regular solid that has six congruent square faces, is called a cube. Alternately, a cube is a spe-cial case of a rectangular parallelepiped where all faces are squares.

• A solid figure, whose bases or ends have the same size and shape, are parallel to one another,and each of whose sides is a parallelogram, is called prism.

• A solid figure with a polygonal base, and triangular faces that meet at a common point, iscalled pyramid.

• The part of a pyramid between two parallel planes cutting the pyramid, especially the sectionbetween the base and a plane parallel to the base of a pyramid, is called frustum of a pyramid.

• A surface generated by a straight line that moves along a closed curve while always passingthrough a fixed point, is called a cone. The straight line is called the generatrix, the fixed point iscalled the vertex, and the closed curve is called the directrix. If the generatrix is of infinitelength, it generates two conical surfaces on opposite sides of the vertex. If the directrix of thecone is a circle, the cone is referred to as a circular cone.

• The part of a cone between two parallel planes cutting the cone, especially the section betweenthe base and a plane parallel to the base, is called frustum of a cone.

• The surface generated by a straight line intersecting and moving along a closed plane curve,the directrix, while remaining parallel to a fixed straight line that is not on or parallel to theplane of the directrix, is called cylinder.

• A three-dimensional surface, all points of which are equidistant from a fixed point is calledsphere.

• The area of any polygon can be found from the relation

where and are the coordinates of the vertices (corners) of the polygon whose area is to befound. This relation dictates that we must go around the polygon in a counterclockwise direc-tion. The computations can be made easy with a spreadsheet, such as Excel.

Area 12--- x0 y1 x1 y2 x2 y3 xn 1– yn xn y0+ + + + +

x1 y0 x2 y1 x3 y2 xn yn 1– x0 yn+ + + + +–

=

xi yi

Page 158: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 4-29Orchard Publications

Exercises

4.6 Exercises

1. Compute the area of the general triangle shown in Figure in terms of the side and height .

2. For the equilateral triangle below, prove that:

a.

b.

where is any of the three equal sides.

3. Compute the area of the irregular polygon shown in Figure 4.38 with the relation (4.51)

c h

A B

C

ab

c

h

A B C 60= = =

Area 34

-------a2=

a

A B

C

ab

c

Page 159: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 4 Fundamentals of Geometry

4-30 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

Figure 4.38. Figure for Exercise 3

4. For the triangle shown on Figure 4.39, , , and . Prove thatthe triangles ADB and CDF are congruent.

Figure 4.39. Figure for Exercise 4

5. Prove the Phythagorean theorem.

(0,0) x

y

(6,4)

(10,10)

(12,21)

(-2,17)

( 3,20)

( 13,12)

( 11, 2)

BD DC= CDB 90= DF AD=

A

B C

D

E F

Page 160: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 4-31Orchard Publications

Solutions to Exercises

4.7 Solutions to Exercises1.

2.a. For any triangle , and since the sides , , and are equal, it fol-

lows that the angles opposite to the sides are also equal. Therefore,

b.

(1)

and by substitution into (1)

A B

C

ab

cd c-d

h

Area 12--- d h 1

2--- c d– h+

12--- d h 1

2--- c h 1

2--- d h–+

12--- c h= = =

A B C+ + 180= a b c

A B C 60= = =

A B

C

a

a / 2

a

a / 2

h

Area 12--- a

2--- h 1

2--- a

2--- h+

a2--- h= =

h2 a2 a2---

2– a2 a2

4-----–

34--- a2= = =

h 34--- a 3

2------- a= =

Area 34

-------a2=

Page 161: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 4 Fundamentals of Geometry

4-32 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

3.

Solution:

We arbitrarily choose the origin as our starting point, and we go around the polygon in acounterclockwise direction as in Example 4.6.

The formula in F2 is

=0.5*((B3*D4+B4*D5+B5*D6+B6*D7+B7*D8+B8*D9+B9*D10+B10*D11

+B11*D12+B12*D13+B13*D3)

(B4*D3+B5*D4+B6*D5+B7*D6+B8*D7+B9*D8+B10*D9+B11*D10+B12*D11

+B13*D12+B3*D13))

and this represents the general formula for the area above.

The answer is displayed in F2. Thus, the total area is 374.5 square units.

(0,0) x

y

(6,4)

(10,10)

(12,21)

(-2,17)

( 3,20)

( 13,12)

( 11, 2)

Area 12--- x0 y1 x1 y2 x2 y3 xn 1– yn xn y0+ + + + +

x1 y0 x2 y1 x3 y2 xn yn 1– x0 yn+ + + + +–

=

0 0

Page 162: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 4-33Orchard Publications

Solutions to Exercises

4. Since , , and . by the Phythagorean theorem the hypote-nuses AB and CF of triangles ADB and DFC are equal also. Therefore, these triangles are con-gruent.

5. Consider the right triangle shown below where , is the hypotenuse, and isperpendicular to .

BD DC= CDB 90= DF AD=

A

B C

D

E F

A 90= BC ADBC

A

B CD

c

ba d

e f

Page 163: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 4 Fundamentals of Geometry

4-34 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

We observe that triangles and are similar since both are right triangles and iscommon in both triangles. Likewise, triangles and are similar. Since triangles and are similar, it follows that

(1)

Also since triangles and are similar, it follows that

(2)

Addition of (1) with (2) yields

or

and since

we obtain the Phythagorean theorem relation

ABD ABC BADC ABC ABD

ABC

ca--- a

e--- or ce a2= =

ADC ABC

cb--- b

f--- or cf b2= =

ce cf+ a2 b2+=

c e f+ a2 b2+=

e f+ c=

c2 a2 b2+=

Page 164: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 5-1Orchard Publications

Chapter 5

Fundamentals of Plane Trigonometry

his chapter discusses the basics of trigonometry. It is intended for readers who need toknow the basics of plane trigonometry*. Readers with a strong mathematical backgroundmay skip this chapter. Others will find it useful, as well as a convenient source for review.

5.1 IntroductionTrigonometry is the branch of mathematics that is concerned with the relationships between thesides and the angles of triangles. We will now define angle and radian formally.

An angle is an angular unit of measure with vertex (the point at which the sides of an angle inter-sect) at the center of a circle, and with sides that subtend (cut off) part of the circumference. Ifthe subtended arc is equal to one-fourth of the total circumference, the angular unit is a rightangle. If the arc equals half the circumference, the unit is a straight angle (an angle of ). If thearc equals of the circumference, the angular unit is one degree. An angle between andless than is called an acute angle, while an angle between and less than is called anobtuse angle.

Each degree is subdivided into equal parts called minutes, and each minute is subdivided into60 equal parts called seconds. The symbol for degree is °; for minutes, and for seconds, . In trig-onometry, it is customary to denote angles with the Greek letters (theta) or (phi).

Another unit of angular measure is the radian; it is illustrated with the circle of Figure 5.1.

Figure 5.1. Definition of the radian

* Another branch of trigonometry, is the so-called spherical trigonometry which deals with triangles that are sections of thesurface of a sphere. Spherical trigonometry is used extensively in navigation and space technology. It will not be discussed inthis text.

T

1801 360 0

90 90 180

60

r

r

radians

1 radian = 57.3... deg

Page 165: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 5 Fundamentals of Plane Trigonometry

5-2 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

As shown in Figure 5.1, the radian is a circular angle subtended by an arc equal in length to theradius of the circle whose radius is units in length. The circumference of a circle is units;therefore, there are or radians in . Also, radians corresponds to

.

5.2 Trigonometric FunctionsThe trigonometric functions vary with the size of an angle. The six commonly used trigonometricfunctions can be defined in terms of one of the two acute angles in a right triangle. In addition tothe hypotenuse, a right triangle has two sides, one adjacent to one of the acute angles, the otheropposite as shown in Figure 5.2. The sine, cosine, tangent, cotangent, secant, and cosecant func-tions are defined in (5.1) through (5.6).

For any angle, the numerical values of the trigonometric functions can be approximated by draw-ing the angle, measuring, and then calculating the ratios. Actually, most numerical values arefound by using formulas, called trigonometric identities. If the numerical values of various angles areshown on a graph, such as the sinusoidal graph in Chapter 1, it is clear that the functions are peri-odic.* A particular angle produces a value equal to the values of many other angles. A single angleis chosen as the basic, or principal, angle for that value.

5.3 Trigonometric Functions of an Acute AngleFor the right triangle of Figure 5.2, the trigonometric functions are defined as

:

Figure 5.2. Right triangle for defining the trigonometric functions

(5.1)

(5.2)

* A periodic function is repeated at regular intervals. The least interval in the range of the independent variable of a periodicfunction of a real variable in which all possible values of the dependent variable are assumed, is called the period.

r 2 r2 6.283 360 3.14159=

180

A

B

C

ca

b

Sine of Angle A Asin ac---= =

Cosine of Angle A Acos bc---= =

Page 166: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 5-3Orchard Publications

Trigonometric Functions of an Any Angle

(5.3)

(5.4)

(5.5)

(5.6)

From (5.2) and (5.5) we observe that

(5.7)

Also, from (5.1) and (5.6)

(5.8)

and from (5.3) and (5.4)

(5.9)

Finally, from (5.1), (5.2) and (5.3)

(5.10)

5.4 Trigonometric Functions of an Any AngleLet us consider the rectangular Cartesian coordinate system of Figure 5.3, where the axes and divide the plane into four quadrants. A quadrant is defined as any of the four areas into which aplane is divided by the reference set of axes in a Cartesian coordinate system, designated first,second, third, and fourth, counting counterclockwise from the area in which both coordinates arepositive.

Figure 5.4 shows how an angle is generated in the first quadrant. The angle is formed by the ray (not shown) which is assumed to be in its initial position, that is, along the positive side of

the . It is rotated counterclockwise about its origin onto ray , and forms a positiveangle* . This angle is greater than zero but less than .

* A negative angle is generated when the ray is rotated clockwise.

Tangent of Angle A Atan ab---= =

Cotangent of Angle A Acot ba---= =

Secant of Angle A Asec cb---= =

Cosecant of Angle A Acsc ca---= =

Asec 1Acos

------------=

Acsc 1Asin

-----------=

Acot 1Atan

------------=

Atan AsinAcos

------------=

x y

OP0

x axis– 0 OP

1 90

Page 167: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 5 Fundamentals of Plane Trigonometry

5-4 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

Figure 5.3. Quadrants in Cartesian Coordinates

Figure 5.4. Definition of trigonometric functions of angles in first quadrant

Denoting the distance as * we have:

(5.11)

(5.12)

(5.13)

(5.14)

* Here, we are only concerned with the magnitude, i.e., absolute value of r. However, the line segments x and y must bedefined as positive or negative. Thus, in (5.11) through (5.16), the values of x and y are both positive since x lies to theright of the reference point 0 and y lies above it.

1

y

x

r2

0 P0 (x0,0)

P1 (x1,y1)

P2 (x2,y2)

P3 (x3,y3)

P4 (x4,y4)

r0

r1

r3r4

2 34

Quadrant IQuadrant II

Quadrant III Quadrant IV

Y

Xx

yr

P(x,y)

0

1

OP r

1sin yr--=

1cos xr--=

1tan yx--=

1cot xy--=

Page 168: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 5-5Orchard Publications

Trigonometric Functions of an Any Angle

(5.15)

(5.16)

Now, let us consider the rectangular Cartesian coordinate system of Figure 5.5 where the ray lies in the second quadrant, and the angle is greater than but less than . Here, isnegative whereas is positive.

Figure 5.5. Definition of trigonometric functions of angles in second quadrant.

Using the trigonometric reduction formulas (5.55) through (5.62), page 5-10, we get

(5.17)

(5.18)

(5.19)

(5.20)

(5.21)

(5.22)

and we observe that the cosine, tangent, cotangent and secant functions are negative in the sec-ond quadrant.

1sec rx--=

1csc ry--=

r

2 90 180 x

y

2

Y

Xx

yr

P(x,y)

0

2

180 2– 2sin yr--==sin

180 2– 2cos–=cos x–r

-----=

180 2– 2tan–=tan yx–

-----=

180 2– 1180 2–tan

------------------------------------ 12tan–

-----------------==cot 2cot– x–y

-----= =

180 2–sec 1180 2–cos

------------------------------------- 12cos–

----------------- 2sec–= = = rx–

-----=

180 2–csc 1180 2–sin

------------------------------------ 12sin

------------- 2csc= = = ry--=

Page 169: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 5 Fundamentals of Plane Trigonometry

5-6 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

We could follow the same procedure to define the trigonometric functions in the third and fourthquadrants. Instead, we summarize their signs in Table 5.1.

From Figures 5.4 and 5.5, we observe that the ray is the hypotenuse of the right triangles formedby it and the line segments and . Therefore, and can never be greater in length than .Accordingly, the sine and the cosine functions can never be greater than , that is, they can onlyvary from to inclusive. Table 5.2 shows the limits, that is, lowest and highest values whichthe trigonometric functions can achieve.

5.5 Fundamental Relations and Identities The formulas of (5.27) through (5.54), pages 7 through 9 show the sines and cosines of commonangles. From these, we can derive the angles of the other trigonometric functions using the rela-tions

(5.23)

(5.24)

(5.25)

(5.26)

TABLE 5.1 Signs of the trigonometric functions in different quadrants.

Quadrant Sine Cosine Tangent Cotangent Secant Cosecant

I + + + + + +

II + +

III + +

IV + +

TABLE 5.2 Limits of the trigonometric functions

Quadrant Sine Cosine Tangent Cotangent Secant Cosecant

I 0 to +1 +1 to 0 0 to + + to 0 +1 to + + to +1

II +1 to 0 0 to 1 to 0 0 to to 1 +1 to +

III 0 to 1 1 to 0 0 to + + to 0 1 to to 1

IV 1 to 0 0 to +1 to 0 0 to + to +1 1 to

rx y x y r

10 1

tan sincos------------=

cot cossin------------ 1

tan-----------= =

sec 1cos------------=

csc 1sin-----------=

Page 170: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 5-7Orchard Publications

Fundamental Relations and Identities

The formulas below give the values of special angles in both degrees and radians.

(5.27)

(5.28)

(5.29)

(5.30)

(5.31)

(5.32)

(5.33)

(5.34)

(5.35)

(5.36)

(5.37)

(5.38)

(5.39)

(5.40)

(5.41)

(5.42)

0cos 360cos 2cos 1= = =

30cos6---cos 3

2------- 0.866= = =

45cos4---cos 2

2------- 0.707= = =

60cos3---cos 1

2--- 0.5= = =

90cos2---cos 0= =

120cos 23

------cos 1–2

------ 0.5–= = =

150cos 56

------cos 3–2

---------- 0.866–= = =

180cos cos 1–= =

210cos 76

------cos 3–2

---------- 0.866–= = =

225cos 54

------cos 2–2

---------- 0.707–= = =

240cos 43

------cos 1–2

------ 0.5–= = =

270cos 32

------cos 0= =

300cos 53

------cos 0.5= =

330cos 116

---------cos 0.866= =

0sin 360sin 2sin 0= = =

30sin6---sin 1

2--- 0.5= = =

Page 171: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 5 Fundamentals of Plane Trigonometry

5-8 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

(5.43)

(5.44)

(5.45)

(5.46)

(5.47)

(5.48)

(5.49)

(5.50)

(5.51)

(5.52)

(5.53)

(5.54)

Relations (5.55) through (5.62) are known as trigonometric reduction formulas.

(5.55)

(5.56)

(5.57)

(5.58)

(5.59)

45sin4---sin 2

2------- 0.707= = =

60sin3---sin 3

2------- 0.866= = =

90sin2---sin 1= =

120sin 23

------sin 32

------- 0.866= = =

150sin 56

------sin 12--- 0.5= = =

180sin sin 0= =

210sin 76

------sin 1–2

------ 0.5–= = =

225sin 54

------sin 2–2

---------- 0.707–= = =

240sin 43

------sin 3–2

---------- 0.866–= = =

270sin 32

------sin 1–= =

300sin 53

------sin 3–2

---------- 0.866–= = =

330sin 116

---------sin 1–2

------ 0.5–= = =

–cos cos=

90 +cos sin–=

180 –cos cos–=

–sin sin–=

90 +sin cos=

Page 172: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 5-9Orchard Publications

Fundamental Relations and Identities

(5.60)

(5.61)

(5.62)

Relations (5.63) through (5.68) are known as angle-sum, angle-difference relations.

(5.63)

(5.64)

(5.65)

(5.66)

(5.67)

(5.68)

The trigonometric functions are also available in Excel. We will use them with the examples thatfollow.

Example 5.1

If and , compute:

a. b. c.

Solution:

a. From (5.29), and from (5.30) . Also, from (5.43)

, and from (5.44) . Then, with these relations and (5.63), weget

Check with Excel:

180 –sin sin=

90 +tan cot–=

180 –tan tan–=

+cos coscos sin sin–=

–cos coscos sin sin+=

+sin sin cos cos sin+=

–sin sin cos cos– sin=

+tan tan+tan1 tantan–--------------------------------=

–tan tan–tan1 tantan+---------------------------------=

60= 45=

105cos 15sin 105tan

45cos 2 2= 60cos 1 2=

45sin 2 2= 60sin 3 2=

+cos coscos sin sin–=

60 45+cos 60cos 45cos 60sin 45sin–=

105cos 12--- 2

2------- 3

2------- 2

2-------– 2

4------- 6

4-------–

14--- 2 6–= = =

14--- 1.4142 2.4495–

14--- 1.0353– 0.2588–= ==

Page 173: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 5 Fundamentals of Plane Trigonometry

5-10 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

Excel requires that the angle be expressed in radians; therefore, we convert to radiansusing the relation

(5.69)

For this example, . Then, in any cell of the spreadsheet we type

the formula

=COS(1.8326) and Excel displays . This is the same answer we found using the relationof (5.63).

b. From (5.29) and from (5.30) . Also, from (5.43)

, and from (5.44) . Then, with these relations and (5.66) weget

Check with Excel:

For this example, . Then, in any cell of the spreadsheet we type the

formula

=SIN(0.2618) and Excel displays . This is the same answer we found with the trigono-metric relation of (5.66).

We observe that the answer in part (b) is the same is in part (a), except that it is of oppositesign. This is not just a coincidence; it can be verified with (5.56) which can be expressed also as

. Then,

.

c. We use (5.23), that is,

Then,

105

rad deg 180-----------=

105 180----------- 1.8326 radians=

0.2588–

45cos 2 2= 60cos 1 2=

45sin 2 2= 60sin 3 2=

–sin sin cos cos– sin=

60 45–sin 60sin 45cos 60cos 45sin–=

15sin 32

------- 22

------- 12--- 2

2-------– 6

4------- 2

4-------–

14--- 6 2–= = =

14--- 2.4495 1.4142–

14--- 1.0353 0.2588= ==

15 180----------- 0.2618 rad.=

0.2588

sin 90 +cos–=

15sin 90 15+cos– 105cos–= =

tan sincos------------=

105tan 105sin105cos

--------------------=

Page 174: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 5-11Orchard Publications

Fundamental Relations and Identities

To find the value of , we use (5.65). Thus,

We already know the value of from part (a). Therefore,

(5.70)

Let us check this answer with Excel. As before, we first need to convert to radians. This

conversion yields Then, in any cell of the spreadsheet we type the

formula

=TAN(1.8326) and Excel displays . This is the same answer we found in (5.70).

Relations (5.71) through (5.76) are known as fundamental trigonometric identities.

(5.71)

(5.72)

(5.73)

(5.74)

(5.75)

(5.76)

Relations (5.77) through (5.80) are known as function-product relations.

(5.77)

(5.78)

105sin

+sin sin cos cos sin+=

60 45+sin 60sin 45cos 60cos 45sin+=

105sin 32

------- 22

------- 12--- 2

2-------+

14--- 6 2+= =

14--- 2.4495 1.4142+

14--- 3.8637 0.9659= ==

105cos

105tan 105sin105cos

-------------------- 0.96590.– 2588

-------------------- 3.7322–= = =

105

105 180----------- 1.8326 rad.=

3.732–

2cos 2sin+ 1=

2cos 2cos 2sin–=

2sin 2 cossin=

2tan 2 tan

1 2tan–-----------------------=

2cos 12--- 1 2cos+=

2sin 12--- 1 2cos–=

coscos 12--- +

12--- –cos+cos=

sincos 12--- + 1

2---– –sinsin=

Page 175: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 5 Fundamentals of Plane Trigonometry

5-12 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

(5.79)

(5.80)

5.6 Triangle FormulasLet Figure 5.6 be any triangle.

Figure 5.6. Triangle for definition of the laws of sines, cosines, and tangents.

Then,

By the law of sines:

(5.81)

By the law of cosines:

(5.82)

(5.83)

(5.84)

By the law of tangents:

(5.85)

Example 5.2

For the triangle of Figure 5.7, find the length of side a using:

a. the law of sines

b. the law of cosines

sin cos 12--- +

12--- –sin+sin=

sin sin 12--- –cos 1

2---– +cos=

a

b

c

asin----------- b

sin----------- c

sin----------= =

a2 b2 c2 2bccos–+=

b2 a2 c2 2accos–+=

c2 a2 b2 2abcos–+=

a b–a b+------------

12--- –tan

12--- +tan

-----------------------------= b c–b c+-----------

12--- –tan

12--- +tan

----------------------------= c a–c a+-----------

12--- –tan

12--- +tan

----------------------------=

Page 176: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 5-13Orchard Publications

Triangle Formulas

Figure 5.7. Triangle for Example 5.2Solution:

a. By the law of sines,

or

From (5.43), .

The sine of is not among those listed in the formulas given in (5.27) through (5.54); wewill find it with Excel. Thus, with =SIN(25*PI()/180), we get . Then,

or

b. By the law of cosines,

or

Therefore,

The small difference between the answers in (a) and (b) is due to the rounding of numbers.

There are many other trigonometric relations that are not given in this text. These can be foundin trigonometry textbooks.

b 3 cm c 7cm= =

45 25= =a

b

c

asin----------- b

sin-----------=

a45sin

---------------- 325sin

----------------=

45sin 0.707=

2525sin 0.422=

a0.707------------- 3

0.422-------------=

a 30.422------------- 0.707 5.26 cm= =

a2 b2 c2 2bccos–+=

a2 32 72 2 3 7 45cos–+ 58 42 0.707– 28.306= = =

a 5.32=

Page 177: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 5 Fundamentals of Plane Trigonometry

5-14 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

5.7 Inverse Trigonometric Functions

The notation or is used to denote an angle whose cosine is . Thus, if ,

then . Similarly, if , then , and if , then .These are called Inverse Trigonometric Functions.

Example 5.3

Find the angle if .

Solution:

Here, we want to find the angle given that its cosine is . From (5.30), . There-fore, .

5.8 Area of Polygons in Terms of Trigonometric FunctionsWe can use the trigonometric functions to compute areas of triangles, quadrilaterals, and othergeometric figures. We present just a few.

Figure 5.8. General triangle

The area of the general triangle of Figure 5.8 can be found with the formula

(5.86)

Similarly, the formulas for finding the areas of other polygons such as those of Figures 5.9 and5.10, in terms of trigonometric functions, are given below. Many others can be found in mathe-matical tables reference books.

The area of the general quadrilateral of Figure 5.9 can be found with the formula

(5.87)

y1–cos arc ycos y y xcos=

x y1–cos= w vsin= v w1–sin= z utan= u z1–tan=

0.51–=cos

0.5 60cos 0.5=

60=

A B

C

ab

c

Area 12---ab Csin c2 A Bsinsin

2 Csin-----------------------------= =

Area 12---ef sin 1

4--- b2 d 2 a2

– c2–+ tan= =

Page 178: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 5-15Orchard Publications

Area of Polygons in Terms of Trigonometric Functions

Figure 5.9. General quadrilateral

The area of the parallelogram of Figure 5.10 can be found with the formula

(5.88)

Figure 5.10. Parallelogram

Besides using Excel to find the values of trigonometric functions, one can also use MATLAB.Some of the MATLAB trigonometric functions are listed in Table 5.3.

TABLE 5.3 Common MATLAB Trigonometric Functions

acos(x) Inverse cosine

angle(x) Four quadrant angle

asin(x) Inverse sine

atan(x) Inverse tangent

cos(x) Cosine

sin(x) Sine

tan(x) Tangent

C

B

A

D

a

bc

d

f

e

Area ab Asin ab Bsin= =

A B

CD

h

a

a

b b

Page 179: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 5 Fundamentals of Plane Trigonometry

5-16 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

5.9 Summary• Trigonometry is the branch of mathematics that is concerned with the relationships between

the sides and the angles of triangles.

• An angle is an angular unit of measure with vertex (the point at which the sides of an angleintersect) at the center of a circle, and with sides that subtend (cut off) part of the circumfer-ence.

• If the subtended arc is equal to of the circumference, the angular unit is one degree.Each degree is subdivided into equal parts called minutes, and each minute is subdividedinto 60 equal parts called seconds.

• If the subtended arc is equal to one-fourth of the total circumference, the angular unit is a rightangle. If the arc equals half the circumference, the unit is a straight angle (an angle of ).

• An angle between and less than is called an acute angle, while an angle between and less than is called an obtuse angle.

• The radian is a circular angle subtended by an arc equal in length to the radius of the circlewhose radius is units in length.

• The circumference of a circle is units; therefore, there are or radians in .Also, radians corresponds to .

• The trigonometric functions vary with the size of an angle. They are defined in terms of one ofthe two acute angles in a right triangle. The six commonly used trigonometric functions are thesine, cosine, tangent, cotangent, secant, and cosecant.

• The numerical values of the trigonometric functions can be found by using formulas, calledtrigonometric identities.

• A quadrant is defined as any of the four areas into which a plane is divided by the reference setof axes in a Cartesian coordinate system, designated first, second, third, and fourth, countingcounterclockwise from the area in which both coordinates are positive.

• We can use trigonometric reduction formulas to determine which trigonometric function arepositive or negative in each of the four quadrants.

• The sine and the cosine functions can only vary from to inclusive.

• We can find the numerical values of trigonometric functions from trigonometric reduction for-mulas, angle-sum, angle-difference relations, fundamental trigonometric identities, and func-tion-product relations.

• We can find the lengths of the sides and angles of any triangle by the use of the law of sines, lawof cosines, and law of tangents.

1 36060

180

0 90 90180

r

2 r 2 6.283 3603.14159= 180

0 1

Page 180: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 5-17Orchard Publications

Summary

• The Inverse Trigonometric Functions allow us to find angles when the trigonometric functionsare known.

• We can use the trigonometric functions to compute areas of triangles, quadrilaterals, and othergeometric figures.

• We can verify the results of our computations with the Excel and/or MATLAB trigonometricfunctions.

Page 181: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 5 Fundamentals of Plane Trigonometry

5-18 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

5.10 Exercises1. If and , compute:

a. b. c.

Verify your answers with Excel.

2. Find the angle if . Verify your answer with the Excel ATAN function.

3. For the triangle below, find the length of side using:

a. the law of sines

b. the law of cosines

45= 30=

15cos 75sin 75tan

11–tan =

a

b 4.2 cm c 2.7 cm= =

A 130 C 20= =

B

AC

a

b

c

Page 182: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 5-19Orchard Publications

Solutions to Exercises

5.11 Solutions to Exercises1.

a. From (5.28), and from (5.29) . Also, from (5.42)

and from (5.43) . With these relations and (5.64) we get

Check with Excel: =COS(15*PI()/180) returns 0.9659

b. From (5.28), and from (5.29) . Also, from (5.42)

and from (5.43) . With these relations and (5.65) we get

Check with Excel: =SIN(75*PI()/180) returns 0.9659. This is the same value as in part (a)and it is consistent with relation (5.59), i.e., which can be written as

. Thus, with ,

c. We use (5.23), that is,

Then,

We know the value of from part (b). To find the value of we make use of

, , , and . With these rela-tions and (5.63) we get

30cos 3 2= 45cos 2 2=

30sin 1 2= 45sin 2 2=

–cos coscos sin sin+=

45 30–cos 45cos 30cos 45sin 30sin+=

15cos 22

------- 32

------- 22

------- 12---+ 6

4------- 2

4-------+

14--- 6 2+= = =

14--- 2.4495 1.4142+

14--- 3.8637 0.9659= ==

30cos 3 2= 45cos 2 2=

30sin 1 2= 45sin 2 2=

+sin sin cos cos sin+=

45 30+sin 45sin 30cos 45cos 30sin+=

15cos 22

------- 32

------- 22

------- 12---+ 6

4------- 2

4-------+

14--- 6 2+= = =

14--- 2.4495 1.4142+

14--- 3.8637 0.9659= ==

90 +sin cos=

90 –sin –cos cos= = 15= 90 15–sin 75sin 15cos= =

tan sincos------------=

75tan 75sin75cos

-----------------=

75sin 75cos

30cos 3 2= 45cos 2 2= 30sin 1 2= 45sin 2 2=

Page 183: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 5 Fundamentals of Plane Trigonometry

5-20 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

and

Check with Excel: =TAN(75*PI()/180) returns 3.7321

2. We are seeking the value of the angle such that . Since ,the ratio will be equal to when and have the same value. This occurs

when since . Therefore, implies that .

Check with Excel: =ATAN(1)*180/PI() returns 45

3.

a.

or

We will find and with Excel. Thus, with =SIN(130*PI()/180) we get, and with =SIN(20*PI()/180) we get . Then,

or

+cos coscos sin sin–=

45 30+cos 45cos 30cos 45sin– 30sin=

75cos 22

------- 32

------- 22

-------–12--- 6

4------- 2

4-------+

14--- 6 2–= = =

14--- 2.4495 1.4142–

14--- 1.0353 0.2588= ==

75tan 75sin75cos

----------------- 0.96590.2588---------------- 3.7322= = =

tan 1= tan sin cos=

sin cos 1 sin cos

45= 45sin 45sin 2 2= = 11–tan = 45=

b 4.2 cm. c 2.7 cm= =

A 130 C 20= =

B

AC

a

b

c

aAsin

----------- cCsin

-----------=

a130sin

------------------- 2.720sin

----------------=

130sin 20sin130sin 0.766= 20sin 0.342=

a0.766------------- 2.7

0.342-------------=

Page 184: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 5-21Orchard Publications

Solutions to Exercises

b.

and with Excel =COS(130*PI()/180) we find that

Therefore,

a 2.70.342------------- 0.766 6.05 cm= =

a2 b2 c2 2bc Acos–+=

a2 4.22 2.72 2 4.2 2.7 130cos–+ 58 42 0.707– 28.306= = =

130cos 0.643–=

a2 17.64 7.29 14.58+ + 39.51= =

a 6.28=

Page 185: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 5 Fundamentals of Plane Trigonometry

5-22 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

NOTES

Page 186: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 6-1Orchard Publications

Chapter 6

Fundamentals of Calculus

his chapter introduces the basics of differential and integral calculus. It is intended forreaders who need an introduction or an accelerated review of this topic. Readers with astrong mathematical background may skip this chapter. Others may find it useful, as well as

a convenient source for review.

6.1 IntroductionCalculus is the branch of mathematics that is concerned with concepts such as the rate of change,the slope of a curve at a particular point, and the calculation of an area bounded by curves. Manyprinciples governing physical processes are formulated in terms of rates of change. Calculus is alsowidely used in the study of statistics and probability.

The fundamental concept of calculus is the theory of limits of functions. A function is a definedrelationship between two or more variables. One variable, called dependent variable, approaches alimit as another variable, called independent variable, approaches a number or becomes infinite. Incalculus, we are interested in related variables. For instance, the amount of postage required tomail a package is related to its weight. Here, the weight of the package is considered the indepen-dent variable, and the amount of postage is considered the dependent variable.

The two branches into which elementary calculus is usually divided, are the differential calculus,based on the limits of ratios, and the integral calculus, based on the limits of sums.

6.2 Differential Calculus

Suppose that the dependent variable, denoted as , is a function of the independent variable,denoted as . This relationship is written as . If the variable changes by a particularamount , the variable will also change by a predictable amount . The ratio of the twoamounts of change is called a difference quotient. If the rate of change differs over time, thisquotient indicates the average rate of change of in a particular amount of time.

If the ratio has a limit as approaches , this limit is called the derivative of . The deriva-tive of may be interpreted as the slope of the curve graphed by the equation , measuredat a particular point. It may also be interpreted as the instantaneous rate of change of . The pro-cess of finding a derivative is called differentiation.

If the derivative of is found for all applicable values of , a new function is obtained. If ,the new function, which we call the first derivative, is written as , or , or . If the

T

yx y f x= x

h y kk h

y f x=

k h h 0 yy y f x=

y

y x y f x=

y' dy dx df x dx

Page 187: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 6 Fundamentals of Calculus

6-2 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

first derivative is itself a function of , its derivative can also be found; this is called the second

derivative of and it is written as or or . Third and higher derivatives alsoexist and they are written similarly.

Example 6.1

Suppose that the distance between City A and City B is miles. Distance is usually denotedwith the letter s, so for this example miles. This distance is fixed; it does not change withtime; therefore, we say that distance is independent of time because whether we decide to drivefrom City A to City B today or tomorrow, we need to drive a distance of miles. What is moreimportant to us, is the time we need to spend driving. This depends on the velocity (speed)*

which, in turn, depends on traffic conditions, and our driving habits. Thus, if we start driving fromCity A towards City B at a constant speed of miles per hour, we will spend ten hours driving.As we drive, the distance changes, that is, it is being reduced. For instance, after driving for onehour, we have covered miles and the remaining distance has been reduced miles. Like-wise, if our speed during the second hour is miles per hour, the remaining distance is furtherreduced to miles.

We denote velocity with the letter and time with . Then,

(6.1)

that is, velocity is the distance divided per unit of time; in this case, miles divided by hours.

In reality, it is impossible to maintain exactly the same speed per unit of time, that is, when we saythat during the first hour we drove at a velocity of miles per hour, this is an average velocitysince the velocity may vary from to , or from to miles per hour. Therefore, the for-mula of (6.1) is valid for average velocities only.

The instantaneous velocity, that is, at any instant, the velocity is expressed as

† (6.2)

* Velocity is speed with direction assigned to it.† The development of this expression follows. Let be the distance at time and the distance at time . Next,

let the difference between and be denoted with the Greek letter (delta), that is, and likewise,

let the difference between and be denoted as . Then, . Now, let ; this

notation says that we let become so small that it approaches zero in the limit but never becomes exactly zero.Obviously, as becomes smaller and smaller, so does . Then,

y' x

y y'' d 2y dx2 d 2f x dx2

500s 500=

500

50

50 45065

385

v t

v s t=

5049 51 48 52

v t dsdt-----=

s1 t1 s2 t2s2 s1 s s2 s1–=

t2 t1 t t2 t1–= v ts2 s1–

t2 t1–--------------- s

t------= = t 0

t

t s v t st

------t 0lim ds

dt-----= =

Page 188: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 6-3Orchard Publications

The Derivative of a Function

where the notation is used to indicate that the velocity is a function of time, denotes avery small change in distance, and is a very small change in time. In other words, the velocityat any instance, is the change of distance caused by a change in time. Mathematically, (6.2) statesthat instantaneous velocity is the first derivative of the distance with respect to time, or that theinstantaneous velocity is found by differentiating the distance with respect to time.

Instantaneous acceleration, denoted with the letter , is defined as the first derivative of velocitywith respect to time, that is,

(6.3)

and since the instantaneous velocity is the first derivative of the distance with respect to time, wesay that the instantaneous acceleration is the second derivative of the distance with respect totime. Stated mathematically,

(6.4)

6.3 The Derivative of a Function

Let us consider the curve of Figure 6.1 where meaning that is a function of . In otherwords, the values of depend on the values of .

Figure 6.1. Definition of the derivative of a function.

In Figure 6.1, point is considered to be fixed; that is, and are held constant. Let be another point close to it; then,

(6.5)

Subtraction of from (6.5) yields

v t dsdt

a

a t dvdt------=

a t d2sdt2--------=

y f x= y xy x

x

y=f(x)

0 x1

y1=f(x1)P

Qf(x1+ x)

x1+ x

x

y

y1

P x1 y1 x1 y1

Q x1 x y1 y++

y1 y+ f x1 x+=

y1 f x1=

Page 189: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 6 Fundamentals of Calculus

6-4 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

(6.6)

We denote the slope of the straight line as ; then,

(6.7)

Now, suppose we keep in its fixed position and we let become smaller and smallerapproaching zero but never becoming exactly zero. In this case, the slope approaches a con-stant value which we call it its limit. At this limit, the slope becomes tangent to the curve at point

; we denote this slope as . Stated mathematically,

(6.8)

In the above discussion, we assumed that the limit as exists. This is not always the case;this limit may or may not exist. If it does exist, the function is said to have a derivative, or to be dif-ferentiable at . Therefore, in differential calculus we are concerned with two general problems:

I. Given a function , find those values of the independent variable at which has aderivative.

II. If has a derivative, find it.

We express the derivative of (6.8) as

(6.9)

where is held fixed, and varies approaching zero, but never becoming exactly zero; other-wise the right side of (6.9) would be reduced to the indeterminate* form .

Note 6.1

Occasionally, we may need to use certain algebraic identities. We list a few below; others will begiven as needed.

(6.10)

(6.11)

* Indeterminate forms are those that do not lead up to a definite result or ending. Other indeterminate forms are, , , , and .

y f x1 x+ f x1–=

PQ m

m yx

------f x1 x+ f x1–

x-------------------------------------------= =

x1 x

m

P mtan

mtan mQ Plim y

x------

x 0lim

f x1 x+ f x1–

x-------------------------------------------

x 0lim= = =

x 0

x1

f x x f x

f x

dydx------ f x x+ f x–

x--------------------------------------

x 0lim=

x x0 0

–0 1 00

a b+ 2 a2 2ab b2+ +=

a b– 2 a2 2– ab b2+=

Page 190: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 6-5Orchard Publications

The Derivative of a Function

(6.12)

(6.13)

(6.14)

Example 6.2

The curve of Figure 6.2 is described as

(6.15)

Figure 6.2. Curve for Example 6.2

Compute the derivative of this function using (6.9).

Solution:

As a first step we compute . Thus, in (6.15), we replace with ; then wesubtract from it as shown below.

By substitution of the last line of the above expression into (6.9), we get

a2 b2– a b+ a b–=

a b+ 3 a3 3a2b 3ab2 b3+ + +=

a b– 3 a3 3– a2b 3ab2 b3–+=

y f x x3 3x2– 4x 2+ += =

y=f(x)=x3 3x2+4x+2

0

10

20

30

40

0 1 2 3 4

x

y=f(x

)

f x x+ f x– x x x+

f x

f x x+ f x– x x+ 3 3 x x+ 2– 4 x x+ 2+ + x3 3x2– 4x 2+ +–=

x3 3x2 x 3x x2 x3+ + + 3 x2 2x x x2+ +– 4x 4 x 2+ + + x3 3x2– 4x 2+ +–=

x3 x3– 3x2– 3x2 4x 4x– 2 2– 3x2 x 3x x2 x3 6x x 3 x2 4 x+––+ + + + + +=

3x2 x 3x x2 x3 6x x 3 x2 4 x+––+ +=

x 3x2 3x x x2 6x– 3 x– 4+ + +=

Page 191: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 6 Fundamentals of Calculus

6-6 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

(6.16)

It is important to remember that the division by on the right side term in the second line of(6.16), must be performed before we let .

In Example 6.2, we found that the computation of the derivative of a polynomial* function,although not difficult, it involves a tedious process. Fortunately, we can use some formulas thatwill enable us to compute the derivatives of polynomials very easy, and rather quickly. The rulesand formulas for polynomials and other functions of interest are given below without proof. Theproofs can be found in calculus textbooks.

1. The derivative† of a constant is zero. Thus, if is any constant,

(6.17)

Example 6.3

It is given that . Find its derivative .

Solution:

Here, is a constant; its value does not depend on the independent variable . Therefore,

2. If

(6.18)

where is any constant, and is any non-zero positive integer, the derivative of withrespect to is

* A polynomial is an algebraic expression consisting of one or more summed terms, each term consisting of a con-stant multiplier and one or more variables raised to integral powers, that is, integer exponents. For example, x2 –5x + 6 and 2p3q + y are polynomials.

† Henceforth, the terminology “derivative” will mean the first derivative, that is, if , its derivative is

. For higher order derivatives we will use the terminology “second derivative”, “third derivative” and so

on.

dydx------ f x x+ f x–

x--------------------------------------

x 0lim=

x 3x2 3x x x2 6x– 3 x– 4+ + +x

--------------------------------------------------------------------------------------------x 0lim=

3x2 3x x x2 6x– 3 x– 4+ + +x 0lim 3x2 6x– 4+==

xx 0

c

y f x=

ddx------f x

ddx------c 0=

y f x 4= = dy dx

y x

dydx------ 0=

y f x cxn= =

c n yx

Page 192: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 6-7Orchard Publications

The Derivative of a Function

(6.19)

Example 6.4

It is given that . Find its derivative .

Solution:

For this example, (6.19) is applicable. Then,

3. The derivative of the sum of a finite number of differentiable functions is equal to the sum of theirderivatives. That is, if

(6.20)

then,

(6.21)

Example 6.5

It is given that . Find its derivative .

Solution:

For this example, we apply (6.21). Then,

This is the same answer as in Example 6.2, which was found by direct application of the definitionof the derivative.

By our earlier discussion on velocity and acceleration, if represents the position of a mov-

ing body at time , then the first derivative yields the velocity , and the second derivative

yields the acceleration .

dydx------ d

dx------cxn ncxn 1–

= =

y f x 5x4= = dy dx

dydx------ d

dx------ 5x4= 4 5x4 1–= 20x3=

y u1 u2 u3 un+ + + +=

dydx------

d u1 u2 u3 un+ + + +

dx--------------------------------------------------------------

du1dx

---------du2dx

---------du3dx

---------dundx

---------+ + + += =

y f x x3 3x2– 4x 2+ += = dy dx

dydx------ d

dx------ x3 3x2– 4x 2+ +

ddx------ x3 d

dx------ 3– x2 d

dx------ 4x d

dx------ 2+ + += =

3x2 6x– 4 0+ + 3x2 6x– 4+==

s f t=

t dsdt----- v

d2sdt2------- a

Page 193: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 6 Fundamentals of Calculus

6-8 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

Example 6.6

A salesman drives his automobile along a highway where the average speed is approximately 10miles per hour due to bad weather and heavy traffic. From past experience, he knows that the dis-tance as a function of time is

(6.22)

for , that is, for positive time, where t is in hours and s is in miles. After driving for some time,the salesman, through a highway sign, is informed that one of the lanes ahead is closed to traffic.Frustrated over this situation, he stops, makes a U-turn, and proceeds in the opposite direction toreturn to his office.

Find the distance he has traveled before reversing direction and the acceleration at that point.

Solution:

We will use Excel to plot the distance versus time , so that we can see how the distancedecreases as time increases.

We start with a blank spreadsheet. In Column A of the spreadsheet shown in Figure 6.3, we enterthe time in increments of 0.020 hours. Thus, in A2 we type 0.000 and in A3 we type 0.020.Then, using the autofill* feature, we fill-in A4:A252, where A252 contains the value . Weuse Column B for the distance . In B2 we type the formula =A2^3 8*A2^2-2*A2+50; this repre-sents the expression of (6.22). Then, we copy B2 down to the range B3:B252. Next, using theChart Wizard we obtain the plot shown on Figure 6.3. For brevity, only a partial list of the valuesof time and distance are shown.

Rows 210 and 211 indicate a change from decreasing to increasing values in distance . That is,as time increases, the distance is increasing instead of decreasing. This is also shown on the plot,but we can only get an approximation from the plot which shows that the salesman intended todrive a distance of miles, but after driving for approximately miles, he reversesdirection.

* To use this feature, we highlight cells A2 and A3. We observe that on the lower right corner of A3, there is a smallblack square; this is called the fill handle. If it does not appear on the spreadsheet, we can make it visible by per-forming the sequential steps Tools>Options, select the Edit tab, and place a check mark on the Drag and Dropsetting. Next, we point the mouse to the fill handle and we observe that the mouse pointer appears as a smallcross. Then, we click, hold down the mouse button, we drag it to A252 and release the mouse button. We observethat, as we drag the fill handle, a pop-up note shows the cell entry for the last value in the range.

s t t3 6t2– 2t– 50+=

t 0

s t

t5.000

s

s

50 50 10– 40=

Page 194: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 6-9Orchard Publications

The Derivative of a Function

Figure 6.3. Plot for the function of Example 6.6

To find the exact distance that the salesman traveled before reversing direction, we make use ofthe velocity and acceleration relations which, as we saw earlier, are the first and secondderivatives of the distance respectively.

Using our intuition, we conclude that his velocity is zero when he stops to reverse direction, andto reach zero velocity he decelerates*.

Differentiating (6.22) once to find the velocity , and then, one more time to obtain the acceler-ation , we get

(6.23)

and

(6.24)

The velocity is zero when (6.23) equals zero, that is, when

(6.25)

* Deceleration is negative acceleration, that is, decrease in the rate of change of velocity.

123456789

10111213141516

A B C D E F Gt s0.000 50.0000.020 49.9580.040 49.9100.060 49.8590.080 49.8020.100 49.7410.120 49.6750.140 49.6050.160 49.5300.180 49.4510.200 49.3680.220 49.2800.240 49.1880.260 49.092 Row 210: 4.160 9.8380.280 48.992 Row 211: 4.180 9.840

s=f(t)=t 3 t 2 2t+50

0

10

20

30

40

50

0 1 2 3 4 5 6

ts=

f(t)

v as

va

v dsdt----- 3t2 12t– 2–= =

a dvdt------ d2s

dt2-------- 6t 12–= = =

v

3t2 12t– 2– 0=

Page 195: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 6 Fundamentals of Calculus

6-10 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

Using the quadratic formula we get

(6.26)

and

(6.27)

Since we are only interested in positive time, that is, values of greater than zero, we ignore thevalue of in (6.27).

The distance traveled before reversing direction is found by substitution of into (6.22). Thus,

(6.28)

This result indicates that, after driving for , the distance has been reduced from to miles. Thus, the distance traveled before reversing direction is miles.

The acceleration (deceleration in this example) , is found by substitution of into (6.24).Thus,

(6.29)

It is important to remember that, whereas the unit of velocity is miles per hour, the unit of acceler-

ation is .

Derivatives are also very important in business applications. To illustrate, suppose that a companymanufactures units of a certain product per month. The total cost (in dollars) for the produc-tion of those units, is a function of the units produced, that is, , and normally, it includesa percentage of the cost of the manufacturing facilities, maintenance, labor, taxes, etc.

Suppose that the cost of producing units is dollars. The ratio represents theincrease in cost per unit increase in output. The limit of this ratio as , is called the marginalcost. Stated in other words, if the total monthly cost is for units per month, the marginal cost

t112–– 122 4 3 2––+

2 3-------------------------------------------------------------------------=

12 144 24++6

-------------------------------------- 12 168+6

------------------------- 4.16 hours= ==

t212–– 122 4 3 2–––

2 3------------------------------------------------------------------------=

12 144 24+–6

------------------------------------- 12 168–6

------------------------- 0.16 hours–= ==

tt2

t1

s t3 6t2– 2t– 50+ 4.1733 6 4.1732– 2 4.173– 50+= =

72.668 104.484– 8.346– 50+ 9.838==

4.16 hours s 509.838 50.000 9.838– 40.162=

a t1

a 6t 12– 6 4.173 12– 13.038 mileshr2

--------------= = =

miles per hour2

x yy f x=

x x+ y y+ y xx 0

y x

Page 196: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 6-11Orchard Publications

Maxima and Minima

is the derivative which indicates the rate of increase of cost per unit increase in produc-tion from the reference quantity . The company is also interested in revenue and profits. A dis-cussion on maxima and minima will help us to understand how the company can adjust its pro-duction to achieve maximum profit. We will reconsider this case in Example 6.8, after our discus-sion on maxima and minima that follows.

6.4 Maxima and MinimaDifferential calculus is a very powerful tool for solving problems in which we are interested infinding maximum and minimum values. An easy way to determine the approximate values of themaxima or minima of a function, is to plot the function using Excel (or MATLAB) asshown in Example 6.7 that follows.

Example 6.7

Use Excel to plot the function

(6.30)

and give approximate maximum and minimum values.

Solution:

Following the same procedure as in Example 6.6, we construct the plot shown in Figure 6.4.Points and are assumed to be very close to point . Likewise, and are very close to . Atpoints and we see that is an increasing function of . This means that increases as increases. At these points the slope of the tangent to the curve is said to be positive. Atpoints and , we see that the slope of the tangent to the curve is said to be zero since,precisely at these points, neither increases nor decreases. At points and , we see that is adecreasing function of ; this means that decreases as increases. At these points, the slope ofthe tangent to the curve is said to be negative. Obviously, the maximum and minimumvalues of occur when the slope is zero. From Figure 6.4, we see that a maximum occursat point when the transition is from a positive slope, at point in this case, to a negative slopeat point . Conversely, a minimum occurs at point when the transition is from a negative slopeat point , to a positive slope at point .

It is shown in calculus textbooks that we can determine whether a value represents a maximum ora minimum, by performing the following test.

I. If the second derivative is positive when , is a minimum.

dy dx yx

y f x=

y f x 13---x3 2x2– 3x 2+ += =

a c b d f ea f y x y x

dy dxb e dy dx

y c d yx y x

dy dxy dy dx

b ac dd f

d2ydx2-------- dy

dx------ 0= y

Page 197: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 6 Fundamentals of Calculus

6-12 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

Figure 6.4. Plot for Example 6.7

II. If the second derivative is negative when , is a maximum.

III. If the second derivative is zero when , the test fails.

Of course, it is highly recommended that we always plot the function to determine theapproximate values by visual inspection.

We now return to our discussion on the manufacturing company that produces units of a par-ticular product, with Example 6.8 that follows.

Example 6.8

The manufacturing company can sell units of a certain product per month at a price* dollars per unit. The management of the company has determined that it costs dollars to manufacture the units.

a. How many items should the company produce to maximize the profit?

b. How much should each item sell for to achieve this profit?

Solution:

The profit is revenue minus cost; therefore,

* Usually, at a higher price the company would sell less and at a lower price it would sell more.

123456789

1011121314

A B C D E F Gx y

0.000 1.0000.020 1.0780.040 1.1540.060 1.2260.080 1.2950.100 1.3610.120 1.4240.140 1.4840.160 1.5410.180 1.5950.200 1.6460.220 1.6940.240 1.740

y=f(t)=0.75x 3 4x 2 +4x+1

-3

-2

-1

0

1

2

3

0 1 2 3 4

xy=

f(x)

ab c

de f

d2ydx2-------- dy

dx------ 0= y

d2ydx2-------- dy

dx------ 0=

y f x=

x

xp 200 0.01x–=

y 50x 20000+= x

Page 198: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 6-13Orchard Publications

Maxima and Minima

(6.31)

a. To find the value of x which will maximize the profit, we form the first derivative of (6.31) andwe set it equal to zero, that is,

(6.32)

and solving (6.32) for x we get .

We do not know whether this value of x is a maximum or minimum. This can be determinedeither by taking the second derivative of (6.31), or equivalently the first derivative of (6.32), orby plotting it. The second derivative yields and since this is a negative value, we con-clude that the value of is a maximum, and therefore, it represents the number ofunits that will maximize the profit. This is confirmed with the plot of Figure 6.5.

b. To achieve the maximum profit each unit must be sold at

Figure 6.5. Plot for Example 6.8.

We will conclude the section on differential calculus with the formulas below where , , and are functions of , and , , and denote constant values.

Profit xp y–=

x 200 0.01x– 50x 20000+– 200x 0.01x2– 50x– 20000–==

150x 0.01x2– 20000–=

ddx------Profit d

dx------ 150x 0.01x2– 20000– 150 0.02x– 0= = =

x 7500=

0.02–

x 7500=

price 200 0.01x– 200 0.01 7500– 200 75– $125 per unit= = = =

23456789

1011121314

A B C D E F G H1 -198502 -197003 -195504 -194005 -192506 -191007 -189508 -188019 -18651

10 -1850111 -1835112 -1820113 -18052

Profit = 0.01x2+150x 20000

-1000000

100000200000300000400000500000600000

0 2500 5000 7500 10000

x (units)

Pro

fit

u v wx a c n

Page 199: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 6 Fundamentals of Calculus

6-14 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

(6.33)

(6.34)

(6.35)

(6.36)

(6.37)

(6.38)

(6.39)

(6.40)

(6.41)

(6.42)

(6.43)

(6.44)

(6.45)

(6.46)

(6.47)

(6.48)

ddx------ a 0=

ddx------ x 1=

ddx------ au adu

dx------=

ddx------ u v w–+ du

dx------ dv

dx------ dw

dx-------–+=

ddx------ uv udv

dx------ vdu

dx------+=

ddx------ u

v---

vdudx------ u–

dvdx------

v2----------------------=

ddx------ un nun 1– du

dx------=

ddx------ u 1

2 u----------du

dx------=

ddx------ 1

u--- 1

u2-----–

dudx------=

ddx------ 1

un----- n

un 1+------------–

dudx------=

ddx------ uln 1

u---du

dx------=

ddx------ eu eudu

dx------=

ddx------ uv vuv 1– du

dx------ uln uv dv

dx------+=

ddx------ usin ucos du

dx------=

ddx------ ucos usin–

dudx------=

ddx------ utan u2sec du

dx------=

Page 200: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 6-15Orchard Publications

Integral Calculus

6.5 Integral CalculusIntegral calculus involves the process of finding the function itself when its derivative is known.This is the inverse process to finding the derivative of a function. The process of finding an inte-gral of a function is called integration. There are two kinds of integration, indefinite and definite.We will discuss the indefinite type of integration first.

Suppose we are given the relation

(6.49)

and we are asked to find . Relation (6.49) is a simple differential equation, and although we donot know how to solve differential equations, using our knowledge with derivatives we can saythat

(6.50)

because we know that if we take the first derivative of (6.50) we will obtain (6.49). However, wemust realize that the derivatives of other functions such as

(6.51)

when differentiated, will also yield (6.49). Therefore, we can say that the solution of the differen-tial equation of (6.45) is, in general,

(6.52)

and the constant is referred to as an arbitrary constant of integration.

Relation (6.49) is called a simple differential equation. Differential equations are very useful notonly in engineering and in the physical sciences, but also in the business and finance sectors.

Differential equations, and consequently integration, require the ability to guess the answer. For-tunately, there are certain formulas and procedures that we can use to minimize the amount ofguesswork. We will present the most common. First, we will introduce the concept of differentials.

The differential equation of (6.49) can also be written as

(6.53)

and when expressed in this form, we say that is the differential of in terms of and , and is the differential of .

Note 6.2

The symbol denotes integration. The integral is an indefinite integral and is a

definite integral.

dydx------ 3x2=

y

y x3=

y x3 2 y+ x3 7 y– x3 5+= = =

y x3 C+=

C

dy 3x2dx=

dy y x dxdx x

f x xd f x xda

b

Page 201: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 6 Fundamentals of Calculus

6-16 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

Note 6.3

When we evaluate indefinite integrals, we must always add the constant of integration .

6.6 Indefinite Integrals

1. The integral of the differential of a function is plus an arbitrary constant . Stated mathemati-cally,

(6.54)

2. A constant, say , may be written in front of the integral sign. In other words,

(6.55)

3. The integral of the sum of two or more differentials is the sum of their integrals. That is,

(6.56)

4. If , that is, if is not equal to minus one, the integral of is obtained by adding one to theexponent and dividing by the new exponent. In other words,

(6.57)

We have just introduced the elementary forms of integrals. There are many more; they can befound in mathematical tables listed as tables of integrals. Table 6.1 lists the most common differen-tials and their integral counterparts.

6.7 Definite Integrals

Let us consider the curve shown in Figure 6.6.

Figure 6.6. Area under y=f(x)

The area under the curve between points and can the found from the integral

C

x x C

xd x C+=

a

a xd a xd=

x1d x2d xnd+ + + x1d x2d xnd+ + +=

n 1– n xndx

xn xd xn 1+

n 1+------------ C+=

y f x=

y=f(x)

x

y

a b

y f x= a b

Page 202: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 6-17Orchard Publications

Definite Integrals

(6.58)

Relation (6.58) is known as the fundamental theorem of integral calculus.

In (6.58), is the integral of , and the meaning of the notation is that we must

first replace with the upper value , that is, we set to obtain , and from it we sub-tract the value , which is obtained by setting .

TABLE 6.1 Differentials and their integral counterparts

Differentials Integrals

1

2

3

4

5

6

7

8

9

10

du dudx------dx= ud u C+=

d au adu= a xd a xd=

d x1 x2 xn+ + +dx1 dx2 xn+ + +

= x1d x2d xnd+ + +

x1d x2d xnd+ + +

=

d xn nxn 1– dx= xn xd xn 1+

n 1+------------ C+=

d xln dxx

------= xdx

----- xln C+=

d ex exdx= ex xd ex C+=

d ax ax adln x= ax xd ax

aln-------- C+=

d xsin xdxcos= x xdcos xsin C+=

d xcos xsin dx–= xsin xd xcos– C+=

d xtan x2 dxsec= x2 dxsec xtan C+=

f x xda

bF x a

b F b F a–= =

F x f x dx F x ab

x b x b= F bF a x a=

Page 203: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 6 Fundamentals of Calculus

6-18 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

The lower value in (6.58) is called the lower limit of integration, and the upper value is theupper limit of integration.

The left side of (6.58) is a definite integral. In the evaluation of all definite integrals, the constant ofintegration is zero; therefore, it is omitted.

Example 6.9

A curve is described by the equation

(6.59)

Compute the area under this curve between points and .

Solution:

Let us use Excel to plot the curve of (6.59). The plot is shown in Figure 6.7.

Figure 6.7. Plot for the function of Example 6.7.

To generate the above plot, we entered several values of in Column A of the spreadsheet, start-ing with A2, and in B2 we typed the formula =2*A2^3 6*A2+3; this was copied down to the samerow as the values of in Column A.

The plot shows that the area from about to about is negative;* it is positive forall other values of .

For this example the net area is

* The fact that the curve is negative within an interval of values of x should not be a reason for concern; integra-tion of the given function using (6.58), will yield the net area.

a b

C

y f x= 2x3 6x– 3+=

x1 1= x2 3=

-3

3

9

15

21

27

33

39

0.0 1.0 2.0 3.0 4.0

y=f(x)=2x3-6x+3

x1 x2

x

x

x 0.6= x 1.4=

x 0

Page 204: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 6-19Orchard Publications

Definite Integrals

Note 6.4

Since the result of integration in most cases* denotes area, we must express the answer in square

units such as , and so on.

It is shown in advanced mathematics textbooks that in compound interest computations, wherethe accrued interest is added to the principal at the end of each period, the amount at the end ofa period can be found from the relation

(6.60)

where is the amount deposited at the beginning of a period, the amount at the end of the

period, is the interest rate per year, and is the time, in years, that it takes to increase theamount from to .

Example 6.10

Suppose that a bank pays interest on deposits of or more, provided that the depos-ited amount is not withdrawn in less than a year. If is deposited today, in how many yearswill this amount grow to if no withdrawals are made?

Solution:

For this example, , , , and we wish to find . Then,

(6.61)

Integrating both sides of (6.61) and rearranging, we get

* Another class of integrals, referred to as “line integrals” yield the answer in units other than square units. Forinstance, in physics, we can use a line integral to find the work or energy in foot-pounds.

2x3 6x– 3+ xd1

32x4

4----- 6x2

2-----– 3x+

1

312---x4 3x2

– 3x+1

3

= =

812

------ 27– 9+ 12--- 3– 3+– 22.5 0.5– 22 sq units= ==

in2 cm2

1p--- pd

p1

p2r td

0

t=

p1 p2

r tp1 p2

7.2% $10,000$15,000

$30,000

p1 15000= p2 30000= r 0.072= t

1p--- pd

15000

300000.072 td

0

t=

0.072t 30000 15000–ln 3000015000---------------ln 2ln= = =

Page 205: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 6 Fundamentals of Calculus

6-20 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

Solving for , we get

Therefore, one must leave his money in a bank or savings and loans institution for approximately10 years for the original deposit to double if the interest rate is .

The equation

(6.62)

is called a second order differential equation.

Suppose, for example, that an object weighing lb. is hung on a helical spring, and causes thespring to stretch inch. The object is then pulled down more inches and released. The result-ing motion is referred to as simple harmonic motion and it is described by a second order differentialequation such as (6.62).

Of course, higher order differential equations exist; these are discussed in differential equationstextbooks.

t

t 2ln0.072-------------= 9.627 years=

7.2%

ad2ydx2-------- bdy

dx------ cy+ + 0=

101 2

Page 206: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 6-21Orchard Publications

Summary

6.8 Summary• Calculus is the branch of mathematics that is concerned with concepts such as the rate of

change, the slope of a curve at a particular point, and the calculation of an area bounded bycurves.

• The fundamental concept of calculus is the theory of limits of functions.

• A function is a defined relationship between two or more variables. One variable, called depen-dent variable, approaches a limit as another variable, called independent variable, approaches anumber or becomes infinite.

• The two branches into which elementary calculus is usually divided, are the differential calcu-lus, based on the limits of ratios, and the integral calculus, based on the limits of sums.

• If the limit as exists the function is said to have a derivative, or to be differentiable at and the derivative is defined as

• The derivative of a constant is zero.

• If

where is any constant, and is any non-zero positive integer, the derivative of withrespect to is

• The derivative of the sum of a finite number of differentiable functions is equal to the sum oftheir derivatives. That is, if

then,

• If the second derivative is positive when , is a minimum.

• If the second derivative is negative when , is a maximum.

• Integral calculus involves the process of finding the function itself when its derivative isknown.

x 0 x1

dydx------ f x x+ f x–

x--------------------------------------

x 0lim=

y f x cxn= =

c n yx

dydx------ d

dx------cxn ncxn 1–

= =

y u1 u2 u3 un+ + + +=

dydx------

d u1 u2 u3 un+ + + +

dx--------------------------------------------------------------

du1dx

---------du2dx

---------du3dx

---------dundx

---------+ + + += =

d2y dx2 dy dx 0= y

d2y dx2 dy dx 0= y

Page 207: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 6 Fundamentals of Calculus

6-22 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

• There are two kinds of integrals, indefinite and definite.

• When evaluating indefinite integrals, we add the constant is referred to as an arbitrary con-stant of integration.

• The integral of the differential of a function is plus an arbitrary constant . That is,

• A constant may be written in front of the integral sign. In other words,

• The integral of the sum of two or more differentials is the sum of their integrals. That is,

• If , that is, if is not equal to minus one, the integral of is obtained by adding oneto the exponent and dividing by the new exponent. In other words,

• The fundamental theorem of integral calculus states that

• In definite integrals the lower value is called the lower limit of integration, and the upper value is the upper limit of integration.

• Since the result of integration in most cases denotes area, we must express the answer in squareunits.

• Higher order differential equations exist; these are discussed in differential equations text-books.

C

x x C

xd x C+=

a xd a xd=

x1d x2d xnd+ + + x1d x2d xnd+ + +=

n 1– n xndx

xn xd xn 1+

n 1+------------ C+=

f x xda

bF x a

b F b F a–= =

b

Page 208: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 6-23Orchard Publications

Exercises

6.9 Exercises1. Find the derivatives of the following functions.

a. b. c. d.

2. Evaluate the following indefinite integrals.

a. b. c.

3. Evaluate the following definite integrals, that is, find the area under the curve for the lowerand upper limits of integration.

a. b.

4. Suppose that a bank pays interest on deposits of or more provided that the depos-ited amount is not withdrawn in less than a year. If is deposited today, in how manyyears will this amount grow to ?

y 2x6 3x2–= y 1x---= y e 3x–= y 4x=

3x2 xd 5x3 6x2 12–+ xd 3e2x xd

2x5 6x3– 3x+ xd1

23x2 6x 8–+ xd

3

5

6% $5,000$8,000

$16,000

Page 209: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 6 Fundamentals of Calculus

6-24 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

6.10 Solutions to Exercises1.

a.

Check with the MATLAB diff(f) function:

syms x y % define symbolic variables x and y

y = 2*x^6 3*x^2; diff(y)

ans =

12*x^5-6*x

b.

Check with the MATLAB diff(f) function:

syms x y % define symbolic variables x and y

y = 1/x; diff(y)

ans =

-1/x^2

c.

Check with the MATLAB diff(f) function:

syms x y % define symbolic variables x and y

y=exp( 3*x); diff(y)

ans =

3*exp( 3*x)

d.

y 2x6 3x2–=

dydx------ 6 2 x6 1– 2 3 x2 1–– 12x5 6x–= =

y 1 x x 1–= =

dydx------ 1 x 1– 1–– x 2–– 1– x2= = =

y e 3x–=

dydx------ 3 x 3x–– 3e 3x––= =

y 4x 4x 1 2 41 2 x1 2 2x1 2= = = =

dydx------ 1

2--- 2 x1 2 1– x 1 2– 1 x1 2 1 x= = = =

Page 210: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 6-25Orchard Publications

Solutions to Exercises

Check with the MATLAB diff(f) function:

syms x y % define symbolic variables x and y

y=sqrt(4*x); diff(y)

ans =

1/x^(1/2)

2.

a.

Check with the MATLAB int(f) function:

syms x y % define symbolic variables x and y

y = 3*x^2; int(y)

ans =

x^3

b.

Check with the MATLAB int(f) function:

syms x y % define symbolic variables x and y

y=5*x^3+6*x^2 12; int(y)

ans =

5/4*x^4+2*x^3-12*x

c.

Check with the MATLAB int(f) function:

syms x y % define symbolic variables x and y

y=3*exp(2*x); int(y)

ans =

3/2*exp(2*x)

3x2 xd 3 x2 xd 3 x2 1+

2 1+------------ x3 C+= = =

5x3 6x2 12–+ xd 5 x3 xd 6 x2 xd 12 xd–+ 5 x4

4----- 6 x3

3----- 12x– C+ += =

5 4 x4 2x3 12x– C+ +=

3e2x xd 3 e2x xd 3 e2x

2------ 3 2 e2x C+= = =

Page 211: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 6 Fundamentals of Calculus

6-26 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

3.

a.

Check with the MATLAB int(f,lower_limit,upper_limit) function:

y=2*x^5 6*x^3+3*x; int(y,1,2)

ans =

3

b.

Check with the MATLAB int(f,lower_limit,upper_limit) function:

y=3*x^2+6*x 8; int(y,3,5)

ans =

130

4.

Let , , , and we wish to find . Then,

Integrating both sides and rearranging, we get

Solving for , we get

2x5 6x3– 3x+ xd1

2 26---x6 6

4---x4–

32---x2+

1

226--- 26 6

4---24–

32---22+

26---16 6

4---14–

32---12+–= =

1 643

--------------- 3 162

---------------– 3 42

------------ 13---– 3

2--- 3

2---–+ + 21 1

3--- 24– 6 1 3–+==

3 square units=

3x2 6x 8–+ xd3

5 33---x3 6

2---x2 8– x+

3

5

53 3 52 8 5–+ 33 3 32 8 3–+–= =

125 75 40– 27– 27– 24+ + 130 square units==

p1 8000= p2 16000= r 0.06= t

1p--- pd

8000

160000.06 td

0

t=

0.06t 16000 8000–ln 160008000

---------------ln 2ln= = =

t

t 2ln0.06----------= 11.55 years=

Page 212: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 7-1Orchard Publications

Chapter 7

Mathematics of Finance and Economics

his chapter is an introduction to the mathematics used in the financial community. Thematerial presented in this appendix is indispensable to all business and technology studentsas well as those enrolled in continuing and adult education. Also, an executive lacking a

background in finance is seriously considered handicapped in this vital respect.

7.1 Common Terms

Bond

A bond is a debt investment. That is, we loan money to an entity (company or government) thatneeds funds for a defined period of time at a specified interest rate. In exchange for our money, theentity will issue us a certificate, or bond, that states the interest rate that we are to be paid andwhen our loaned funds are to be returned (maturity date). Interest on bonds is usually paid everysix months, i.e., semiannually.

Corporate bond

A corporate bond is a bond issued by a corporation.

Municipal bond

A municipal bond is a bond issued by a municipality and that generally is tax-free. That is, we payno taxes on the interest that we earn. Because it its tax-free, the interest rate is usually lower thanfor a taxable bond.

Treasury bond

A treasury bond is a bond issued by the US Government. These are considered safe investmentsbecause they are backed by taxing authority of the US government. The interest on Treasurybonds is not subject to state income tax. Treasury bonds, or T-bonds for short, have maturitiesgreater than 10 years, while notes and bills have lower maturities.

Perpetuity

A perpetuity is a constant stream of identical cash flows with no maturity date.

Perpetual bond

A perpetual bond is a bond with no maturity date. Perpetual bonds are not redeemable and pay asteady stream of interest forever. Such bonds have been issued by the British government.

T

Page 213: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 7 Mathematics of Finance and Economics

7-2 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

Convertible Bond

A convertible bond is a bond that can be converted into a predetermined amount of a company’sequity at certain times during it life. Usually, convertible bonds offer a lower rate of return inexchange for the option to trade the bond into stock.

The conversion ratio can vary from bond to bond. We can find the terms of the convertible, suchas the exact number of shares or the method of determining how many shares the bond is con-verted into, in the indenture*. For example a conversion ratio of means that every bond wehold (with a par value) can be exchanged for shares of stock. Occasionally, the inden-ture might have a provision that states the conversion ratio will change over the years, but this isuncommon.

Treasury note

A treasury note is essentially a treasury bond. The only difference is that a treasury note is issuedfor a shorter time (e.g., two to five years) than a treasury bond.

Treasury bill

A treasury bill is a treasury note that is held for a shorter time (e.g., three, six, or nine months totwo years) than either a treasury bond or a treasury note. Interest on T-bills are paid at the timethe bill matures, and the bills are priced accordingly.

Face value

Face value is the dollar amount assigned to a bond when first issued.

Par value

The par value of a bond is the face value of a bond, generally for corporate issues, and asmuch as for some government issues. The price at which a bond is purchased is generallynot the same as the face value of the bond. When the purchase price of a bond as its par value, itis said to be purchased at par; when the purchase price exceeds the par value, it is said to be pur-chased above par, or at a premium. When the purchase price is below the par value, it is said to bepurchased below par, or at a discount. Thus, the difference between the par value of a bond andits purchase price is termed the premium or discount whichever applies.

For example, if the face value of a bond is and it sells for , it sells at a discount of; if the same bond sells for , then it sells at a premium of .

* Indenture is a contract between an issuer of bonds and the bondholder stating the time period for repayment,amount of interest paid, if the bond is convertible and if so at what price or what ratio, and the amount of moneythat is to be re-paid.

45:1$1000 45

$1,000$10,000

$5,000 $4,600$400 $5,300 $300

Page 214: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 7-3Orchard Publications

Common Terms

Book value

Book value is the value of a bond at any date intermediate between its issue and its redemption.

Coupon bond

A coupon bond is a debt obligation with coupons representing semiannual interest paymentsattached. No record of the purchaser is kept by the issuer, and the purchaser’s name is notprinted on the certificate.

Zero coupon bond

A zero coupon bond is a bond that generates no periodic interest payments and is issued at a dis-count from face value. The Return is realized at maturity. Because it pays no interest, it is tradedat a large discount.

Junk bond

A junk bond is a bond purchased for speculative purposes. They have a low rating and a higherdefault risk. Typically, junk bonds offer interest rates three to four percentage points higher thansafer government bonds. Generally, a junk bond is issued by a corporation or municipality with abad credit rating. In exchange for the risk of lending money to a bond issuer with bad credit, theissuer pays the investor a higher interest rate. "High-yield bond" is a name used by the for junkbond issuer.

Bond rating systems

Standard and Poor's and Moody's are the bond-rating systems used most often by investors. Theirratings are as shown on Table 7.1.

Promissory note

A promissory note is an unconditional written promise made by one party to another, to pay a stip-ulated sum of money either on demand or at a definite future date. The sum of money stated inthe note is its face value and if the note is payable at a definite date, this date is termed its “duedate” or “date of maturity”. If no mention of interest appears, the maturity value of the note is its

Table 7.1 Bond-Ratings

Moody's Standard & Poor's Grade Risk

Aaa AAA Investment Lowest risk/highest quality

Aa AA Investment Low risk/high quality

A A Investment Low risk/upper medium quality

Baa BBB Investment Medium risk/medium quality

Ba, B BB, B Junk High risk/low quality

Caa, Ca, C CCC, CC, C Junk Highest risk/highly speculative

C D Junk In default

Page 215: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 7 Mathematics of Finance and Economics

7-4 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

face value. But if payment of interest is specified, the maturity value is the face value of the noteplus the accrued interest.

For example, let us assume that a promissory noted dated January 10, 2004, reads as follows: “Sixmonths after date I promise to pay to the order of John Doe the sum of with interest at

per annum. Here, the face value of the note is , its maturity date is July 10, 2004, andthe maturity value is computed as

Therefore, the maturity value is

Discount Rate

Discount rate is the interest rate charged by Reserve Banks when they extend credit to depositoryinstitutions either through advances or through the discount of certain types of paper, includingninety-day commercial paper. Discount rate also refers to the fee a merchant pays its merchantbank for the privilege to deposit the value of each’s day’s credit purchases. This fee is usually asmall percentage of the purchase value.

Prime Rate

Prime rate is the interest rate charged by banks to their most creditworthy customers (usually themost prominent and stable business customers). The rate is almost always the same amongstmajor banks. Adjustments to the prime rate are made by banks at the same time; although, theprime rate does not adjust on any regular basis.

Mortgage Loan

In the case of many types of loans, regardless of the duration, the creditor will require some formof security for the repayment of the loan, such as property owned by the debtor. The legal instru-ment under which the property is pledged is termed a “mortgage,” or “trust deed.” In general, titleand possession of the property remain with the mortgagor, or borrower. However, since the mort-gagee, or lender, has a vested interest in maintaining the value of this property unimpaired, atleast to the extent of the unpaid balance of the loan, the terms of the mortgage generally requirethat the mortgagor keep the property adequately insured, make necessary repairs, and pay alltaxes as they become due.

Should it occur that there is more than one lien applying to a particular piece of property, thenthe mortgages are referred to as the first mortgage, second mortgage, home-equity, etc., corre-sponding to the priority of the claim. In the event of default in repaying the loan, or in the eventof a violation of the terms of the mortgage on the part of the owner, the mortgagee can request acourt of law to undertake the sale of the property in order to recover the balance of his loan.

$10,0008% $10,000

Interest $10 000 0.08 12--- $400= =

Maturity value $10 000 $400+ $10 400= =

Page 216: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 7-5Orchard Publications

Common Terms

Property is often purchased with borrowed funds, and the property thus acquired constitutes thesecurity behind the loan. This is frequently true, for example, in the purchase of homes. Mortgageloans of this type generally possess an amortization feature. Although the term “amortization”means simply the liquidation of a debt, it is generally used to denote the process of graduallyextinguishing a debt through a series of equal periodic payments extending over a stipulatedperiod of time. Each payment can be regarded as consisting of a payment of the interest accruedfor that particular period on the unpaid balance of the loan and a partial payment of principal.With each successive payment, the interest charge diminishes, thereby accelerating the reductionof the debt.

Predatory Lending Practices

Several types of predatory lending have been identified by federal investigators. The most com-mon are:

Equity stripping: Occurs when a loan is based on the equity of a home rather than the borrower’sability to repay. These loans often have high fees, prepayment penalties, and more strict termsthan a regular loan.

Packing. The practice of adding credit insurance and other extras to the loan. The supplements tothe loan are very profitable to lenders and are generally financed in a single up-front of balloonpayment.

Flipping: A form of equity stripping, this occurs when a lender persuades a borrower to repeatedlyrefinance a loan within a short period of time. The lender typically charges high fees each time.

Annuity

An annuity is series of equal payments made at equal intervals or periods of time. When paid intoa fund which is invested at compound interest for a specified number of years, the annuity isreferred to as a sinking fund.

Ordinary Annuity

An ordinary annuity is a series of equal payments or receipts occurring over a specified number ofperiods with the payments or receipts occurring at the end of each period.

Sinking Fund

A sinking fund is an interest-earning fund in which equal deposits are made at equal intervals oftime. Thus, if the sum of is placed in a fund every three months, a sinking fund has beenestablished. See also annuity.

As an example, let us assume that a company plans to purchase a new asset five years from now,and the purchase price at that time will be . To accumulate this sum, it will make annualdeposits in a sinking fund for the next five years and the fund will be earning interest at perannum. If the fund did not earn interest, the required deposit would be per annum. How-

$1,000

$10,0004%

$2,000

Page 217: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 7 Mathematics of Finance and Economics

7-6 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

ever, since the principle in the fund will be continuously augmented through the accrual of inter-est, the actual deposit required will be less than .

7.2 Interest

A paid interest is charge for a loan, usually a percentage of the amount loaned. If we have bor-rowed money, from a bank or credit union, we have to pay them interest. An earned interest is apercentage of an amount that we receive from a bank or credit union for the amount of moneythat we have deposited. In other words, if we put money into a bank or credit union they will payus interest on this money. In this section we will discuss simple interest, simple interest over mul-tiple years, and simple interest over a fraction of a year.

Simple Interest

Simple interest is calculated on a yearly basis (annually) and depends on the interest rate. The rateis often given per annum (p.a.) which means per year.

Let

Then, the maturity value of a loan is computed as

(7.1)

If we know the maturity (future) value , we can compute the present value using the for-mula

(7.2)

Example 7.1

We deposit into a bank account with an interest rate of per annum. We want to findhow much money we have in the account after one year.

Solution:

For this example, , , and . Therefore, after one year the maturity value will be

$2,000

P0 principal of the loan i.e., present value=

i interest rate per period simple interest ressed as a decimalexp=

n number of periods constituting the life of the loan=

Pn maturity value of the loan i.e., future value=

Pn P0 P0 ni+ P0 1 ni+= =

Pn P0

P0Pn

1 ni+---------------=

$500.00 2%

P0 500= n 1= i 0.02=

Pn

Pn P0 1 ni+ 500 1 1 0.02+ $510= = =

Page 218: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 7-7Orchard Publications

Interest

That is, we have earned interest.

Example 7.2

We deposit in a simple interest account for years. The account pays interest at a rateof per annum. How much do we have in this account after three years?

Solution:

That is, after years we will have in this account.

If money is not left in a bank account for a whole year then only a fraction of the interest is paid.

Example 7.3

We deposit in a simple interest account for months. This account pays interest at arate of per annum. How much do we have in this account after months?

Solution:

Since the annual rate is , the semiannual rate is

Then,

That is, after months we will have in this account.

Compound Interest

Compound interest includes interest earned on interest. In other words, with compound interest,the interest rate is applied to the original principle and any accumulated interest.

Let

Then, for

$10.00

$350.00 33%

Pn P0 1 ni+ 350 1 3 0.03+ $381.50= = =

3 $381.50

$50,000 68.5% 6

8.5%

12--- 0.085 0.0425=

A P 1 ni+ 50000 1 0.0425+ $52125= = =

6 $52125

P0 principal of the loan i.e., present value=

i interest rate per period simple interest ressed as a decimalexp=

n number of periods constituting the life of the loan=

Pn maturity value of the loan i.e., future value=

Page 219: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 7 Mathematics of Finance and Economics

7-8 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

Period 1

Period 2

Period 3

and so on. Thus, for Period

(7.3)

The formula of (7.3) assumes that the interest is compounded annually. But if the interest is com-pounded times per year, the maturity value is computed using the formula

(7.4)

Example 7.4

We deposit in a compound interest account for years. The account pays interest at arate of per annum compounded annually. How much do we have in this account after threeyears?

Solution:

Since the interest rate is compounded annually, the formula of (7.3) applies for this example.Thus,

Principal at start of period P0=

Interest earned P0 i=

Principal at end of Period 1 P0 P0 i+=

P1 P0 1 i+=

Principal at start of period P0 1 i+=

Interest earned P0 1 i+ i=

Principal at end of Period 2 P0 1 i+ P0 1 i+ i+ P0 1 i+ 1 i+= =

P2 P0 1 i+2

=

Principal at start of period P0 1 i+2

=

Interest earned P0 1 i+2i=

Principal at end of Period 3 P0 1 i+2 P0 1 i+

2i+ P0 1 i+2 1 i+= =

P3 P0 1 i+3

=

n

Pn P0 1 i+n

=

q

Pn P0 1 iq---+

nq=

$350.00 33%

Page 220: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 7-9Orchard Publications

Interest

That is, after years we will have in this account.

We will discuss the Microsoft Excel financial functions at the end of this chapter. For our presentdiscussion, we will use the appropriate function to verify our answers.

The function

=FV(0.03,3,0, 350,0)

returns . In the formula above represents the annual interest rate expressed in deci-mal form, represents the number of periods ( years for our example), represents the pay-ments made in each period. For this example it is zero since there are no periodic payments made.The present value of is shown as a negative number since it is an outgoing cash flow.Cash we receive, such as dividends, is represented by positive numbers. The last in the formulaindicates that maturity of this investment occurs at the end of the -year period. Cash wereceive, such as dividends, is represented by positive numbers.

Example 7.5

We deposit in a compound interest account for years. The account pays interest at arate of per annum compounded monthly. How much do we have in this account after threeyears?

Solution:

Since the interest rate is compounded monthly, the formula of (7.4) applies for this example.Thus,

Check with Microsoft Excel: The function

=FV(0.03/12,3*12,0, 350,0)

returns . In the above formula we divided the interest rate by to represent the com-pounded interest on a monthly basis, and we multiplied the period ( years) by to convert to

monthly periods.

Example 7.6

This example computes interest on a principal sum to illustrate the differences between simpleinterest and compound interest. We have used a principal and interest.

Pn P0 1 i+n 350 1 0.03+

3 $382.45= = =

3 $382.45

$382.45 0.033 3 0

$350.000

3

$350.00 33%

Pn P0 1 iq---+

nq350 1 0.03

12----------+

3 12$382.92= = =

$382.92 123 12

36

$100.00 7%

Page 221: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 7 Mathematics of Finance and Economics

7-10 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

Simple InterestThe interest rate is applied only to the original principal amount in computing the amount ofinterest as shown on Table 7.2.

Compound InterestThe interest rate is applied to the original principle and any accumulated interest as shown onTable 7.3.

Quite often, both the present value and maturity (future) value are known and we areinterested in finding the interest rate or the period . Since equation (7.3) contains the interestrate and the period, we can express it in logarithmic form by taking the common log of both sidesof that equation. Thus,

(7.5)or

(7.6)

Table 7.2 Simple Interest

Year Principal($) Interest($) Ending Balance($)1 100.00 7.00 107.00

2 100.00 7.00 114.00

3 100.00 7.00 121.00

4 100.00 7.00 128.00

5 100.00 7.00 135.00

Total interest 35.00

Table 7.3 Compound Interest

Year Principal($) Interest($) Ending Balance($)1 100.00 7.00 107.00

2 107.00 7.49 114.49

3 114.49 8.01 122.50

4 122.50 8.58 131.08

5 131.08 9.18 140.26

Total interest 40.26

P0 Pn

i n

Pnlog P0 1 i+nlog P0log 1 i+

nlog+ P0log n 1 i+log+= = =

PnP0------log n 1 i+log=

Page 222: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 7-11Orchard Publications

Interest

Example 7.7

On January 1, 1999, we borrowed from a bank and the debt was discharged on Decem-ber 31, 2003, with a payment of . Assuming that the interest was compounded annually,was the interest rate that we paid?

Solution:

For the example, , , and . By substitution in (7.6) we get

or

Using Microsoft Excel, we find that =LOG10(6.1/5) returns

Then,

In Chapter 1 we learned that implies that . Using Microsoft Excel we find

that =10^0.0173 returns . Thus,

and solving for we get

Therefore, the interest rate that we paid is to the nearest tenth of one per cent.

Check with Microsoft Excel:

The function =RATE(5,0,5000, 6100,0.05) returns . In this formula represents thenumber of the periods ( years), represents the number of periodic payments made during the

-year period which is zero for this example, is the amount of the loan we received, -is the amount we paid, and is our guess of what the interest rate might be.

Example 7.8

On January 1, 2004, we deposited to an account paying annual interest. Howlong will it take for this amount to grow to ?

$5000.00$6100.00

P0 5000= P5 6100= n 5=

61005000------------log 5 1 i+log=

6.15

-------log 5 1 i+log=

0.0864

1 i+log 0.08645

---------------- 0.0173= =

M10log x= M 10 x=

1.041

1 i+ 100.0173 1.041= =

ii 1.041 1– 0.041= =

4.1%

4.06% 55 0

5 5000 6100–

0.05

$5000.00 4.5%$7500.00

Page 223: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 7 Mathematics of Finance and Economics

7-12 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

Solution:

For this example, , , and . By substitution in (7.6) we get

or

or

Using Excel we find that =LOG10(1.5) returns and =LOG10(1.045) returns . Then,

That is, it will take years for our investment to grow to .

Check with Microsoft Excel: The function =NPER(0.045,0, 5000,7500,0) returns years.

Often, we want to translate a given sum of money to its equivalent value at a prior valuation date.To adhere to our previous notation, we shall let denote the value of a given sum of money at aspecified valuation or zero date, and let denote the value of at a valuation date n periodsprior to that of . We will assume that the sum of money is deposited in a fund at interestrate i per period. Thus, its value at the end of n periods will be . Applying equation (7.3) butsubstituting for , and for , we obtain

or

or

(7.7)

Example 7.9

We possess two promissory notes each having a maturity value of . The first note is due years hence, and the second years hence. At an annual interest rate of what proceeds

will we obtain by discounting the notes at the present date?

P0 5000= Pn 7500= i 0.045=

75005000------------log n 1 0.045+log=

1.5log n 1.045log=

n 1.5log1.045log

--------------------------=

0.1761 0.0191

n 0.17610.0191---------------- 9.22= =

9.22 $5000.00 $7500.00

9.21

P0

P n– P0

P0 P n–

P0

P n– P0 P0 Pn

P0 P n– 1 i+n

=

P n–P0

1 i+n

------------------=

P n– P0 1 i+n–

=

$1000.002 3 6%

Page 224: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 7-13Orchard Publications

Interest

Solution:

Equation (7.7) applies to this example. Thus, the value of the first note is

and the value second note is

and the total discount value is

Check with Microsoft Excel: The function =PV(0.06,2,0, 1000) returns , and the func-tion =PV(0.06,3,0, 1000) returns .

The discount applicable to the sum for periods at interest rate is

(7.8)

Example 7.10

A note whose maturity value is is to be discounted year before maturity at an interestrate of . Compute the discount value using

a. Equation (7.7)

b. Equation (7.8)

Solution:

a.

b.

Check with Microsoft Excel: We will subtract the function =PV(0.06,1,1, 5000) from .Thus, =5000-PV(0.06,1,1, 5000) returns .

Example 7.11

Let us assume that the following transactions occurred in a fund whose annual interest rate is.

P 2– P0 1 i+ 2– 1000 1 0.06+ 2– 1000 0.89000 890.00= = = =

P 3– P0 1 i+ 3– 1000 1 0.06+ 3– 1000 0.83962 839.62= = = =

890.00 839.62+ 1729.62=

$890.00$839.62

P0 n i

P0 P n–– P0 P0 1 i+ n–– P0 1 1 i+ n––= =

$5000.00 16%

P 1– P0 1 i+ 1– 5000 1 0.06+ 1– 5000 0.94340 4716.98= = = =

Discount value 5000.00 4716.98– 283.02= =

P0 P 1–– P0 1 1 i+ 1–– 5000 1 1 0.06+ 1–– 5000 1 0.94340– 28302= = = =

$5000.00$283.96

8%

Page 225: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 7 Mathematics of Finance and Economics

7-14 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

1. An initial deposit of was made on January 1, 1992

2. A withdrawal of was made on January 1, 1996

3. A deposit of was made on January 1, 2001

If the account was closed on December 31, 2002, what was the final principal?

Solution:

For convenience, the history of the principal in the fund is shown in Figure 7.1.

Figure 7.1. Plot for Example 7.11.

The four significant dates and the principal at these dates are computed as follows:

Therefore, the principal on December 31, 2002 was .

$1000.00

$600.00

$800.00Ja

n. 1

, 92

Jan.

1, 9

6

Jan.

1, 0

1

Jan.

1, 0

3

$100

0

$600

$800

Time (years)

Pri

ncip

al (

$)

A

B

C

D

E

F

G

H

J

K

AB 1000=

CD 1000 1.08 4 1000 1.36049 1360.49= = =

CE CD ED– 1360.49 600– 760.49= = =

FG 760.49 1.08 5 760.49 1.46933 1117.41= = =

FH FG GH+ 1117.41 800+ 1917.41= = =

JK 1917.41 1.08 2 1917.41 1.1664 2236.47= = =

$2236.47

Page 226: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 7-15Orchard Publications

Interest

The principal at any nonsignificant date can be found by equation (7.3).

Quite often, it is desirable to translate a given group of money values to a second group equiva-lent to the first at another date. The procedure is illustrated with the following example.

Example 7.12

Johnson owes Taylor due December 31, 2003, and due on December 31, 2005. Bymutual consent, the terms of payment are altered to allow Johnson to discharge the debt by mak-ing a payment of on December 31, 2006, and a payment for the balance on December 31,2007. If the annual interest rate is , what will be the amount of Johnson’s final payment?

Solution:

The given data are tabulated in Table 7.4, where the final payment whose value is to be com-puted, is denoted as .

Since the two groups of payments are equivalent to one another, based on an interest rate of ,the total value of one group must equal the total value of the other group at every instant of time.To determine , we select some standard date for evaluating all sums of money involved. Forconvenience, we shall choose Dec. 31, 2007, as the valuation date. Then,

That is, with the revised payment plan Johnson must pay Taylor on December 31, 2006,and on December 31, 2007.

Had we selected December 31, 2003 as our valuation date, our solution would be

Table 7.4 Data for Example 7.12

Payments-Original Plan Payments-Revised Plan$3,000 on 12/31/03 $4,000 on 12/31/06

$2,000 on 12/31/05 x on 12/31/07

$3000 $2000

$40005%

x

5%

x

4000 1.05 x+ 3000 1.05 4 2000 1.05 2+=

4200 x+ 3000 1.21551 2000 1.10250+=

4200 x+ 3646.53 2205+=

x 3646.53 2205 4200–+ 1651.53= =

$4000$1651.53

4000 1.05 3– x 1.05 4–+ 3000 2000 1.05 2–+=

3455.36 x 1.05 4–+ 3000 1814.06+=

x 1.05 4– 4814.06 3455.36– 1358.70= =

x 1358.70 1.05 4 1358.70 1.21551 1651.51= ==

Page 227: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 7 Mathematics of Finance and Economics

7-16 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

We can also verify the result by application of a chronological sequence as shown in Table 7.5.

We should emphasize that these two groups of payments are equivalent to one another only for aninterest rate of . Implicit in our reasoning is the assumption that the creditor can reinvest eachsum of money he receives in a manner that continues to yield . Should there occur any varia-tion of the interest rate, then the equivalence of the two groups of payments becomes invalid. Forexample, assume that the creditor is able to reinvest his capital at a rate of only per cent. Forthis situation, the revised terms of payment are more advantageous to him since, by deferring thecollection of the money due him, he enables his capital to earn the higher rate of interest for alonger period of time.

In the preceding example, the replacement of one group of money values with an equivalent onewas accomplished with a known interest rate. Many problems arise in practice, however, in whichthe equivalent groups of money values are known, and it is necessary to determine the interestrate on which their equivalence is predicated. Problems of this nature can only be solved by atrial-and-error method, and if the exact interest rate is not one of those listed in the interesttables, it can be approximated by means of straight-line interpolation.

Example 7.13

Smith owed Jones the sum of due Dec. 31, 2000, and $4,000, due Dec. 31, 2002. BecauseSmith was unable to meet these obligations as they became due, the debt was discharged bymeans of a payment of on Dec. 31, 2003, and a second payment of on Dec. 31,2004. What annual interest rate was intrinsic in these payments?

Solution:

Let denote the interest rate. If the expression is expanded by the binomial theorem*

and all terms beyond the second are discarded, we obtain

Table 7.5 Chronological sequence in table form for Example 7.12

Value of first debt on 12/31/05 = = $3,307.50

Value of second debt on 12/31/05 = 2,000.00

Total principal on loan on 12/31/05 = 5,307.50

Interest earned in 2006 = = 265.38

Principal on loan on 12/31/06 = 5,572.88

Payment on 12/31/06 = 4,000.00

Principal on loan on 01/01/07 = 1,572.88

Interest earned in 2007 = = 78.64

Principal on loan on 12/31/07 = 1,651.52

Payment required on 12/31/07 = 1,651.52

3000 1.05 2

5307.50 0.05

1572.88 0.05

5%5%

4%

$1000

$2000 $3850

i 1 i+ n

Page 228: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 7-17Orchard Publications

Interest

(7.9)

We will apply this approximate value to obtain a first approximation of the value of . This proce-dure is tantamount to basing our first calculation on the use of simple rather than compound

interest. This approximation understates the value of , and the degree of error varies inproportion to .

Since the two groups of payments in this problem are equivalent, the value of one group equalsthe value of the other at any valuation date that we select. Equating the two groups at the end of2004 on the basis of simple interest, we obtain

or as a first approximation.

But because application of equation (7.9) yields an approximation, our computations have pro-duced an understatement of the value of each sum of money except the last. Moreover, since theamount of error increases as increases, it is evident that we have reduced the importance of themoney values having early valuation dates and inflated the importance of those having late valu-ation dates. The true rate, therefore, will be less than . Let us assume an rate. If thiswere the actual rate, then the payment required at the end of 2004 is determined as follows:

Since the actual payment was , the true interest rate is less than per cent. Let us trya rate.

Since this value is less than , we expect the interest rate to lie between and asshown on the graph of Figure 7.2.

* The binomial theorem is discussed in Chapter 11.

1 i+ n 1 ni+

i

1 i+ n

n

1 000 4i 1000+ 4 000 2i 4000++ 2000 i 2000+ 3850+=

4000i 8000i 2000i–+ 2000 3850 1000– 4000–+=

10000i 850=

i 0.085=

i 8.5%=

n

8.5% 8%x

1000 1.08 4 4000 1.08 2+ 2000 1.08 x+=

x 1000 1.08 4 4000 1.08 2 2000 1.08–+ 3866.09= =

$3850.00 8%7.5%

1000 1.075 4 4000 1.075 2+ 2000 1.075 x+=

x 1000 1.075 4 4000 1.075 2 2000 1.075–+ 3807.97= =

$3850.00 7.5% 8%

Page 229: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 7 Mathematics of Finance and Economics

7-18 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

Figure 7.2. Graph for Example 7.13

The interest rate between and can be found by applying straight-line interpolation aswe discussed on Chapter 2, Relation (2.48), that is,

For our example,

Therefore, the actual interest rate is .

The problem of calculating an interest rate is often encountered where an investment is madethat produces certain known returns at future dates and we wish to determine the rate of returnearned by the investment. The following example illustrates the procedure.

Example 7.14

An undeveloped lot was purchased in January, 1995, for . Taxes and assessments werecharged at the end of each year are as shown in Table 7.6.

The owner paid the charges for 1997 and 1998, but not for subsequent years. At the end of 2002,the lot was sold for , the seller paying the back charges at interest compounded annu-ally and also paying a commission of to a real estate agent. What rate of return was realizedon the investment?

7.5

3807.97

8.0

3866.093850.00

x (%)

y ($)

7.5% 8%

xi1

slope-------------- yi y1– x1+

1m---- yi y1– x1+= =

xy 3850=1

slope-------------- 3850.00 3807.97– 0.075+

13866.09 3807.97–

0.080 0.075–------------------------------------------------------------------------------------------ 42.03 0.075+= =

0.00558.12------------- 42.03 0.075+ 0.0786==

7.86%

$2000

$3000 7%5%

Page 230: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 7-19Orchard Publications

Interest

Solution:

The payment made by the owner at the end of 2002 for the back charges consisted of the follow-ing:

Next, we form the following two equivalent groups of money shown in Table 7.8.

Table 7.6 Data for Example 7.14

Year Taxes Paid

1997 30

1998 30

1999 200

2000 30

2001 30

2002 30

Table 7.7 Computations for Example 7.14

Year Computations $ Amount

1999 200 3 $245.01

2000 30 2 34.35

2001 30 32.10

Total back charges $311.46

2002 Taxes $30.00

2002 Real Estate Commission $3,000 $150.00

Total payment at end of 2002 $491.46

2002 Selling Price $3,000.00

2002 Net profit ($3,000.00 $491.46) $2,508.54

Table 7.8

Group 1 Disbursements Group 2 Receipts

Date Amount Date Amount

1/1/1997 $2,000.00 12/31/2002 $2508,54

12/31/1997 30.00

12/31/1998 30.00

Page 231: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 7 Mathematics of Finance and Economics

7-20 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

Let denote the investment rate. Using simple interest to obtain a first approximation and select-ing Dec. 31, 2002, as our valuation date, we obtain

or

from which

That is, as a first approximation, the interest rate is . But our approximation has giveninsufficient weight to the disbursements and therefore, the true investment rate is less than this.

To understand this, let us consider the factor . Using the binomial theorem and discardingall terms beyond the second, we obtain

(7.10)

It is obvious that this approximation understates the value of and the error varies in pro-portion to .

Let us try a approximation. The income required to yield this rate is found as follows:

or

Since the actual income was , the investment rate is less than . Let us try a rate. Then,

or

Since this value is less than , we expect the interest rate to lie between and as shown on the graph of Figure 7.3.

The interest rate between and can be found by applying straight-line interpolation aswe discussed on Chapter 2, Relation (2.48), that is,

i

2000 2000 6i+ 30 30 5i+ 30 30 4i++ + 2508.54=

12270i 2508.54 2060– 448.54= =

i 448.5412270---------------- 0.03655583 3.66%= =

3.66%

1 i+ n

1 i+ n 1 ni+

1 i+ n

n

3.5% y

2000 1.035 6 30 1.035 5 30 1.035 4+ + y=

yx 0.035= 2458.11 35.63 34.43+ + 2528.57= =

$2508.54 3.5% 3.0%

2000 1.03 6 30 1.03 5 30 1.03 4+ + y=

yx 0.030= 2388.10 34.78 33.77+ + 2456.65= =

$2508.54 3.0% 3.5%

3.0% 3.5%

xi1

slope-------------- yi y1– x1+

1m---- yi y1– x1+= =

Page 232: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 7-21Orchard Publications

Interest

Figure 7.3. Graph for Example 7.14

For our example,

Therefore, the actual interest rate is .

Effective Interest Rate

Consider the sum of to be deposited in a fund earning interest at the rate of perannum compounded quarterly. Since the interest is compounded quarterly, is merely a nom-inal interest rate; the true interest rate is per quarterly period. At the end of months, ortwo interest periods, this sum has expanded to

If this fund, instead of earning interest per quarterly period, were earning interest at the rateof per cent per semiannual period, then the principal at the end of any -month periodwould be the same. Hence, assuming that the principal is not withdrawn from the fund except atthe end of a -month period, we may regard the two interest rates as being equivalent to oneanother.

At the expiration of year, or four interest periods, the original sum of has expanded to

3.0

2456.65

3.5

2528.572508.54

x (%)

y ($)

xy 2508.54=1

slope-------------- 2508.54 2456.65– 0.03+

12528.57 2456.65–

0.035 0.030–------------------------------------------------------------------------------------ 51.89 0.03+= =

0.00571.92------------- 51.89 0.03+ 0.0336==

3.36%

$1000 8%8%

2% 6

P2 1000 1 0.02+ 2 1040.40= =

2%4.04% 6

6

1 $1000

P4 1000 1 0.02+ 4 1082.43= =

Page 233: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 7 Mathematics of Finance and Economics

7-22 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

Similarly, if this fund earned interest at the rate of per cent compounded annually, theprincipal at the end of each year would be the same. This interest rate, then, is also equivalent tothe given rate.

We have thus illustrated the equivalence of these three interest rates:

per quarterly period

per semiannual period

per annual period

If a given interest rate applies to a period less than year, then its equivalent rate for an annualperiod is referred to as its effective rate. Thus, the effective rate corresponding to a rate of perquarterly period is per cent. The effective rate is numerically equal to the interest earnedby a principal of for year.

In general, let

= nominal interest rate

= effective interest rate

= number of compoundings per year

Then,

(7.11)

Example 7.15

We wish to make a ratio comparison of the following two interest rates:

First rate, per annum compounded monthly = per month

Second rate, per annum compounded semiannually = per semiannual period

Since the two rates apply to unequal periods of time, a direct comparison is not possible. How-ever, we can establish a basis of comparison by determining the effective rate corresponding toeach:

Effective rate for compounded monthly

Effective rate for compounded semiannually

8.243%

2%

4.04%

8.243%

12%

8.243%$1.00 1

j

r

m

Effective rate r 1 jm----+

m1–= =

6% 1 2%

4% 2%

6%

r1 1 0.0612

----------+12

1– 6.168%= =

4%

Page 234: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 7-23Orchard Publications

Sinking Funds

Therefore,

The calculation of effective interest rates is therefore highly useful for comparative purposes.nt

7.3 Sinking Funds

We defined a sinking fund in Section 7.1. As a review, a sinking fund is an interest-earning fundin which equal deposits are made at equal intervals of time. Thus, if the sum of is placed ina fund every months, a sinking fund has been established. A sinking fund is generally createdfor the purpose of gradually accumulating a specific sum of money required at some future date.For example, when a corporation has floated an issue of bonds it will often set aside a portion ofits annual earnings to assure itself sufficient funds to retire the bonds at their maturity. Themoney reserve need not remain idle but can be invested in an interest-earning fund.

Assume that a business firm plans to purchase a new machine years hence, the purchase pricebeing . To accumulate this sum, it will make annual deposits in a sinking fund for the next

years, the fund earning interest at the rate of per annum. How much should each depositbe? (In reality, it would be pointless to deposit the fifth sum of money, since the fund will beclosed at the same date. However, it will simplify our discussion if we consider that the deposit isactually made.)

Now, if the fund did not earn interest, the required annual deposit would be simply or. However, since the principal in the fund will be continuously augmented through the

accrual of interest, the actual deposit required will be somewhat less than . We shall soonderive a formula for calculating the required deposit.

In the discussion that follows, we shall assume, if nothing is stated to the contrary, that the fol-lowing conditions prevail:

1. The sinking fund is established at the beginning of a specific interest period. We shall identifythe date on which the fund is established as the origin date of the fund.

2. The interval between successive deposits, known as the deposit period, is equal in length to aninterest period.

3. Each deposit is made at the end of an interest period. Consequently, there is a time interval ofone interest period between the date the fund is established and the date the first deposit ismade.

r2 1 0.042

----------+2

1– 4.04%= =

r1r2---- 6.168%

4.04%------------------ 1.527= =

$1003

5$10000

5 4%

$10000 5$2000

$2000

Page 235: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 7 Mathematics of Finance and Economics

7-24 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

4. The date at which a sinking fund is to terminate is always the last day of a specific interestperiod. We shall call this date the terminal date of the fund. The principal in the fund at its ter-mination will, of course, include the interest earned during the last period and the final depositin the fund, made on the terminal date.

A sinking fund satisfying the above requirements is referred to as an ordinary sinking fund. Theduration of the fund is referred to as the term of the fund.

To illustrate the above definitions, assume that a sinking fund is created on Jan. 1, 2003, to con-sist of deposits of each. The interest (and deposit) period of the fund is year. Then

Origin date = Jan. 1, 2003

Date of first deposit = Dec. 31, 2003

Terminal date (and date of last deposit) = Dec. 31, 2012

Term of fund = years

At the end of each interest period, the principal in the fund increases abruptly as a result of thecompounding of the interest earned during that period and the receipt of the periodic deposit.Where the principal in a sinking fund is to be calculated at a date intermediate between its originand termination, we shall in all cases determine the principal on the last day of a particular inter-est period, immediately after these two events have transpired.

Example 7.16

The sum of is deposited in a sinking fund at the end of each year for years. If the interestrate is compounded annually, what is the principal in the fund at the end of the fourth year?

Solution:

The development of the principal in the fund is recorded graphically in Figure 7.4 by the methodof chronological sequence. This graph is intended solely as an aid in visualizing the growth of theprincipal, not as a means of achieving a graphical solution of the problem.

At the end of the first year, the sum of , represented by AB, is placed in the fund. During thesecond year, the principal earns interest at the rate of and amounts to at the end of thesecond year (CD). A deposit of at this time (DE) enhances the principal to the amount of

(CE). This two-cycle process is repeated each year until the final deposit KL is made. Thegrowth of the principal is recorded in Table 7.9.

10 $1000 1

10

$500 46%

$5006% $530

$500$1030

Page 236: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 7-25Orchard Publications

Sinking Funds

Figure 7.4. Graph for Example 7.16

Thus, the principal in the sinking fund at the end of the fourth year is .

Of course, we could have computed the principal at the end of the fourth year as shown in Table7.10.

We can derive an equation that computes the principal at the end of a period in a sinking fund asfollows:

Let

= periodic deposit

Table 7.9 Computations for Example 7.16

Year Principal in fund atbeginning of period Interest earned Deposit at end of period

Principal in fund at end of period

1 0.00 0.00 500.00 500.00

2 500.00 30.00 500.00 1030.00

3 1030.00 61.80 500.00 1591.80

4 1591.80 95.51 500.00 2187.31

End

Yea

r 1

Time (years)

Pri

ncip

al (

$)

A

B

C

D

E

F

G

H

J

L

End

Yea

r 2

End

Yea

r 3

End

Yea

r 4

K

$2187.31

R

Page 237: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 7 Mathematics of Finance and Economics

7-26 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

= interest rate

= number of deposits made (number of interest periods contained in the term of the fund)

= principal in the sinking fund at the end of the period

To apply the method of chronological sequence, we must observe that the principal at the end ofany period equals the principal at the end of the preceding period multiplied by the factor and augmented by the periodic deposit . That is,

(7.12)

where has any integral value less than . Hence, we obtain the following relations:

For convenience, we shall reverse the sequence of the terms, thereby obtaining

(7.13)

We recognize the right side of this equation as a geometric series where is the first term and theratio of each term to the preceding term is . In Chapter 2, we derived Equation (2.61)which is repeated here for convenience.

(7.14)

Table 7.10 Alternate Computations for Example 7.16Deposit Number Amount Number of years in fund Value at the end of the fourth year

1 $500.00 3 = $595.51

2 500.00 2 = 561.80

3 500.00 1 = 530.00

4 500.00 0 = 500.00

Total = 2187.31

500 1.06 3

500 1.06 2

500 1.06

500

i

n

Sn nth

1 i+

R

Sr Sr 1– 1 i+ R+=

r n

S1 R=

S2 R 1 i+ R+=

S3 R 1 i+ 2 R 1 i+ R+ +=

Sn R 1 i+ n 1– R 1 i+ n 2– R 1 i+ R+ + + +=

Sn R R 1 i+ R 1 i+ 2 R 1 i+ n 2– R 1 i+ n 1–+ + + +=

R1 i+

sn a11 rn–1 r–------------- a1

rn 1–r 1–-------------= =

Page 238: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 7-27Orchard Publications

Sinking Funds

Applying this equation to the sinking-fund principal, but substituting for and (1 + i) for ,we obtain

or

(7.15)

For the special case where the periodic deposit is , we shall use the notation to denotethe principal in the fund at the end of the period. Hence,

(7.16)

For the general case where the periodic deposit has any value other than , the principal can be expressed in terms of as

(7.17)

Equation (7.17) is useful when a math tables book such as CRC Standard Mathematical Tablesthat contains financial tables is available.

Example 7.17

A sinking fund consists of annual deposits of each, with interest earned at the rate of compounded annually. What is the principal in the fund at its terminal date?

Solution:

For this example, , , and . Using Equation (7.15) we get

Check with Microsoft Excel: The function =FV(0.04,15, 1000) returns $20,023.59.

In many problems, the principal in the sinking fund at its terminal date is the known quantity,and we must determine the periodic deposit required to accumulate this principal. Solving Equa-tion (7.15) for we get

(7.18)

R a1 r

Sn R 1 i+ n 1–1 i+ 1–

---------------------------=

Sn R 1 i+ n 1–i

---------------------------=

R $1 sn

nth

sn1 i+ n 1–

i---------------------------=

R $1 Sn

sn

Sn Rsn=

15 $10004%

R 1000= i 0.04= n 15=

Sn R 1 i+ n 1–i

--------------------------- 1000 1 0.04+ 15 1–0.04

-------------------------------------- 1000 20.05359 20 023.59= = = =

R

R Sni

1 i+ n 1–---------------------------=

Page 239: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 7 Mathematics of Finance and Economics

7-28 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

Example 7.18

A corporation is establishing a sinking fund for the purpose of accumulating a sufficient capital toretire its outstanding bonds at maturity. The bonds are redeemable in years, and their maturityvalue is . How much should be deposited each year if the fund pays interest at the rateof ?

Solution:

For this example, , , and . Using Equation (7.18) we get

Check with Microsoft Excel: The function =PMT(0.03,10,0, 150000) returns $13,084.58.

7.4 Annuities

Annuity: A series of equal payments or receipts occurring over a specified number of periods.

Ordinary annuity: A series of equal payments or receipts occurring over a specified number ofperiods with the payments or receipts occurring at the end of each period.

Annuity due: A series of equal payments or receipts occurring over a specified number of periodswith the payments or receipts occurring at the beginning of each period.

NOTE: While technically correct, the last two definitions shown above can be a bit confusing.Whether a cash flow appears to occur at the end or the beginning of a period often depends onour perspective. For example, the end of year is also the beginning of year .

Therefore, the real key to distinguishing between an ordinary annuity and an annuity due is thepoint at which either a future or present value is to be calculated. Remembering the followingcharacteristics should help us identify the type of annuity that we are dealing with:

1. For an ordinary annuity, future value is calculated as of the last cash flow, while present valueis calculated as of one period before the first cash flow.

2. For an annuity due, future value is calculated as of one period after the last cash flow, whilepresent value is calculated as of the first cash flow.

The equations used in the computations of sinking funds apply also to annuities.

Example 7.19

Suppose that on January 1, 2003 our bank account was , and withdrawals of eachwere made at the end of each year for years. If the account earned annual interest, whatwould be the balance in the account at the end of 2006 immediately after the last withdrawal ismade?

10$150 000

3%

Sn 150000= i 0.03= n 10=

R Sni

1 i+ n 1–--------------------------- 150000 0.03

1 0.03+ 10 1–-------------------------------------- 150000 0.08723 $13 084.58= = = =

2 3

$6000 $5004 4%

Page 240: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 7-29Orchard Publications

Annuities

Solution:

The computations are shown in Table 7.11.

As shown in the table above, the principal at the end of 2006 would be .

In many instances, it is desirable to find the value of these sums of money at the origin date ofthe annuity. The equation that will compute the amount at the origin date is derived as follows:

We recall from (7.7) that

(7.19)

and from (7.15) that

(7.20)

As stated earlier, these equations apply to both sinking funds and annuities. For convenience, wewill denote (7.19) as

(7.21)

and (7.20) as

(7.22)

By substitution of (7.22) into (7.21) we get

(7.23)

Table 7.11 Computations for Example 7.19

Year

Principal at beginning Interest Earned

End-of-yearwithdrawal Principal at end of period

2003

2004

2005

2006

$6000.00 6000.00 0.04 $240.00= $500.00 6000.00 240.00 500.00–+ $5740.00=

5740.00 5740.00 0.04 $229.60= $500.00 5740.00 229.60 500.00–+ $5469.60=

5469.60 5469.60 0.04 $218.78= $500.00 5469.60 218.78 500.00–+ $5188.38=

5188.38 5188.38 0.04 $207.54= $500.00 5188.38 207.54 500.00–+ $4895.92=

$4895.92

n

P n– P0 1 i+ n–=

Sn R 1 i+ n 1–i

---------------------------=

PVannuity FVannuity 1 i+ n–=

FVannuity Payment 1 i+ n 1–i

---------------------------=

PVannuity Payment 1 i+ n 1–i

--------------------------- 1 i+ n–=

Payment 1 1 i+ n––i

-----------------------------=

Page 241: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 7 Mathematics of Finance and Economics

7-30 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

Example 7.20

Suppose that an annuity has been established that will enable us to receive at the end ofeach year for years starting with December 31, 2003. If the interest rate is , what amountcan we receive on January 1, 2003 should we decide to close this annuity?

Solution:

Equation (7.23) is applicable for this example. Thus,

Example 7.21

A business firm must make a disbursement of at the end of each year from 2004 to 2007inclusive. In order to meet the obligations as they fall due, it must deposit in a fund at the begin-ning of 2004 an amount of money that will be just sufficient to provide the necessary payments. Ifthe interest rate is compounded annually, what sum should be deposited?

Solution:

Let denote the sum to be deposited in the fund on Jan. 1, 2004. The controlling relationship is

This relationship holds for any valuation date we select; the most convenient date to use is obvi-ously the beginning of 2004, which is both the date of the deposit and the origin date of the annu-ity. Then,

Example 7.22

A father wishes to establish a fund for his newborn son’s college education. The fund is to pay on the 18th, 19th, 20th, and 21st birthdays of the son. The fund will be built up by the

deposit of a fixed sum on the son’s 1st to 17th birthdays, inclusive. If the fund earns , whatshould the yearly deposit into the fund be?

Solution:

Let denote the periodic deposit in the fund. Selecting the end of the 17th year as our valuationdate, we have

$3005 6%

PVannuity 300 1 1 0.06+ 5––0.06

-------------------------------------- 300 4.21236 1263.71= = =

$800

3%

x

x Value of deposit Value of annuity= =

PVannuity 800 1 1 0.03+ 3––0.03

-------------------------------------- 800 3.7171 2973.68= = =

$2 0002%

R

PVannuity Payment 1 1 i+ n––i

----------------------------- 20001 1 0.02+ 4––0.02

-------------------------------------- 2000 3.80773 $7615.46= = = =

Page 242: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 7-31Orchard Publications

Annuities

That is, at the end of the 17th year, the fund must have accumulated .

Now, we must find the annual payments that must be deposited in order to accumulate thisamount in 17 years. Solving (7.22) for , we get

Determining the Interest Rate of an Annuity

In many problems pertaining to annuities that arise in practice, the known quantities are thevalue of the annuity at either the origin or terminal date and the amount of the periodic payment,while the interest rate by which the given quantities are related is unknown. This is often true, forexample, where an asset is purchased on the installment plan. The purchaser knows the purchaseprice of the asset and the periodic payment he is obligated to make, but he is not directly aware ofthe interest rate implicit in the loan. Only an approximate solution of this type of problem is pos-sible, and a solution by straight-line interpolation yields results of a sufficient degree of accuracy.

Example 7.23

An asset costing was purchased on the installment plan, the terms of sale requiring thatthe buyer make a down payment of and five annual payments of each. The first ofthese periodic payments is to be made year subsequent to the date of purchase. What is theinterest rate pertaining to this loan?

Solution:

From (7.23),

(7.24)

Assuming that is the value at the origin date, this value is and the is . Substitution of these values into (7.24) and rearranging yields

Obviously, it is a formidable task to solve this equation for the interest rate . Instead, we con-struct the following spreadsheet where we observe that the interest rate corresponding to thevalue at the origin is between and .

$7615.46

Payment

Payment FVannuityi

1 i+ n 1–--------------------------- 7615.46 0.02·

1 0.02+ 17 1–-------------------------------------- 7615.46 0.04997 $380.54= = = =

$5 000$2 000 $720

1

PVannuity Payment 1 1 i+ n––i

-----------------------------=

PVannuity 5000 2000– 3000=

Payment $720

1 1 i+ n––i

----------------------------- 3000720

------------=

i

6% 7%

Page 243: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 7 Mathematics of Finance and Economics

7-32 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

We will use the graph of Figure 7.5 below to apply straight-line interpolation

Figure 7.5. Graph for Example 7.23

For our example,

Therefore, the interest rate is .

i R n Value at origin date1% 720 5 3494.472% 720 5 3393.693% 720 5 3297.394% 720 5 3205.315% 720 5 3117.226% 720 5 3032.907% 720 5 2952.148% 720 5 2874.759% 720 5 2800.55

10% 720 5 2729.37

6.00

3032.90

7.00

2952.143000.00

x (%)

y ($)

xi1

slope-------------- yi y1– x1+

1m---- yi y1– x1+= =

xy 3000.00=1

slope-------------- 3000.00 3032.90– 0.06+

12952.14 3032.90–

0.07 0.06–------------------------------------------------------------------------------------------ 32.90– 0.06+= =

0.0180.76–

---------------- 32.90– 0.06+ 0.06407==

6.4%

Page 244: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 7-33Orchard Publications

Amortization

Check with the Microsoft Excel IRR function: In a blank spreadsheet we enter the values 3000(5000 2000), 720, 720, 720, 720, and 720 in A1 through A6 respectively, and we use theformula =IRR(A1:A6) and Excel returns .

7.5 Amortization

Amortization is the liquidation (a debt, such as a mortgage) by installment payments or paymentinto a sinking fund. In the course of doing business, we will likely acquire what are known asintangible assets. These assets can contribute to the revenue growth of your business and, as such,they can be expensed against these future revenues. An example of an intangible asset is whenyou buy a patent for an invention.

Calculating amortization

The formula for calculating the amortization on an intangible asset is similar to the one used forcalculating straight-line depreciation*. We divide the initial cost of the intangible asset by theestimated useful life of the intangible asset. The amortization per year is computed with the for-mula

(7.25)

Example 7.24

Suppose that it costs to acquire a patent and it has an estimated useful life of ten years.The amortization per year is

The amount of amortization accumulated since the asset was acquired appears on the balancesheet as a deduction under the amortized asset.

The formula of (7.25) assumes that the interest rate is zero. However, when a debt such as amortgage is amortized over a number of years, there is always an interest rate associated with thatdebt. In this case, the following formula is used.

(7.26)

Amortization tables can be easily constructed with spreadsheets such as that shown on Figure 7.6.For this spreadsheet we have assumed an annual interest rate of and thus the monthlyinterest rate is computed and shown in cell C8 as =0.075/12.

* We will discuss depreciation in Chapter 8

6.402%

Amortization per year Initial tcosUseful life-----------------------------=

$10,000

Amortization per year Initial tcosUseful life----------------------------- $10000

10------------------ $1000= = =

Payment Principal Interest1 1 Interest+ n––------------------------------------------------=

7.5%

Page 245: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 7 Mathematics of Finance and Economics

7-34 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

Figure 7.6. 30-Year Amortization Table

With Microsoft Excel, in all arguments, cash we pay out such as deposits to savings, is representedby negative numbers; cash we receive, such as dividend checks, is represented by positive num-bers.

Other formulas in other cells are as follows:

C9: =PMT(C8,C7,-C6)

B16: =C9

C16: =C6*C8

D16: =B16 C16

E16: =IF(AND($F$7<=A16,$F$8>=A16),MIN($F$6,C6 D16),0)

F16: =C6 D16 E16

B17: =MIN($C$9,F16+C17)

C17: =F16*$C$8

D17: =B17 C17

E17:= IF (AND($F$7<=A17,$F$8>=A17) ,MIN($F$6 ,F16 D17) ,IF(AND($F$10<=A17,$F$11>=A17),MIN($F$9,F16-D17),0))

F17: =F16 D17 E17

The remaining entries in columns B though F are obtained by copying B17:F17 to B18:F549

123456789101112131415161718

A B C D E F30 YEAR MORTGAGE LOAN

InputsTerms of Loan

Principal $500,000Term 360Interest (Month) 0.625%Payment $3,496.07

Loan Payment Schedule

Payment Regular Payment Interest Principle Extra PrincipalPeriod Year 2002 Expense Payment Principal Paid Balance

1 $3,496.07 $3,125.00 $371.07 $0.00 $499,628.932 $3,496.07 $3,122.68 $373.39 $0.00 $499,255.543 $3,496.07 $3,120.35 $375.73 $0.00 $498,879.81

Page 246: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 7-35Orchard Publications

Amortization

Example 7.25

A second mortgage is being amortized by means of equal yearly installments at aninterest rate of . The agreement provides for paying off the mortgage in a lump sum at anytime with an amount equal to the unpaid balance plus a charge of of the unpaid balance.What would have to be paid to discharge the mortgage after payments have been made?

Solution:

Each yearly installment is found by

For our example,

To find the unpaid balance at the end of years, we construct the spreadsheet of Figure 7.7.

Figure 7.7. Spreadsheet for Example 7.25

$10,000 206%

1%10

Payment Principal Interest1 1 Interest+ n––------------------------------------------------=

Payment 10000 0.061 1 0.06+ 20––---------------------------------------- 10000 0.06

1 0.3118–------------------------- 871.85= = =

10

20 YEAR MORTGAGE LOAN PAID IN 10 YEARS

InputsTerms of Loan Extra Payments

Principal $10,000 Extra Amount $0.00Term 20 Start Period $0.00Interest (Month) 6.00% End Period $0.00Payment $871.85

Loan Payment Schedule

Payment Regular Payment Interest Principle Extra PrincipalPeriod Expense Payment Principal Paid Balance

1 $871.85 $600.00 $271.85 $0.00 $9,728.152 $871.85 $583.69 $288.16 $0.00 $9,440.003 $871.85 $566.40 $305.45 $0.00 $9,134.554 $871.85 $548.07 $323.77 $0.00 $8,810.785 $871.85 $528.65 $343.20 $0.00 $8,467.586 $871.85 $508.05 $363.79 $0.00 $8,103.797 $871.85 $486.23 $385.62 $0.00 $7,718.178 $871.85 $463.09 $408.76 $0.00 $7,309.429 $871.85 $438.57 $433.28 $0.00 $6,876.14

10 $871.85 $412.57 $459.28 $0.00 $6,416.86

Page 247: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 7 Mathematics of Finance and Economics

7-36 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

We can also use the equation

where

= specified period of the loan

= actual period when the loan is paid in full

For this example,

7.6 Perpetuities

As stated earlier, a perpetuity is a constant stream of identical cash flows with no maturity date. Inother words, a perpetuity is an annuity that continues indefinitely. To provide for a perpetuity, itis necessary to deposit in a fund a sum of money of such magnitude that the interest earnedbetween successive payments exactly equals the amount of the periodic payment, thereby main-taining the original principal permanently intact. Thus,

(7.27)

Example 7.26

An individual wishes to establish a scholarship for a university of annually and that thefund in which the money is to be held earns interest per annum. To earn interestannually, the sum to be deposited is

Of course, this sum must be deposited year prior to the date of the first payment.

In the above example, the payment period coincided with the interest period, but this may not bealways the case. In general, let

= periodic payment of a perpetuity

= interest rate

= number of interest periods contained in one payment period

=principal to be deposited in the fund one payment period prior to the date of the first pay-ment

Unpaid balance Payment 1 1 i+ n r–––i

---------------------------------------=

n

r

Unpaid balance 871.85 1 1 0.06+ 20 10–––0.06

---------------------------------------------------- 6486.89= =

Amount deposited Earned interestInterest rate

------------------------------------------=

$5,0004% $5,000

Amount deposited 50000.04------------ $125000= =

1

R

i

m

M

Page 248: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 7-37Orchard Publications

Valuation of Bonds

Equating the periodic payment to the interest earned by in one payment period (= inter-est periods), we obtain

or

(7.28)

Example 7.27

What amount must be donated to build an institution having an initial cost of , providean annual upkeep of , and have at the end of each -year period to rebuild theinstitution. Assume that invested funds return .

Solution:

The annual upkeep of can be regarded as a single disbursement made at the end of eachyear. The required payments can be grouped in the following manner:

1. An initial payment of to construct the building.

2. A perpetuity consisting of payments of each made at -year intervals.

3. A perpetuity consisting of annual payments of each for maintenance.

or

7.7 Valuation of Bonds

Generally, the price at which a bond is purchased is not identical with the face value of the bond.When the purchase price of a bond does coincide with its par value, it is said to be purchased atpar; when the purchase price exceeds the par value it is said to be purchased above par, or at apremium; finally, when the purchase price is below the par value, it is said to be purchased belowpar, or at a discount.

The difference between the par value of a bond and its purchase price is termed the premium ordiscount, whichever applies. For example, if the face value of a bond is and it sells for

, it has been sold at a discount of ; if the same bond sells for , then it has been

R M m

M 1 i+ m M– R=

M 1 i+ m 1– R=

M R1 i+ m 1–

----------------------------=

$500,000$50,000 $500,000 50

4%

$50,000

$500,000

$500,000 50

$50,000

Payments Initial payment Perpetuity at 50-year intervals Perpetuity for maintenance+ +=

M 500000 5000001 0.04+ 50 1–

-------------------------------------- 500000.04

---------------+ + 500000 5000006.107

------------------ 500000.04

---------------+ += =

500000 81873.26 1250000+ + 1 831 873.26==

$1000$940 $60.00 $1020

Page 249: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 7 Mathematics of Finance and Economics

7-38 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

sold at a premium of . We shall hereafter refer to the periodic interest payments received bythe bondholder as the dividends and to the interval between successive dividends as the dividendperiod.

We will assume that the economic conditions remain unchanged. Accordingly, we will assumethat both the price and the prevailing interest rate remain unaltered during the entire period.Therefore, if an investor has purchased a bond at its date of issue at a price to yield a return of on his investment, it follows that at any date prior to the maturity of the bond he can transfer thebond to a new purchaser at such price as to maintain a return on his original investment andto yield the new investor the same rate of return. The value of a bond at any date intermediatebetween its issue and its redemption is termed its book value.

Example 7.28

Assume that a bond of face value, redeemable at par, and earning interest at the rate of annually is purchased by an investor for at a date year prior to its maturity. What is

the rate of return at the end of the year?

Solution:

At the end of the year the investor receives the following sums of money:

Calculating the Purchase Price of a Bond

We will now present an example to find out the price we should pay for a bond to yield a stipu-lated investment rate. We will assume that the date of purchase coincides with the beginning of adividend period.

Example 7.29

A bond, redeemable at par in years, pays dividends at the rate of per year. Computethe purchase price of the bond and the book value at the beginning of each dividend period if thebond is purchased to yield a rate of return of

a.

b.

c.

$20

6%

6%

$10006% $980 1

Dividend 6% of $1000 $60.00=

Redemption price face value 1000.00=

Total income at end of year 1060.00=

Investment at beginning of year 980.00=

Earning for year 80.00=

Rate of return on investment 80 980 8.16%= =

$1000 5 5%

5%

8%

3%

Page 250: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 7-39Orchard Publications

Valuation of Bonds

Solution:

a. Since the investment rate equals the dividend rate, the purchase price of the bond at its dateof issue equals its par value of . At date of issue the bond is worth and during thefirst year, the bond earns interest at the rate of and therefore attains the value of atthe end of that date. At this date, however, a dividend of is received by the bondholderrestoring the bond to its original value of . This process is repeated every period. Theresult is that at the beginning of each dividend period the value of the bond has reverted to itspar value.

b. The sums of money which the bondholder is to receive are the following:

1. The series of five annual dividends, each of which is of the face value, or . Thesedividends constitute an annuity whose value at date of issue of the bond, based on a rate of

, is given by Equation (7.24) as

2. The redemption value of the bond, , which will be received years after the date ofpurchase. The value of this sum at date of purchase is by Equation (7.19)

Then, the purchase price of the bond is

Hence, the bond is purchased at a discount of

The book value of the bond at the commencement of each subsequent year is computed byrepeating the above steps. The results are shown in Table 7.12.

c. We will follow the same method of solution as in Part (b) with all computations based on aninterest rate of . The computations are shown Table 7.13.

The first line in Table 7.13 indicates that the purchase price is

The bond is, therefore, purchased at a premium of .

$1000 $10005% $1050

$50$1000

5% $50

8%

PVannuity Payment 1 1 i+ n––i

----------------------------- 50 1 1 0.08+ 5––0.08

-------------------------------------- 50 3.99271 199.64= = = =

$1000 5

P n– P0 1 i+ n– 1000 1 0.08+ 5– 1000 0.68058 680.58= = = =

199.64 680.58+ 880.22=

1000.00 880.22– 119.78=

3%

Purchase price 50 1 1 0.03+ 5––0.08

-------------------------------------- 1000 1 0.03+ 5–+ 228.99 862.61+ $1091.60= = =

1091.60 1000.00– $91.60=

Page 251: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 7 Mathematics of Finance and Economics

7-40 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

Table 7.12 Computations for Part (b), Example 7.29Beginningof year Value of future dividends Redemption price Book value of bond

1

2

3

4

5

End of 5th year

0.00 1000.00 1000.00

Table 7.13 Computations for Part (c), Example 7.29Beginningof year Value of future dividends Redemption price Book value of bond

1

2

3

4

5

End of 5th year

0.00 1000.00 1000.00

50 1 1.08 5––0.08

----------------------------- $199.64=1000 1.08 5– $680.58= 199.64 680.58+ $880.22=

50 1 1.08 4––0.08

----------------------------- 165.61=1000 1.08 4– 735.03= 165.61 735.03+ 900.64=

50 1 1.08 3––0.08

----------------------------- 128.85=1000 1.08 3– 793.83= 128.85 793.83+ 922.68=

50 1 1.08 2––0.08

----------------------------- 89.16=1000 1.08 2– 857.34= 89.16 857.34+ 946.50=

50 1 1.08 1––0.08

----------------------------- 46.30=1000 1.08 1– 925.93= 46.30 925.93+ 972.23=

50 1 1.03 5––0.03

----------------------------- $228.99=1000 1.03 5– $862.61= 228.99 862.61+ $1091.60=

50 1 1.03 4––0.03

----------------------------- 185.85=1000 1.03 4– 888.49= 185.85 888.49+ 1074.34=

50 1 1.03 3––0.03

----------------------------- 141.43=1000 1.03 3– 915.14= 141.43 915.14+ 1056.57=

50 1 1.03 2––0.03

----------------------------- 95.67=1000 1.03 2– 942.60= 95.67 942.60+ 1038.27=

50 1 1.03 1––0.03

----------------------------- 48.54=1000 1.03 1– 970.87= 48.54 970.87+ 1019.41=

Page 252: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 7-41Orchard Publications

Valuation of Bonds

Total Periodic Bond Disbursement

To accumulate the funds necessary to retire an issue of bonds at its maturity, the seller must makeperiodic deposits in a sinking fund. Let us assume that the deposit period of the fund coincidingwith the dividend period of the bonds. Also let

= total face value of the bonds

= total redemption value of the bonds

= dividend rate of the bonds

= interest rate of sinking fund

The total disbursement pertaining to the bonds which the seller must make at the end of eachperiod consists of the following:

1. The periodic dividend payable to the bondholders. This amount is computed as

(7.29)

2. The periodic contribution to the sinking fund

(7.30)

Therefore, the total periodic disbursements (annual costs) are

(7.31)

Example 7.30

A community wishes to purchase an existing utility valued at by selling bondsthat will mature in years. The money to retire the bonds will be raised by paying equal annualamounts into a sinking fund that will earn per cent. The bonds will be sold at par. What willbe the total annual cost of the bonds until they mature?

Solution:

For this example , , , and . By substitutioninto (7.31) we get

F

M

d

i

D

D Fd=

R

R M i1 i+ n 1–

---------------------------=

Periodic disbursements D R+ Fd M i1 i+ n 1–

---------------------------+= =

$5,000,000 5%30

4%

F M 5 000 000= = d 0.05= i 0.04= n 30 years=

Annual disbursements 5 000 000 0.05 5 000 000 0.041 0.04+ 30 1–

--------------------------------------+=

250 000 89 150.50+ 339 150.50==

Page 253: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 7 Mathematics of Finance and Economics

7-42 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

Example 7.31

A municipality wishes to raise funds for improvements by issuing bonds. There is available per year for interest payments and retirement of the bonds at above face value.The interest rate of the sinking fund is . What should be the amount of the bond issue if allthe bonds are to be retired in years?

Solution:

For this example , , , and . By substitution into(7.31) we get

or

and solving for we get .

Calculation of Interest Rate of Bond

In the previous examples we calculated the purchase price of a bond corresponding to a particularinterest rate. In many cases, however, the purchase price of a bond is the known quantity, and it isnecessary to determine the investment rate secured by the purchaser. A calculation of this natureis also required to enable the issuing corporation to determine the true rate of interest it is payingfor borrowed money. The basis for calculating this interest rate is not the actual selling price ofthe bonds but rather the sum of money remaining after the payment of administrative and legalexpenses.

Assuming there are no bond tables available for obtaining the interest rate corresponding to agiven purchase price, we shall calculate the approximate rate using straight line approximation.

Example 7.32

Williams paid for a bond that pays per year. In years the bond will beredeemed for . What net rate of interest will Williams get on his investment?

Solution:

Let denote the interest rate. Evaluating all sums at the maturity date, we get

5.5% $200,00010%

3%20

M 1.10F= d 0.055= i 0.03= n 20 years=

Annual disbursements 200 000= 0.055F 1.10F 0.031 0.03+ 20 1–

--------------------------------------+=

0.055F 1.10F 0.03722+=

0.055F 0.041F+ 200000=

0.096F 200000=

F F $2 083 333.33=

$11,000 $10,000 $400 20$10,500

i

11000 1 i+ 20 400 1 i+ 20 1–i

----------------------------- 10500+=

Page 254: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 7-43Orchard Publications

Valuation of Bonds

To obtain a first approximation, we substitute for the expression . Then

Solving for we get as a first approximation

Since we have understated the value both of the investment and of the periodic divi-dends, it is reasonable to presume that this value does not deviate markedly from the true value.Therefore, let us compute at and at and perform straight line approximation asbefore.

At we have

At we have

Applying straight-line interpolation, we obtain

For our example,

or approximately.

1 ni+ 1 i+ n

11000 1 20i+ 400 10500+ 400 20 10500+= =

i

220000i 18500 11000–=

i 7500220000------------------ 0.0341 3.41%= = =

$11,000

3.0% 3.5%

3.0%

11000 1.03 20 11000 1.80611 19 867.20= =

400 1 0.03+ 20 1–0.03

-------------------------------------- 400 26.87037 10 748.20= =

Redemption price for 3.0% rate 19 867.20 10 748.20– $9 119.00= =

3.5%

11000 1.035 20 11000 1.98979 21 887.70= =

400 1 0.035+ 20 1–0.035

----------------------------------------- 400 28.27968 11 319.90= =

Redemption price for 3.5% rate 21 887.70 11 319.90– $10 578.80= =

xi1

slope-------------- yi y1– x1+

1m---- yi y1– x1+= =

xy 10 500=1

slope-------------- 10 500.00 9 119.00– 0.03+

110 578.80 9 119.00–

0.035 0.030–------------------------------------------------------------------------------------------------------------ 1 381.00 0.03+= =

0.0051 456.80---------------------- 1 381.00 0.03+ 0.03474==

3.47%

Page 255: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 7 Mathematics of Finance and Economics

7-44 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

7.8 Spreadsheet Financial Functions

Spreadsheets such as Microsoft Excel, Lotus 1-2-3, and Quattro Pro have built-in financial func-tions that we can use to obtain quick answers. To appreciate the usefulness of these functions, wepresent the following example which we will solve by classical methods.

Microsoft Excel solves for one financial argument in terms of the others. If the argument rate isnot zero, then,

(7.32)

If , the following formula is used.

(7.33)

In equations (7.32) and (7.33) the arguments are defined as follows:

pv = present value or the lump sum amount that a series of future payments is worth at thepresent.

rate = the interest rate per period. For example, if we obtain an automobile loan at a annualinterest rate and make monthly payments, our interest rate per month is , or .Accordingly, we must enter , or , or , into the formula as the rate.

nper = the total number of payment periods in an annuity. For example, if we get a four-year carloan and make monthly payments, our loan has . We must enter into theformula for nper.

pmt = the payment made each period and cannot change over the life of the annuity. Typically,pmt includes principal and interest but no other fees or taxes. For example, the monthly paymentson a , -year car loan at are . We must enter into the formula asthe pmt.

type = the number 0 or 1 which indicates when payments are due. If 0, the payments are due atthe end of the period. If 1, the payments are due at the beginning of the period.

fv = the future value, or a cash balance we want to attain after the last payment is made. If fv isomitted, it is assumed to be (the future value of a loan, for example, is ). For example, if wewant to save to pay for a special project in years, then is the future value. Wecould then make a conservative guess at an interest rate and determine how much we must saveeach month.

The Microsoft Excel financial functions are listed below.

pv 1 rate+ nper pmt 1 rate type+1 rate+ nper 1–

rate------------------------------------------- fv++ 0=

provided that rate 0

rate 0=

pmt nper pv fv+ + 0=

10%10% 12 0.83%

10% 12 0.83% 0.0083

4 12 48 periods= 48

$10,000 4 12% $263.33 263.33–

0 0$50,000 18 $50,000

Page 256: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 7-45Orchard Publications

Spreadsheet Financial Functions

PV Function

The PV function returns the present value of an investment. The present value is the totalamount that a series of future payments is worth now. For example, when we borrow money, theloan amount is the present value to the lender.

This function also computes the present value of an ordinary annuity. An ordinary annuity is aseries of payments made at equally spaced intervals.

The present value pv of an annuity allows us to compare different investment alternatives orpotential obligations.

The formula for computing the present value of an ordinary annuity is

(7.34)

The syntax for Excel is

=PV(rate,nper,pmt,fv,type) where*

rate = the interest rate per period. For example, if we obtain an automobile loan at a annualinterest rate and make monthly payments, our interest rate per month is , or .Accordingly, we must enter , or , or , into the formula as the rate.

nper = the total number of payment periods in an annuity. For example, if we get a four-year carloan and make monthly payments, our loan has . We must enter into theformula for nper.

pmt = the payment made each period and cannot change over the life of the annuity. Typically,pmt includes principal and interest but no other fees or taxes. For example, the monthly pay-ments on a , -year car loan at are . We must enter into the for-mula as the pmt. If pmt is omitted, we must include the fv argument.

fv = the future value, or a cash balance we want to attain after the last payment is made. If fv isomitted, it is assumed to be (the future value of a loan, for example, is ). For example, if wewant to save to pay for a special project in years, then is the future value. Wecould then make a conservative guess at an interest rate and determine how much we must saveeach month. If fv is omitted, we must include the pmt argument.

type = the number 0 or 1 which indicates when payments are due. If 0, the payments are due atthe end of the period. If 1, the payments are due at the beginning of the period. If omitted, it isassumed to be 0.

* These terms were defined on the previous page but ar repeated here for convenience.

pv Payment 1 1 interest+ n––interest

------------------------------------------------=

10%10% 12 0.83%

10% 12 0.83% 0.0083

4 12 48 periods= 48

$10,000 4 12% $263.33 263.33–

0 0$50,000 18 $50,000

Page 257: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 7 Mathematics of Finance and Economics

7-46 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

Remarks:

1. We must make sure that we are consistent with the units that we use for specifying rate andnper. For example, if we make monthly payments on a four-year loan at annual interestrate, we must use for rate and for nper. If we make annual payments on thesame loan, we must use for rate and for nper.

2. As stated earlier, for all the arguments, cash we pay out, such as deposits to savings, is repre-sented by negative numbers; cash we receive, such as dividend checks, is represented by posi-tive numbers.

Example 7.33

We wish to receive at the end of each year for the next years. If the interest rate is, what amount must we deposit now to achieve this goal?

Solution:

We use the Excel PV function =PV(0.07,20,12000,0,0) and this returns . Thisresult is negative because it represents the amount that we must pay. In other words, this is anoutgoing cash flow.

FV Function

The FV function computes the future value of an ordinary annuity. An ordinary annuity is a seriesof payments made at equally spaced intervals.

The future value of an annuity allows us to compare different investment alternatives or potentialobligations.

The formula for computing the future value of an ordinary annuity is

(7.35)

The syntax for Excel is

=FV(rate,nper,pmt,pv,type) where

rate = interest rate per period

nper = the total number of payment periods in an annuity

pmt = payment made each period; it cannot change over the life of the annuity. Typically, pmtcontains principle and interest but no other fees or taxes. If pmt is omitted, we must include thepv argument.

pv = present value or the lump sum amount that a series of future payments is worth at thepresent. If pv is omitted, it is assumed to be 0 (zero) and we must include the pmt argument.

11%11% 12 4 12

11% 4

$12,000 207%

$127 128.17–

FV Payment 1 interest+ n 1–interest

----------------------------------------------=

Page 258: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 7-47Orchard Publications

Spreadsheet Financial Functions

type = the number 0 or 1 which indicates when payments are due. If 0, the payments are due atthe end of the period. If 1, the payments are due at the beginning of the period. If omitted, it isassumed to be 0.

Remarks:

1. The payment returned by PMT includes principal and interest but no taxes, reserve payments,or fees sometimes associated with loans.

2. We must make sure that we are consistent with the units that we use for specifying rate andnper. For example, if we make monthly payments on a four-year loan at annual interestrate, we must use for rate and for nper. If we make annual payments on thesame loan, we must use for rate and for nper.

Example 7.34

Suppose we deposit each year for the next years at interest rate and we makeeach year’s contribution on the last day of the year. We want to find out the amount accumulatedat the end of the -year period.

Solution:

We use the Excel FV function =FV(0.075,20, 2000,0,0) and this returns . This is theamount that we have accumulated over the -year period.

PMT Function

The PMT function calculates the payment for a loan based on constant payments and a constantinterest rate.

The formula for computing the payment is

(7.36)

The syntax for Excel is

=PMT(rate,nper,pv,fv,type) where

rate = interest rate for the loan per period

nper = the total number of payments for the loan

pv = present value or the total amount that a series of future payments is worth at the present. Itis also referred to as the principal.

fv = future value or the cash balance that we want to attain after the last payment is made. If fv isomitted, it is assumed to be 0 (zero), that is, the future value of a loan is zero.

11%11% 12 4 12

11% 4

$2 000, 20 7.5%

20

$86,609.3620

PMT Principal interest1 1 interest+ n––------------------------------------------------=

Page 259: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 7 Mathematics of Finance and Economics

7-48 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

type = the number 0 or 1 which indicates when payments are due. If 0, the payments are due atthe end of the period. If 1, the payments are due at the beginning of the period. If omitted, it isassumed to be 0.

Remarks:

1. The payment returned by PMT includes principal and interest but no taxes, reserve payments,or fees sometimes associated with loans.

2. We must make sure that we are consistent with the units that we use for specifying rate andnper. For example, if we make monthly payments on a four-year loan at annual interestrate, we must use for rate and for nper. If we make annual payments on thesame loan, we must use for rate and for nper.

Example 7.35

Suppose we buy an automobile and we finance a loan of for the next years at inter-est rate. We want to find out the monthly payment for this loan.

Solution:

We use the Excel PMT function =PMT(0.08/12,5*12,15000,0,0) and this returns . Thisrepresents our monthly payment. This amount is shown as a negative number since it representsan outgoing cash flow. The interest rate is divided by to obtain the monthly payment, and theyears that the money is paid out is multiplied by to obtain the number of payments.

RATE Function

The RATE function returns the interest rate per period of an annuity. We can use RATE to deter-mine the yield of a zero-coupon bond that is sold at a discount of its face value. This function isalso useful in forecasting applications to calculate the compound growth rate between current andprojected revenues and earnings.

RATE is calculated by iteration and can have zero or more solutions. If the successive results ofRATE do not converge to within after iterations, RATE returns the #NUM! errorvalue.

The syntax for Excel is

=RATE(nper,pmt,pv,fv,type,guess) where

nper = the total number of payment periods in an annuity.

pmt = the payment made each period and cannot change over the life of the annuity. Typically,pmt includes principal and interest but no other fees or taxes. If pmt is omitted, we must includethe fv argument.

pv = present value or the total amount that a series of future payments is worth at the present.

11%11% 12 4 12

11% 4

$15,000 5 8%

304.15–

1212

0.0000001 20

Page 260: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 7-49Orchard Publications

Spreadsheet Financial Functions

fv = future value or the cash balance that we want to attain after the last payment is made. If fv isomitted, it is assumed to be 0 (zero), that is, the future value of a loan is zero.

type = the number 0 or 1 which indicates when payments are due. If 0, the payments are due atthe end of the period. If 1, the payments are due at the beginning of the period. If omitted, it isassumed to be 0.

guess = our guess for what the rate will be. If we omit guess, it is assumed to be . If RATEdoes not converge, we can try different values for guess. RATE usually converges if guess isbetween 0 and 1.

Remark:

We must make sure that we are consistent with the units that we use for specifying rate and nper.For example, if we make monthly payments on a four-year loan at annual interest rate, wemust use for rate and for nper. If we make annual payments on the same loan, wemust use for rate and for nper.

Example 7.36

Suppose that for we can purchase a zero-coupon bond with face value maturingin years. We want to determine the annual interest rate that this bond will yield.

Solution:

We use the Excel RATE function =RATE(10,0, 3500,10000,0,0.1) and this returns . Thisrepresents the annual interest rate that this bond will yield.

NPER* Function

The NPER function returns the number of periods for an investment based on periodic, constantpayments, and a constant interest rate.

The syntax for Excel is

=NPER(rate,pmt,pv,fv,type) where

rate = the interest rate per period.

pmt = the payment made each period and cannot change over the life of the annuity. Typically,pmt includes principal and interest but no other fees or taxes.

pv = present value or the total amount that a series of future payments is worth at the present.

* We discussed this function in Chapter 2 also.

10%

11%11% 12 4 1211% 4

$3 500, $10 000,10

11.07%

Page 261: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 7 Mathematics of Finance and Economics

7-50 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

fv = future value or the cash balance that we want to attain after the last payment is made. If fv isomitted, it is assumed to be 0 (zero), that is, the future value of a loan is zero.

type = the number 0 or 1 which indicates when payments are due. If 0, the payments are due atthe end of the period. If 1, the payments are due at the beginning of the period. If omitted, it isassumed to be 0.

Example 7.37

Suppose that we deposit at the end of each year into a savings account. This accountearns per year compounded annually. How long will it take to accumulate ?

Solution:

We use the Excel NPER function =NPER(0.075,-2000,0,100000) and this returns years.This represents the time it will take to accumulate .

NPV Function

The NPV function calculates the net present value of an investment by using a discount rate anda series of future payments (negative values) and income (positive values).

The syntax for Excel is

=NPV(rate,value1,value2,...) where

rate = the rate of discount over the length of one period.

value1, value2,... = to arguments representing the payments and income and must beequally spaced in time and occur at the end of each period.

Remarks:

1. NPV uses the order of value1, value2,... to interpret the order of cash flows. We must enter ourpayment and income values in the correct sequence.

2. Arguments that are numbers, empty cells, logical values, or text representations of numbersare counted; arguments that are error values or text that cannot be translated into numbersare ignored.

3. If an argument is an array or reference, only numbers in that array or reference are counted.Empty cells, logical values, text, or error values in the array or reference are ignored.

4. The NPV investment begins one period before the date of the valued cash flow and ends withthe last cash flow in the list. The NPV calculation is based on future cash flows. If our first cashflow occurs at the beginning of the first period, the first value must be added to the NPV result,not included in the values arguments. For more information, see the examples below.

5. The formula for NPV is

$2,0007.5% $100,000

21.54$100,000

1 29

Page 262: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 7-51Orchard Publications

Spreadsheet Financial Functions

(7.37)

6. NPV is similar to the PV function (present value). The primary difference between PV andNPV is that PV allows cash flows to begin either at the end or at the beginning of the periodwhereas in NPV the arguments value1, value2,... must occur at the end of each period asstated above. Also, unlike the variable NPV cash flow values, PV cash flows must be constantthroughout the investment. For information about annuities and financial functions, see PV.

7. NPV is also related to the IRR function (Internal Rate of Return) which is discussed below.IRR is the rate for which NPV equals zero, that is,

(7.38)

Example 7.38

Suppose that in a year we make irregular distributions shown as value1, value2,...,value12 onthe spreadsheet of Figure 7.8 at annual interest rate, and we want to compute the netpresent value of those distributions.

Figure 7.8. Spreadsheet for Example 7.38

Solution:

We use the formula =NPV(B15/12,B2:B13) which returns . This value represents thenet present value of these distributions. As expected, this amount is less than the sum of of the monthly distributions.

NPVvaluesi

1 rate+ i--------------------------

i 1=

n=

NPV IRR 0=

1211.5%

123456789101112131415

A BDistributions Amountvalue1 0value2 0value3 2500value4 2500value5 3000value6 5000value7 6000value8 9000value9 3000value10 2500value11 0value12 7500Annual Interest rate 11.5%=NPV(B15/12,B2:B13) $38,084.13

$38,084.13$41,000

12

Page 263: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 7 Mathematics of Finance and Economics

7-52 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

IRR Function

The IIR function returns the internal rate of return for a series of cash flows represented by thenumbers in values. These cash flows need not be even as they would be for an annuity. However,the cash flows must occur at regular intervals, such as monthly or annually. The internal rate ofreturn is the interest rate received for an investment consisting of payments (negative values) andincome (positive values) that occur at regular periods.

The syntax for Excel is

=IRR(values,guess) where

values = an array or a reference to cells that contain numbers for which we want to calculate theinternal rate of return. This argument must contain at least one positive value and one negativevalue to calculate the internal rate of return. IRR uses the order of values to interpret the order ofcash flows. We must enter our payment and income values in the sequence we want. Normally,the first cash flow value in the range is a negative number that represents an outgoing cash flow. Ifan array or reference argument contains text, logical values, or empty cells, those values areignored.

guess = a number that we guess is close to the result of IRR.

Excel uses an iterative method for calculating IRR. Starting with guess, IRR cycles through thecalculation until the result is accurate within . If IRR cannot find a result that worksafter tries, the #NUM! error value is returned.

In most cases we need not provide guess for the IRR calculation. If guess is omitted, it isassumed to be ( ).

If IRR gives the #NUM! error value, or if the result is not close to what we expected, we should tryagain with a different value for guess.

Example 7.39

Suppose that we make an initial investment of and we receive unequal payments asshown in Column A of the spreadsheet of Figure 7.9. What is the internal rate of return?

Solution:

In Cell C2 of the spreadsheet we enter =IRR(A2:A14) and this returns .

Remark:

IRR is closely related to NPV, the net present value function. The rate of return calculated by IRRis the interest rate corresponding to a 0 (zero) net present value. The following formula illustrateshow NPV and IRR are related:

NPV(IRR(A2:A14),A2:A14) returns .

0.00001%20

0.1 10%

$10,000 12

10.10%

9.29 13–10

Page 264: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 7-53Orchard Publications

Spreadsheet Financial Functions

Figure 7.9. Spreadsheet for Example 7.39

Example 7.40

Suppose we started our business with an initial investment of and our net income for thefirst five years is as shown on the spreadsheet of Figure 7.10. We want to compute:

a. the internal rate of return after years

b. the internal rate of return after years

c. the internal rate of return after years

Figure 7.10. Spreadsheet for Example 7.40

1234567891011121314

A B CCash Flows IRR

-10000 10.10%180015001250140013751280162515601230142515801620

$60,000

4

5

2

12345678910111213

A BDescription Cash FlowsInitial Cost of Business -60000Net Income for 1st year 10000Net Income for 2nd year 13000Net Income for 3rd year 15000Net Income for 4th year 18000Net Income for 5th year 23000

Formula Result=IRR(B2:B6) -2%=IRR(B2:B7) 9%=IRR(B2:B4) #NUM!=IRR(B2:B4, -0.10) -44%

Page 265: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 7 Mathematics of Finance and Economics

7-54 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

Solution:

The formulas that we used for this example are shown in Cells A10:A13. The internal rate ofreturn for the first , first , and first years are shown in Cells B10, B11, and B13. We observethat for the last computation it was necessary to enter a guess of .

MIRR Function

The MIRR function returns the modified internal rate of return for a series of periodic cash flows.MIRR considers both the cost of the investment and the interest received on reinvestment ofcash.

The syntax for Excel is

=MIRR(values,finance_rate,reinvest_rate) where

values = an array or a reference to cells that contain numbers for which we want to calculate theinternal rate of return. This argument must contain at least one positive value and one negativevalue to calculate the internal rate of return; otherwise, MIRR returns the #DIV/0! error value.MIRR uses the order of values to interpret the order of cash flows. We must enter our paymentand income values in the sequence we want. Normally, the first cash flow value in the range is anegative number that represents an outgoing cash flow. If an array or reference argument containstext, logical values, or empty cells, those values are ignored; however, cells with zero value areincluded.

finance_rate = the interest rate that we pay on the money used in the cash flows.

reinvest_rate = the interest rate that we receive on the cash flows as we reinvest them.

MIRR uses the following formula:

(7.39)

where is the number of cash flows in values.

Example 7.41

Suppose we started our business with a loan of and our net income for the first five yearsincluding interest, is as shown on the spreadsheet of Figure 7.11. We want to compute:

a. the modified rate of return after years based on a reinvest rate of

b. the modified rate of return after years based on a reinvest rate of

c. the -year modified rate of return based on a reinvest rate of instead of

4 5 210%–

MIRR NPV(reinvest_rate,values[positive]) 1 reinvest_rate+ n–NPV(finance_rate,values[negative]) 1 finance_rate+

----------------------------------------------------------------------------------------------------------------------------------------------------------------

1n 1–------------

1–=

n

$120,000

5 12%

3 12%

5 14% 12%

Page 266: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 7-55Orchard Publications

Spreadsheet Financial Functions

Figure 7.11. Spreadsheet for Example 7.41

Solution:

The formulas that we used for this example are shown in Cells A12:A14. The modified rate ofreturn after years and years based on a reinvest rate of is shown on B12 and B13 respec-tively. The modified rate of return after years based on a reinvest rate of is shown on B14.

IPMT Function

The IPMT function returns the interest payment for a given period for an investment based onperiodic, constant payments, and a constant interest rate.

The syntax for Excel is

=IPMT(rate,per,nper,pv,fv,type) where

rate = interest rate per period

per = the period for which we want to find the interest. It must be in the range 1 to nper.

nper = the total number of payment periods

pv = present value or the total amount that a series of future payments is worth at the present.

fv = future value or the cash balance that we want to attain after the last payment is made. If fv isomitted, it is assumed to be 0 (zero), that is, the future value of a loan is zero.

type = the number 0 or 1 which indicates when payments are due. If 0, the payments are due atthe end of the period. If 1, the payments are due at the beginning of the period. If omitted, it isassumed to be 0.

1234567891011121314

A BDescription Cash Flows & InterestInitial Cost of Business (Loan) -120000Return for 1st year 39000Return for 2nd year 30000Return for 3rd year 21000Return for 4th year 37000Return for 5th year 46000Annual interest rate for the $120,000 loan 10%Annual interest rate for the reinvested profits 12%

Formula Result=MIRR(B2:B7,B8,B9) 13%=MIRR(B2:B5,B8,B9) -5%=MIRR(B2:B7,B8,0.14) 13%

5 3 12%5 14%

Page 267: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 7 Mathematics of Finance and Economics

7-56 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

Remarks:

1. For all arguments, cash that we pay out, such as deposits to savings, is represented by negativenumbers. Cash we receive, such as dividends, is represented by positive numbers.

2. We must make sure that we are consistent with the units that we use for specifying rate andnper. For example, if we make monthly payments on a four-year loan at annual interestrate, we must use for rate and for nper. If we make annual payments on thesame loan, we must use for rate and for nper.

Example 7.42

We took out an loan for years at an annual interest rate of . We want to compute:

a. the interest due in the first month of the first year

b. the interest due for the last year of the loan assuming that the payments are made annually.

Solution:

a. We use the formula =IPMT(0.1/12,1,3,8000) where the interest rate is divided by to obtainthe monthly rate. This formula returns and this amount represents the interest paid inthe first month of the first period.

b. We use the formula =IPMT(0.1,3,3,8000) where the interest rate is not divided by since weare interested in the annual interest payment for the last (third) period. This formula returns

and this amount represents the interest paid for the entire third year.

PPMT Function

The PPMT function returns the payment on the principal for a given period for an investmentbased on periodic, constant payments, and a constant interest rate.

The syntax for Excel is

=PPMT(rate,per,nper,pv,fv,type) where

rate = interest rate per period

per = specifies the period. It must be in the range 1 to nper.

nper = the total number of payment periods

pv = present value or the total amount that a series of future payments is worth at the present.

fv = future value or the cash balance that we want to attain after the last payment is made. If fv isomitted, it is assumed to be 0 (zero), that is, the future value of a loan is zero.

11%11% 12 4 12

11% 4

$8,000 3 10%

12$66.67–

12

$292.45

Page 268: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 7-57Orchard Publications

Spreadsheet Financial Functions

type = the number 0 or 1 which indicates when payments are due. If 0, the payments are due atthe end of the period. If 1, the payments are due at the beginning of the period. If omitted, it isassumed to be 0.

Remark:

We must make sure that we are consistent with the units that we use for specifying rate and nper.For example, if we make monthly payments on a four-year loan at annual interest rate, wemust use for rate and for nper. If we make annual payments on the same loan, wemust use for rate and for nper.

Example 7.43

We took out an loan for years at an annual interest rate of . We want to computethe principal payment for the first month of the first year.

Solution:

We use the formula =PPMT(0.11/12,1,5*12,6000) where the interest rate is divided by toobtain the monthly interest rate, and the number of years is multiplied by to obtain the totalnumber of monthly payments. The formula above returns and this amount representsthe interest paid for the first month of the first year.

Example 7.44

We took out an loan for years at an annual interest rate of . We want to com-pute the principal payment for the last year of the -year period.

Solution:

We use the formula =PPMT(0.09,10,10,300000). This formula above returns and thisamount represents the principal payment for the last year of the -year period.

ISPMT Function

The ISPMT function calculates the interest paid during a specific period of an investment.

The syntax for Excel is

=ISPMT(rate,per,nper,pv) where

rate = interest rate for the investment

per = specifies the period for which we want to find the interest and must be in the range 1 tonper.

nper = the total number of payment periods

11%11% 12 4 1211% 4

$6,000 5 11%

1212

$75.45–

$300,000 10 9%10

$42,886–

10

Page 269: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 7 Mathematics of Finance and Economics

7-58 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

pv = present value of the investment. For a loan, pv is the loan amount.

Remarks:

1. For all arguments, cash that we pay out, such as deposits to savings, is represented by negativenumbers. Cash we receive, such as dividends, is represented by positive numbers.

2. We must make sure that we are consistent with the units that we use for specifying rate andnper. For example, if we make monthly payments on a four-year loan at annual interestrate, we must use for rate and for nper. If we make annual payments on thesame loan, we must use for rate and for nper.

Example 7.45

We have decided to take out a loan for years at an annual interest rate of . Wewant to compute

a. the interest that we must pay the first month of the first year

b. the interest that we must pay for first year of the -year period

Solution:

a. We use the formula =ISPMT(0.085/12,1,8*12,6000000) where the interest rate is divided by to obtain the monthly interest rate, and the number of years is multiplied by to obtain

the total number of monthly payments. The formula above returns and thisamount represents the interest that we must pay the first month of the first year.

b. We use the formula =ISPMT(0.085,1,8,6000000). The formula above returns and this amount represents the interest that we must pay the entire first year.

7.9 The MATLAB Financial Toolbox

The MATLAB Student Version, Release 13, includes the Financial Toolbox that contains severalcash-flow functions to compute interest rates, rates of return, present or future values, deprecia-tion, and annuities. These are very similar to the financial functions provided by Microsoft Excel.It also includes the Financial Derivatives Toolbox and the Financial Time Series Toolbox. How-ever, in this section, we will restrict our discussion on the most common functions of the Finan-cial Toolbox.

Like the Microsoft Excel functions, with all of the MATLAB financial functions investments areconsidered negative cash flows, and return payments are considered positive cash flows.

irr function

The irr function computes the internal rate of return of periodic cash flows. Its syntax is

11%11% 12 4 12

11% 4

$6,000,000 8 8.5%

8

12 12$42,057.29–

$446,250.00–

Page 270: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 7-59Orchard Publications

The MATLAB Financial Toolbox

r=irr(cf) where cf is a cash flow vector.

The first entry in cf is the initial investment and it is entered as a negative number. If cf isentered as a matrix, each column is treated as a separate cash flow.

Example 7.46

Suppose that an initial investment of is made and the annual income for this invest-ment is as shown in Table 7.14.

We can compute the internal rate of return with the MATLAB statement

internal_rate=irr([ 150000 15000 25000 35000 45000 60000]) and this returns

internal_rate =

0.05

effrr function

The effrr function computes the effective rate of return given an annual interest rate, also knownas Annual Percentage Rate (APR), and number of compounding periods per year. Its syntax is

r=effrr(apr,per) where

apr is the annual interest rate and per is the number of compounding periods per year.

Example 7.47

Suppose that the annual percentage interest rate is and it is compounded monthly. We cancompute the effective annual rate with the MATLAB statement

effective_rate=effrr(0.07,12) and this returns

effective_rate =

0.0723

That is, the effective rate is .

Table 7.14 Income for Example 7.46

Year Income

1 15,000

2 25,000

3 35,000

4 50,000

5 60,000

$150,000

7%

7.23%

Page 271: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 7 Mathematics of Finance and Economics

7-60 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

pvfix function

The pvfix function computes the present value of cash flows at regular time intervals with equalor unequal payments. Its syntax is

p=pvfix(rate,nper,p,fv,due) where

rate is the periodic interest rate, nper is the number of periods, p is the periodic payment, fv is a pay-ment received other than p in the last period, and due specifies whether the payments are made atthe beginning (due=1) or end (due=0) of the period. The default arguments are fv=0 and due=0.

Example 7.48

A payment is made monthly into a savings account earning . The payments are made atthe end of the month for years. To compute the present value of these payments in a fixed for-mat with two decimal places, we use the statements

format bank

present_value_equal_fixed_payments=pvfix(0.04/12,6*12,400,0,0) and these return

present_value_equal_fixed_payments =

25566.97

Example 7.49

Payments of , , , , , , , and are made semiannually into asavings account earning per year. The payments are made at the end of June and at the endof December for years. To compute the present value of these payments in a fixed format withtwo decimal places, we use the statements

format bank

payments=[300 325 350 375 400 425 450 475];

present_value_unequal_fixed_payments=pvfix(0.05/2,4*2,payments,0,0) and these return

present_value_unequal_fixed_pay =

2151.04 2330.29 2509.55 2688.80 2868.05 3047.31 3226.56 3405.82

These values represent the present value at the end of each semiannual period.

pvvar function

The pvvar function computes the present value of cash flows at irregular time intervals withequal or unequal payments. Its syntax is

pv=pvvar(cf,rate,df)

$400 4%6

$300 $325 $350 $375 $400 $425 $450 $4755%

4

Page 272: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 7-61Orchard Publications

The MATLAB Financial Toolbox

where cf is a vector representing the cash flows, rate is the periodic interest rate, and df repre-sents the dates that the cash flows occur. If df omitted, it is understood that the cash flows occurat the end of the period.

Example 7.50

Suppose we make an initial investment of at an annual interest rate of and the yearlyincome realized by this investment is as shown in Table 7.15.

To compute the net present value of the periodic cash flows, we use the following statements:

format bank

CF=[ 15000 3500 4000 3750 4200 4100]; present_value=pvvar(CF,0.07) and these return

present_value =

953.30

Example 7.51

An investment of returns the cash flows shown in Table 7.16 where the first cash flow valueis shown as the first cash flow value. The annual interest rate is .

To compute the present value of these cash flows we use the following statements:

format bank

Table 7.15 Cash flows for Example 7.50

Year Return

1 $3,500

2 4,000

3 3,750

4 4,200

5 4,100

Table 7.16 Cash flows for Example 7.51

Cash Flow Date

$ 15,000 January 23, 2001

3,500 February 27, 2002

4,000 March 18, 2002

3,750 July 15, 2002

4,200 September 9, 2002

4,100 November 20, 2002

$15,000 7%

$15,0008%

Page 273: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 7 Mathematics of Finance and Economics

7-62 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

CF=[ 15000 3500 4000 3750 4200 4100];

DF=['01/23/2001'; '02/27/2002'; '03/18/2002'; '07/15/2002'; '09/09/2002'; '11/20/2002'];

present_value=pvvar(CF,0.08, DF) and these return

present_value =

2494.95

fvfix function

The fvfix function computes the future value of cash flows at regular time intervals with equal orunequal payments. Its syntax is

f=fvfix(rate,nper,p,pv,due)

where rate is the periodic interest rate, nper is the number of periods, p is the periodic payment, pvis the initial value, and due specifies whether the payments are made at the beginning (due=1) orend (due=0) of the period. The default arguments are pv=0 and due=0.

Example 7.52

Suppose that we already have in a savings account and we add at the end of eachmonth for years. This account pays interest compounded monthly. To compute the futurevalue of our investment at the end of years, we use the following statements:

format bank

future_value=fvfix(0.06/12,10*12,250,2000,0) and these return

future_value =

44608.63

fvvar function

The fvvar function computes the future value of cash flows at irregular time intervals with equalor unequal payments. Its syntax is

fv=fvvar(cf,rate,df)

where cf is a vector representing the cash flows, rate is the periodic interest rate, and df repre-sents the dates that the cash flows occur. If df omitted, it is understood that the cash flows occurat the end of the period. The initial investment is included as the initial cash flow value.

Example 7.53

Suppose we make an initial investment of at an annual interest rate of and the yearlyincome realized by this investment is as shown in Table 7.17.

$2,000 $25010 6%

10

$15,000 7%

Page 274: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 7-63Orchard Publications

The MATLAB Financial Toolbox

To compute the future value of the periodic cash flows, we use the following statements:

format bank

CF=[ 15000 3500 4000 3750 4200 4100];

future_value=fvvar(CF,0.07) and these return

future_value =

1337.06

Example 7.54

An investment of returns the cash flows shown in Table 7.18 where the first cash flow valueis shown as the first cash flow value. The annual interest rate is .

To compute the present value of these cash flows we use the following statements:

format bank

CF=[ 15000 3500 4000 3750 4200 4100];

DF=['01/23/2001'; '02/27/2002'; '03/18/2002'; '07/15/2002'; '09/09/2002'; '11/20/2002'];

future_value=fvvar(CF,0.08, DF) and these return

Table 7.17 Cash flows for Example 7.53

Year Return

1 $3,500

2 4,000

3 3,750

4 4,200

5 4,100

Table 7.18 Cash flows for Example 7.54

Cash Flow Date

$ 15,000 January 23, 2001

3,500 February 27, 2002

4,000 March 18, 2002

3,750 July 15, 2002

4,200 September 9, 2002

4,100 November 20, 2002

$15,0008%

Page 275: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 7 Mathematics of Finance and Economics

7-64 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

future_value =

2871.10

annurate function

The annurate function computes the periodic interest rate paid on a loan or annuity. Its syntax is

r=annurate(nper,pv,fv,due)

where rate is the periodic interest rate, nper is the number of periods, p is the periodic payment, pvis the present value of the loan or annuity, fv is the future value of the loan or annuity, and due spec-ifies whether the payments are made at the beginning (due=1) or end (due=0) of the period. Thedefault arguments are fv=0 and due=0.

Example 7.55

Suppose that we have taken a loan of for years and we make monthly payments of at the end of each month. To compute the interest rate that we pay for this loan, we use the fol-lowing statements:

format bank

monthly_rate=annurate(5*12,225,8000,0,0) and these return

monthly_rate =

0.02

Therefore, the annual interest rate is or .

amortize function

The amortize function computes the principal and interest portions of a loan paid by a periodicpayment and returns the remaining balance of the original loan amount and the periodic pay-ment. Its syntax is

[principal, interest, balance, periodic_payment]=amortize(rate,nper,pv,fv,due)

where rate is the periodic interest rate that we pay, nper is the number of periods, pv is the presentvalue of the loan or annuity, fv is the future value of the loan or annuity, and due specifies whetherthe payments are made at the beginning (due=1) or end (due=0) of the period. The default argu-ments are fv=0 and due=0. On the left side of above statement principal is a vector of the principalpaid in each period, interest is a vector of the interest paid in each period, balance is the remainingbalance of the loan in each payment period, and periodic_payment is the periodic payment.

Example 7.56

Suppose we took a loan of to be paid in bimonthly installments at an annual interestrate of . The following statements will compute the principal paid in each period, the inter-

$8,000 5 $225

0.02 12 0.24= 24%

$2,000 67.5%

Page 276: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 7-65Orchard Publications

Comparison of Alternate Proposals

est paid in each period, the remaining balance in each period, and the periodic payment.

format bank

[principal, interest, balance, periodic_payment]=amortize(0.075/6, 6, 2000) and these return

principal =

323.07 327.11 331.19 335.33 339.53 343.77

interest =

25.00 20.96 16.87 12.73 8.54 4.30

balance =

1676.93 1349.83 1018.63 683.30 343.77 -0.00

periodic_payment =

348.07

The MATLAB Financial Toolbox includes the Securities Industry Association (SIA)* compliantfunctions to compute accrued interest, determine prices and yields, and calculate duration of fixed-income securities. It also includes a set of functions to generate and analyze term structure of inter-est rates.

7.10 Comparison of Alternate Proposals

Quite often, one must perform economic analysis to select equipment or property from two ormore proposals. In this section we will discuss the annual cost comparison method by comparingthe total annual costs for each proposal.

Let

The annual expenditures include all costs except depreciation and interest. These expendituresinclude taxes, insurance, materials, labor, repairs and maintenance, supplies, and utilities.

* SIA-compliant functions are normally used with U.S. Treasury bills, bonds (corporate and municipal), and notes.

PP Purchase Price initial tcos of asset=

SV Salvage Value of asset=

n life of asset in years=

i Annual interest rate=

AE Annual Expenditures=

Page 277: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 7 Mathematics of Finance and Economics

7-66 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

The effective purchase price at the retirement date of an asset is computed as

Converting this to an equivalent annuity, we get

or

(7.40)

The total annual cost of an asset is a highly useful tool in arriving at a business decision where aneconomic choice is to be made among several alternative courses of action. The following exam-ples will illustrate the applicability of annual cost for comparison purposes.

Example 7.57

A manufacturer has bought a piece of property on which he will build a storage warehouse. Twotypes of construction are considered, brick and galvanized iron. The data are available are shownin Table 7.19.

Which type of construction is the most economical?

Solution:

The equation of (7.40) applies to this example. For convenience, we construct Table 7.20 to con-solidate the data shown in Table 7.19.

Table 7.19 Data for Example 7.57

Brick Galvanized Iron

Initial cost (purchase price) $24,000 $10,000

Salvage Value 5,000 2,000

Estimated life 50 years 15 years

Annual maintenance 200 300

Annual insurance premium 48 50

Annual taxes 300 125

Interest 4% 4%

PP 1 i+ n SV–

Total Annual Cost PP 1 i+ n SV–i

1 i+ n 1–--------------------------- AE+=

PPi 1 i+ n SVi– PPi PPi–+

1 i+ n 1–--------------------------------------------------------------------------- AE+ PP SV– i PPi 1 i+ n 1–+

1 i+ n 1–--------------------------------------------------------------------------------- AE+==

Total Annual Cost PP SV–i

1 i+ n 1–--------------------------- PPi AE+ +=

Page 278: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 7-67Orchard Publications

Comparison of Alternate Proposals

Then,

Likewise,

Therefore, the galvanized construction is the most economical choice.

Example 7.58

Two possible routes for a power line are under consideration. Route A is around a lake, milesin length. The first cost will be per mile, the yearly maintenance will be per mile,and there will be a salvage value at the end of years of per mile. Route B is a submarinecable across the lake, miles long. The first cost will be per mile, the annual mainte-nance per mile, and the salvage value at the end of years will be per mile. Theyearly power loss will be per mile for both routes. Interest rate is ; taxes are of thefirst cost. Compare the two routes on the basis of annual costs.

Solution:

For convenience, we tabulate the given data on Table 7.21.

Then, for Route A

Likewise, for Route B

Table 7.20 Consolidation of the data of Table 7.19

Brick Galvanized Iron

PP (Purchase Price) $24,000 $10,000

SV (Salvage Value) 5,000 2,000

n (Estimated life) 50 years 15 years

AE (Maintenance, Insurance, Taxes) 200+48+300=548 300+50+125=475

Interest 4% 4%

Total Annual Cost brick 24000 5000–0.04

1 0.04+ 50 1–-------------------------------------- 24000 0.04 548+ +=

19000 0.00655 960 548+ + $1 632.45==

Total Annual Costgalvanized iron 10000 2000–0.04

1 0.04+ 15 1–-------------------------------------- 10000 0.04 475+ +=

8000 0.04994 400 475+ + 1 274.53==

15$6,000 $2,000

15 $3,0005 $31,000

$400 15 $6,000$550 4.5% 3%

Total Annual CostRoute A 90000 45000–0.045

1 0.045+ 15 1–----------------------------------------- 90000 0.045 40950+ +=

45000 0.04811 4050 40950+ + $47 165.12==

Page 279: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 7 Mathematics of Finance and Economics

7-68 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

Therefore, Route B is the most economical choice.

7.11 Kelvin’s Law

On the previous section, we discussed how we can make an economic choice by computing theannual costs of two or more alternatives. In this section, we will discuss a class of problems inwhich the total cost can be found by the following formula:

(7.41)

where

The total cost becomes a minimum when

or when

Table 7.21 Given data for Example 7.58

Route A Route B

PP (Purchase Price, i.e., Initial Cost)

$6,000 15=$90,000 $31,000 5=$155,000

SV (Salvage Value) 3,000 15=45,000 6,000 5=30,000

Interest 4.5% 4.5%

Annual Expenditures Maintenance 2,000 15=30,000 400 5=2,000

Power loss ($550/mile) 550 15=8,250 550 5=2,750

Taxes at 3% of initial cost 90,000 0.03=2,700 155,000 0.03=4,650

Total Annual Expenditures 30,000+8,250+2,700=$40,950 2,000+2,750+4,650=$9,400

Total Annual CostRoute B 155000 30000–0.045

1 0.045+ 15 1–----------------------------------------- 155000 0.045 9400+ +=

125000 0.04811 4050 9400+ + $22 389.23==

y ax bx--- c+ +=

y total tcos=

a b and c are cons tstan, ,

x a variable=

ydydx------ 0 a b

x2-----–= =

Page 280: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 7-69Orchard Publications

Kelvin’s Law

(7.42)

The pair of the equations of (7.41) and (7.42) are known as Kelvin’s law. This law can be appliedto special types of problems such as the most economical span length of a bridge, most economi-cal lot size, and most economical diameter of an oil pipeline.

Example 7.59

A railroad company proposes to build a double-track half-through plate-girder bridge feetlong, with spans of equal length. The cost of steel in place is estimated at cents per pound.Disregarding the cost of the track as constant, find the economical length of span. For superstruc-ture use the equation

where is the span length in feet.

For the center piers use the equation

and for the end piers use the equation

Solution:

The total weight of steel in the superstructure is

Cost of steel at is

As stated, is the span length in feet. Then, the number of spans is

There are 2 end piers and the number of center piers is one less than the number of spans. Thus,

and

x ba---=

980$0.10

Weightlb/ linear foot 25s 2050+=

s

Costcenter piers /pier 50s 30000+=

Costend piers /pier 50s 20000+=

Steeltotal weight 980 feet Weight/linearfoot 980 25s 2050+ 24500s 2009000+= = =

$0.10/lb

Coststeel 0.10 24500s 2009000+ 2450s 200900+= =

s

Number of spans Bridge lengthSpan length

------------------------------------- 980s

---------= =

Costend piers 2 50s 20000+ 100s 40000+= =

Page 281: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 7 Mathematics of Finance and Economics

7-70 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

Therefore, denoting the total cost of bridge as , we get

By comparison of the above expression with the equation of (7.41) we see that

Therefore, the most economical length of each bridge span is when is minimum, and by equa-tion (7.42) it occurs when

and the number of spans is

Example 7.60

A manufacturer must to produce parts a year and wishes to select the most economical lotsize to be equally spaced during the year. The annual cost of storage and interest on investmentvaries directly with the lot size and is when the entire annual requirement is manufacturedin one lot. The cost of setting up and dismantling the machine for each run in . What is themost economical lot size?

Solution:

Let be the most economical lot size. Then, the number of machine setups will be .

Annual cost of setups will be

and since the entire annual cost of storage and interest varies directly with the lot size and is when manufactured in one lot, by proportion we have

Costcenter piers980

s--------- 1– 50s 30000+ 49000 50s– 29400000

s------------------------ 30000–+= =

29400000s

------------------------ 50s 19000+–=

y

y Coststeel Costend piers Costcenter piers+ +=

2450s 200900 100s 40000 29400000s

------------------------ 50s 19000+–+ ++ +=

2500s 29400000s

------------------------ 259900+ +=

a 2500= b 29400000= x s=

y

x s ba--- 29400000

2500------------------------ 108.44353 108.5 feet= = = =

Number of spans Bridge lengthSpan length

-------------------------------------= 980108.5------------- 9.03 9 spans= =

50 000

$1,000$30

x 50000/x

30 50000x

--------------- 1500000x

---------------------=

$1,000

Page 282: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 7-71Orchard Publications

Kelvin’s Law

Now, denoting the total cost to produce units as , we have

Therefore, , , and per equation (7.42), will be a minimum cost when

and the number of lots required will be

If we round this number to , we find that the most economical lot size is

$100050000 parts------------------------------ x 0.02x=

50 000 y

y 0.02x 1500000x

---------------------+=

a 0.02= b 1500000= y

x ba--- 1500000

0.02--------------------- 8660 parts per lot= = =

500008660

--------------- 5.8=

6

500006

--------------- 8333 parts=

Page 283: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 7 Mathematics of Finance and Economics

7-72 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

7.12 Summary

• A bond is a debt investment. That is, we loan money to an entity (company or government)that needs funds for a defined period of time at a specified interest rate.

• A corporate bond is a bond issued by a corporation.

• A municipal bond is a bond issued by a municipality and that generally is tax-free.

• A treasury bond is a bond issued by the US Government.

• A perpetuity is a constant stream of identical cash flows with no maturity date.

• A perpetual bond is a bond with no maturity date. Perpetual bonds are not redeemable and paya steady stream of interest forever. Such bonds have been issued by the British government.

• A convertible bond is a bond that can be converted into a predetermined amount of a com-pany’s equity at certain times during it life.

• A treasury note is treasury bond that is issued for a shorter time.

• A treasury bill is a treasury bond that is held for a shorter time than either a treasury bond or atreasury note.

• Face value is the dollar amount assigned to a bond when first issued.

• Par value is the face value of a bond.

• Book value is the value of a bond at any date intermediate between its issue and its redemp-tion.

• A coupon bond is a debt obligation with coupons representing semiannual interest paymentsattached.

• A zero coupon bond is a bond that generates no periodic interest payments and is issued at adiscount from face value. The return is realized at maturity.

• A junk bond is a bond purchased for speculative purposes. It has a low rating and a highdefault risk.

• Bonds are assigned a rating by Standard and Poor's and Moody's

• A promissory note is an unconditional written promise made by one party to another, to pay astipulated sum of money either on demand or at a definite future date.

• The discount rate the rate charged by Reserve Banks when they extend credit to depositoryinstitutions either through advances or through the discount of certain types of paper, includ-ing ninety-day commercial paper.

• The prime rate is the interest rate charged by banks to their most creditworthy customers.

Page 284: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 7-73Orchard Publications

Summary

• An annuity is a series of equal payments made at equal intervals or periods of time. When paidinto a fund which is invested at compound interest for a specified number of years, the annuityis referred to as a sinking fund.

• An ordinary annuity is a series of equal payments or receipts occurring over a specified numberof periods with the payments or receipts occurring at the end of each period.

• A sinking fund is an interest-earning fund in which equal deposits are made at equal intervalsof time. It is also referred to as an annuity.

• Interest is charge for a loan.

• Simple interest is calculated on a yearly basis (annually) and depends on the interest rate.

• Compound interest includes interest earned on interest.

• If a given interest rate applies to a period less than year, then its equivalent rate for anannual period is referred to as its effective rate. Thus, the effective rate corresponding to a rateof per quarterly period is per cent. The effective rate is numerically equal to theinterest earned by a principal of for year.

• The Excel PV function returns the present value of an investment. The present value is thetotal amount that a series of future payments is worth now. This function also computes thepresent value of an ordinary annuity.

• The Excel FV function computes the future value of an ordinary annuity.

• The Excel PMT function calculates the payment for a loan based on constant payments and aconstant interest rate.

• The Excel RATE function returns the interest rate per period of an annuity. We can use RATEto determine the yield of a zero-coupon bond that is sold at a discount of its face value.

• The Excel NPER function returns the number of periods for an investment based on periodic,constant payments, and a constant interest rate.

• The Excel NPV function calculates the net present value of an investment by using a discountrate and a series of future payments (negative values) and income (positive values).

• The Excel IIR function returns the internal rate of return for a series of cash flows representedby the numbers in values. These cash flows need not be even as they would be for an annuity.

• The Excel MIRR function returns the modified internal rate of return for a series of periodiccash flows. MIRR considers both the cost of the investment and the interest received on rein-vestment of cash.

• The Excel IPMT function returns the interest payment for a given period for an investmentbased on periodic, constant payments, and a constant interest rate.

1

2% 8.243%$1.00 1

Page 285: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 7 Mathematics of Finance and Economics

7-74 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

• The Excel PPMT function returns the payment on the principal for a given period for aninvestment based on periodic, constant payments, and a constant interest rate.

• The Excel ISPMT function calculates the interest paid during a specific period of an invest-ment.

• The MATLAB irr function computes the internal rate of return of periodic cash flows.

• The MATLAB effrr function computes the effective rate of return given an annual interestrate, also known as Annual Percentage Rate (APR), and number of compounding periods peryear.

• The MATLAB pvfix function computes the present value of cash flows at regular time inter-vals with equal or unequal payments.

• The MATLAB pvvar function computes the present value of cash flows at irregular timeintervals with equal or unequal payments.

• The MATLAB fvfix function computes the future value of cash flows at regular time intervalswith equal or unequal payments.

• The MATLAB fvvar function computes the future value of cash flows at irregular time inter-vals with equal or unequal payments.

• The MATLAB annurate function computes the periodic interest rate paid on a loan or annu-ity.

• The MATLAB amortize function computes the principal and interest portions of a loan paidby a periodic payment and returns the remaining balance of the original loan amount and theperiodic payment.

• The material presented in this chapter allows us to perform economic analysis to select equip-ment or property from two or more proposals.

• Kelvin’s law can be applied to special types of problems such as the most economical spanlength of a bridge, most economical lot size, and most economical diameter of an oil pipeline.

Page 286: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 7-75Orchard Publications

Exercises

7.13 Exercises

1. Jack's bank account pays interest at a rate of per year. If he puts into his account,how much will Jack have after a year?

2. Mary earns interest per year on the money she has saved in her bank account. Her ini-tial investment was . How much is on her account after years?

3. Lisa has . She deposits it into a bank account that pays interest per annum. Sheleaves it in the bank for months. How much money does Lisa have now?

4. If we deposit into an account earning interest rate of compounded quarterly, whatwill our principal be at the end of years?

5. An individual possesses a promissory note, due years hence, whose maturity value is .What is the discount value of this note based on an interest rate of ?

6. On July 1, 1992, a bank account had a balance of . A deposit of was made on Jan.1, 1993, and a deposit of on Jan. 1, 1994. On Apr. 1, 1995, the sum of was with-drawn. What was the balance in the account on Jan. 1, 1998, if interest is earned at the rate of

per cent compounded quarterly?

7. A manufacturing firm contemplates retiring an existing machine at the end of 2012. The newmachine to replace the existing one will have an estimated cost of . This expense willbe partially defrayed by sale of the old machine as scrap for . To accumulate the balanceof the required capital, the firm will deposit the following sums in an account earning interestat compounded quarterly:

at the end of 2009 at the end of 2010 at the end of 2011

What cash disbursement will be necessary at the end of 2012 to purchase the new machine?

8. A father wishes to have available at his son’s eighteenth birthday. What sum shouldbe set aside at the son’s fifth birthday if it will earn interest at the rate of per cent com-pounded semiannually?

9. In Exercise 8, if the father will set aside equal sums of money at the son’s fifth, sixth, and sev-enth birthdays, what should each sum be?

10. Brown owes Smith the following sums:

due years hence due years hence due years hence

Having received an inheritance, he has decided to liquidate the debts at the present date. Ifthe two parties agree on a interest rate, what sum must Brown pay? In order to verify the

4.3% $850

4.5%$200 5

$560 3.7%2

$1,500 5%7

2 $3,2007%

$8000 $1000$750 $1,200

4%

$10,000$750

5%

$1,500 $1,500 $2,000

$50,0003%

$1,000 2 $1,500 3 $1,800 4

5%

Page 287: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 7 Mathematics of Finance and Economics

7-76 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

solution obtained, evaluate all sums of money, including the required payment, at any dateother than the present.

11. How much interest will earn if it is invested at for years?

12. A business firm contemplating the installation of labor-saving machinery has a choicebetween two different models. Machine A will cost , while machine B will cost

. The repairs required for each machine are as follows:

Machine A: at end of 5th year and at end of 10th year

Machine B: at end of 9th year

The machines are alike in all other respects. If this firm is earning a per cent return on itscapital, which machine should be purchased?

13. A fund was established in 1990, whose history is recorded below:

Deposit of on 1/1/90

Deposit of on 1/1/92

Withdrawal of on 7/1/92

Deposit of on 7/1/93

Withdrawal of on 1/1/94

The fund earned interest at the rate of compounded semiannually until the end of 1992.At that date, the interest rate was augmented to compounded semiannually. What wasthe principal in the fund at the end of 1996?

14. If the sum of is invested in a fund earning interest compounded semiannually,what will be its final value at the end of years?

15. In Exercise 14, how long will it take the original sum of to expand to ?

16. On Apr. 1, 2001, an investor purchased stock of the XYZ Corp. at a total cost of . Hethen received the following semiannual dividends:

on Oct. 1, 2001 on Apr. 1, 2002

on Oct. 1, 2002 on Apr. 1, 2003

After receipt of the last dividend, the investor sold his stock, receiving after deductionof brokerage fees. What semiannual rate did this individual realize on his investment?

17. An investor is considering alternate plans for the investment of .

$1,000 6% 5

$36,500$36,300

$1,500 $2,000

$3,800

7%

$1,000

$2,000

$300

$1,600

$1,200

3%4%

$2,000 7.5%5

$2,000 $3,000

$3,600

$105 $110

$110 $100

$3,800

$200,000

Page 288: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 7-77Orchard Publications

Exercises

Plan A involves the purchase of non appreciating tax-free securities paying per annum.Dividends will be invested at a net return of , and the securities will be sold at the end of

years.

Plan B calls for the purchase of income property consisting of land worth and apart-ments worth . It is estimated that the units will have an average occupancy of ,a useful life of years and a salvage value at the end of that time of . The land isexpected to triple in value during this period. Taxes are per thousand on a valua-tion. Insurance is per year, repairs will be annually, and income at full occu-pancy will be per month. A real estate agency must be paid of gross income.Income taxes are estimated at of net income. The annual net profit is invested at a netreturn of . Depreciation as a credit against income taxes is assumed to be straight line.

Calculate the value of each plan at the end of years, state which plan would be more prof-itable and show the difference in sums.

18. Fourteen years ago a -Kw steam electric plant was constructed at a cost of per Kw.Annual operating expenses have been to produce the annual demand of Kw-hours. It is estimated that the annual operating expenses and demand for current willcontinue at the current level. The original estimate of a -year life with a salvage valueat that time is still expected to be correct.

The company is contemplating the replacement of the old steam plant with a new -Kwdiesel plant. The old plant can be sold now for , while the new diesel plant will cost

per Kw to construct. The diesel plant will have a life of years with a salvage value of at the end of that time and will cost annually to operate. Annual taxes and

insurance will be of the first cost of either plant. Using an interest rate of , deter-mine whether the company is financially justified in replacing the old steam plant now.

19. The yearly requirement of a manufacturer is units of a part that is used at a uniformrate throughout the year. The machine set-up cost per lot is . Production cost is per unit. Interest, insurance and taxes are estimated at on average inventory. The costof storing the parts is estimated at per unit per year. Calculate the economic lot size.

1.5%2%

20

$40,000$160,000 90%

20 10%$60 50%

$600 $1,000$1,200 3%

20%2%

20

1200 $220$31,000 5 400 000

20 5%

1200$75,000

$245 2510% $23,000

2.3% 5%

1000$40 $5.20

12%$0.80

Page 289: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 7 Mathematics of Finance and Economics

7-78 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

7.14 Solutions to Exercises

1. or with Excel =FV(0.043,1,0,-850,0)= 886.55

2. or with Excel =FV(0.045,5,0,-200,0) = 249.24

3. or with Excel =FV(0.037/12,1*2,0,-560,0)=563.46

4.

or with Excel =FV(0.05/4,7*4,0,-1500)=2123.99

5. or with Excel =PV(0.07,2,0,3200) = 2,795

6.

from which

and with Excel

=FV(0.04/4,(5*4+2),0,-8000,0)+FV(0.04/4,5*4,0,-1000,0)+FV(0.04/4,4*4,0,-750,0)

+FV(0.04/4,(2*4+3),0,1200,0)=10,718.55

7.

8.

Cost of new machine 10,000

Trade-in 750

Net cost 9250

850 1 0.043+ $886.55=

200 1 0.045+ 5 $249.24=

560 1 0.037 12 2+ $563.45=

1500 1 0.054

----------+7 4

1500 1.0125 28 $2,123.99= =

3200 1 0.07+ 2– $2,795=

8000 1.01 22 1000 1.01 20 750 1.01 16 1200 1.01 11–+ + x=

8000 1.24472 1000 1.22019 750 1.17258 1200 1.11567–+ + x=

9957.76 1220.19 879.43 1338.80–+ + x= x 10718.58=

1500 1.0125 12 1500 1.0125 8 2000 1.0125 4+ +

1500 1.16075 1500 1.10449 2000 1.05095+ +

1741.125 1656.735 2101.90+ + 5499.76=

9250 5499.76– 3750.24=

Pn P0 1 i+ n=

P0Pn

1 i+ n------------------ Pn 1 i+ n–= =

P0 50000 1 0.15+ 26– 50000 0.67902 $33,951= = =

Page 290: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 7-79Orchard Publications

Solutions to Exercises

9.

and thus

10.

11.

Therefore, interest earned is

12. Assumptions:

1. Purchase date is selected as our valuation date

2. Interest of is compounded annually.

Machine A:

Machine B:

Savings by choosing Machine B,

13.

x 1.015 26 x 1.015 24 x 1.015 20+ + 50000=

x 1.47271 x 1.42950 x 1.34686+ + 50000=

4.25x 50000= x 11 765=

P n– P0 1 i+ n–=

P n1– 1000 1 1.05+ 2– 1000 0.90703 907.03= = =

P n2– 1500 1 1.05+ 3– 1500 0.86384 1295.22= = =

P n3– 1800 1 1.05+ 4– 1800 0.82270 1480.86= = =

907.03 1295.22 1480.86+ + 3683.11=

Pn P0 1 i+ n 1000 1.06 5 1000 1.41852 1418.52= = = =

1418.52 1000– 418.52=

7%

36500 1500 1.07 5– 2000 1.07 10–+ + 36500 1500 0.71299 2000 0.50835+ +=

36500 1069.50 1016.70+ + 38586.20==

36300 3800 1.07 9–+ 36300 3800 0.54393+ 38367= =

38586 38367– 219=

1000 1.0175 6 2000 1.0175 4 300 1.0175–+

1000 1.10970 2000 1.07186 300 1.0175–+ 2948.17=

2948.17 1.02 8 1600 1.02 7 1200 1.02 6–+

2948.17 1.17166 1600 1.14869 1200 1.12616–+

3454.25 1837.90 1351.39–+ 3940.76=

Page 291: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 7 Mathematics of Finance and Economics

7-80 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

14.

15.

Solving for we get:

Therefore, it will take 11 semiannual periods or 5.5 years.

16.

This yields . Since our approximation has given insufficient weight to receipts, thetrue investment rate is higher than this. Let us try an interest rate of .

The amount required to yield this rate is

or . But this number is higher than which is the amount theinvestor received at the end of the period. Therefore, the interest rate must be slightly lower.Let us try an interest rate of .

or

We will use the graph below to apply straight-line interpolation

Pn P0 1 i+ n 2000 1.0375 10 2890.08= = =

Pn P0 1 i+ n=

Pnlog P0 n 1 i+log+log=

n

nPnlog P0log–

1 i+log---------------------------------- 3000 2000log–log

1.0375log---------------------------------------------- 3.477 3.301–

0.016--------------------------------- 0.176

0.016------------- 11= = = = =

3600 4i 3600+ 105 3i 105+ 110 2i 110+ 110 i 110+ 100 3800+ + + +=

i 4.15%=

4.3%

y

3600 1.043 4 105 1.043 3 110 1.043 2 110 1.043+ +– y=

y 3906.77= 100 3800+ 3900=

4.25%

3600 1.0425 4 105 1.0425 3 110 1.0425 2 110 1.0425+ +– y=

y 3898.94=

4.25

3898.94

4.30

3976.773900.00

x (%)

y ($)

Page 292: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 7-81Orchard Publications

Solutions to Exercises

Therefore, the actual interest rate is . This is the semiannual rate. The annual rate is.

17. Plan A:

The lump sum at the end of years will be

Plan B:

where

Depreciation is allowable on the apartment units only and it will subject the investor to acapital gains tax at the end of years. Thus,

PP (Purchase Price, i.e., Initial Invest-ment)

SV (Salvage Value) PP-SV

Apartment Units $160,000 10% 160,000=$16,000 160,000 16,000=$144,000Land 40,000 120,000 80,000Total $200,000 $136,000 $64,000

xi1

slope-------------- yi y1– x1+

1m---- yi y1– x1+= =

xy 3900.00=1

slope-------------- 3900.00 2898.94– 0.0425+

13906.77 3898.94–0.0430 0.0425–

------------------------------------------------------------------------------------------ 1.06 0.0425+= =

0.00057.83

---------------- 1.06 0.0425+ 0.0426==

4.26%8.52%

FV Payment 1 interest+ n 1–interest

----------------------------------------------=

20

Lump sum 200000 200000 0.015 1 0.02+ 20 1–0.02

--------------------------------------+=

200000 3000 24.2974+ $272 892.10==

Taxable Income Gross Revunue Operating Expenses Depreciation+–=

Gross Revenue 12 months 1 200 month 0.9 occupancy, $12 960,= =

Operating ExpensesReal EstateFee at 3% of $12,960 + Property Taxes + Insurance + Repairs=

0.03 12960 601000------------ 200 000 0.50,+ 600 1000+ + $7 988.80,==

20

Page 293: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 7 Mathematics of Finance and Economics

7-82 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

and

Since total credits of exceed the gross revenue of , there would be noannual income tax and the amount available for investment would be

and if this amount is invested for a return of , the lump sum available at the end of years would be

The lump sum in Plan A was found to be . Therefore, before capital gains tax, PlanA is more profitable by .

18. For convenience, we tabulate the given data as shown below.

Electric Plant Diesel Plant

Plant Capacity 1200 Kw 1200 Kw

Investment per Kw $220 $245

Original Investment (PP) 264,000 294,000

Estimated Life 20 years 25 years

End of Life Salvage Value (ESV) 5%PP=13,200 10%PP=29,400

Present Age of Investment 14 years N/A

Remaining Life (RL) 6 years N/A

Present Salvage Value (PSV) 75,000 N/A

Annual Expenditures (AE) Operating Expenses 31,000 23,000

Taxes and Insurance 2.3%PP=6072 2.3%PP=6762

Total Annual Expenditures 37,072 29,762

Straight Line Depreciation 160 000 16 000,–,20

--------------------------------------------- $7 200,= =

Total credits against income taxes Total Operating Expenses Depreciation+=$7 988.80 $7 200,+, $15 188.80,==

$15 188.80, $12 960,

Amount Available for Investment Gross Revenue Credits against Income Taxes–=$12 960.00 $7 988.80,–, $4 971.20,==

2% 20

LumpSum Amount Available for Investment SalvageValue+=

4 971.20 1 0.02+ 20

0.02-------------------------------, 136 000,+ 4 971.20 24.2974 136 000,+,==

$256 787.10,=

$272 892.10,$272 892.10, $256 787.10,– $16 105,=

Page 294: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 7-83Orchard Publications

Solutions to Exercises

We will use (7.40) to compute the annual costs for each plant, i.e.,

where for the electric plant , and the diesel plant

For the existing (electric) plant, let

Then,

For the diesel plant

From a practical point of view, the economics indicate a standoff due to the small differentialbetween values of SA and AC.

19. Let us denote the economic lot size as where lot size is the number of units manufacturedwith one machine set-up. Then

and

Next,

and

Total Annual Cost PP SV– i

1 i+ n 1–---------------------------- PPi AE+ +=

n 20 14– 6= = n 25=

SA Annual Savings if existing plant is replaced=

SA PSV ESV– i

1 i+ n 1–---------------------------- PSVi AE+ +=

75000 13200– 0.05

1 0.05+ 6---------------------------- 75000 0.05 37072++=

61800 0.14702 3750 37072+ + $49 907.68,==

AC PP SV– i

1 i+ n 1–---------------------------- PPi AE+ +=

294000 29400– 0.05

1 0.05+ 25------------------------------- 294000 0.05 29762++=

264600 0.020952 14700 29762+ + $50 006.02,==

x

Number of lots per year Number of machine setups 1000x

------------= =

Annual t for all setupscos $40 1000x

------------ 40 000,x

------------------= =

Average number of units in storage Average inventory x2---= =

Page 295: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 7 Mathematics of Finance and Economics

7-84 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

Also,

and

The annual production costs are

Therefore, total annual costs

By inspection,

and the economic lot size is

This lot size would require

and rounding this number to lots, we find that the units should be manufactured in lots of units each lot.

Inventory t per yearcos Production t per unit Average inventorycos=

$5.20 x2--- $2.60x==

Interest Insurance and Taxes on Average Inventory,, 12% $2.60x $0.312x= =

Storage tscos $0.80 x2--- $0.40x= =

AC $5.20 1000 $5 200,= =

y 0.312 0.40+ x 40 000,x

------------------ 5 200,+ + 0.712x 40 000,x

------------------ 5 200,+ += =

a 0.712= b 40 000,=

x ba--- 40 000,

0.712------------------ 237units= = =

1000237------------ 4.22 lots=

4 1000 4250

Page 296: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 8-1Orchard Publications

Chapter 8

Depreciation, Impairment, and Depletion

his chapter introduces the concept of depreciation as applied to business and financialapplications. The different methods of depreciation are discussed and are illustrated withseveral examples.

8.1 Depreciation DefinedA capital asset is a piece of equipment, a building, or a vehicle for use in our business. When webuy a capital asset, we expect to use it for several years. The cost of these capital assets should bewritten off over the same period of time we expect them to earn income for us. Therefore, we mustspread the cost over several tax years and deduct part of it each year as a business expense. Asthese assets wear out, lose value, or become obsolete, we recover our cost as a business expense.This method of deducting the cost of business property is called depreciation.

The concept of depreciation is really pretty simple. For example, let’s say we purchase a truck forour business. The truck loses value the minute we drive it out of the dealership. The truck is con-sidered an operational asset in running our business. Each year that we own the truck, it losessome value, until the truck finally stops running and has no value to the business. Measuring theloss in value of an asset is known as depreciation.

Depreciation is considered an expense and is listed in an income statement under expenses. Inaddition to vehicles that may be used in our business, we can depreciate office furniture, officeequipment, any buildings we own, and machinery we use to manufacture products.

There are two types of property that can be depreciated:

Real Property - Buildings (real estate) or anything else built on or attached to land. However,land can never be depreciated.

Personal Property - Cars, trucks, equipment, furniture, or almost anything that is not real prop-erty.

As stated above, land is not considered an expense; therefore, it cannot be depreciated. This isbecause land does not wear out like vehicles or equipment.

To find the annual depreciation cost for our assets, we need to know the initial cost of the assets.We also need to determine how many years we think the assets will retain some value for our busi-ness. In the case of the truck, it may only have a useful life of ten years before it wears out andloses all value.

T

Page 297: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 8 Depreciation, Impairment, and Depletion

8-2 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

8.2 Items that Can Be DepreciatedWe can depreciate many different kinds of property, for example, machinery, buildings, vehicles,patents, copyrights, furniture and equipment. We can depreciate property if it meets all the fol-lowing requirements:

1. It must be used in business or held to produce income

2. It must be expected to last more than one year

3. It must be something that wears out, decays, gets used up, becomes obsolete, or loses its valuefrom natural causes.

8.3 Items that Cannot Be Depreciated We cannot depreciate the following items

1. Property placed in service and disposed of in the same year

2. Inventory

3 Land

4. Repairs and replacements that do not increase the value of our property, make it more useful,or lengthen its useful life.

5. Items which do not decrease in value over time are not depreciated. These include antiquesover 100 years old, expensive solid wood furniture such as that made of oak or walnut, and finechina.

8.4 Depreciation RulesUnder the claims statute, an individual is paid the actual value of an item at the time of its loss.Certainly, one should not expect to be reimbursed more than an item was worth when it was lostor destroyed beyond repair. That would put us in a better position than we were in before the inci-dent. For example, if we owned a five year old computer, we would not expect someone to pay usfor a brand new computer. Although our computer may have been working, it was still a usedcomputer. Accordingly, we should be paid for the actual value of our used item. We can then usethe money to buy a similar used item, or, we can apply the money toward the cost of a newer itemif we choose.

The actual value of an item is the current replacement cost minus depreciation, if any. Currentreplacement cost takes inflation and local unavailability into account. If the item costs more nowthan when we bought it, or is not available in the local area, we provide the current replacementprice of the item where it can be found. Therefore, the actual value is a fair measure of what aclaimant should be paid. The actual value rule in effect does pay us the replacement cost. Onecan obtain insurance if he/she wants full replacement cost coverage.

Page 298: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 8-3Orchard Publications

When Depreciation Begins and Ends

8.5 When Depreciation Begins and EndsWe begin to depreciate our property:

1. When we place it in service for use in our trade or business

2. For the production of income.

We stop depreciating property either:

1. When we have fully recovered our cost or other basis, or

2. When we retire it from service, whichever happens first

For depreciation purposes, we place property in service when it is ready and available for a spe-cific use, whether in a trade or business, the production of income, a tax-exempt activity, or apersonal activity.

Example 8.1

Suppose we bought a home and used it as our personal home several years before we converted itto rental property. Although its specific use was personal and no depreciation was allowable, weplaced the home in service when we began using it as our home. We can claim a depreciationdeduction in the year that we converted it to rental property because its use changed to anincome-producing use at that time.

Example 8.2

We bought a computer for our tax preparation business after April 15. We take a depreciationdeduction for the computer for that year because it was ready and available for its specific use.

8.6 Methods of DepreciationOur annual depreciation expense depends on the depreciation method that we choose. Theseare:

1. Straight-line depreciation

2. Sum of the Year’s Digits

3. Fixed Declining Balance

4. General Declining Balance (125%, 150%, 200%)

5. Variable-Declining Balance

6. Units of Production

We can choose a different method of depreciation for each asset that we own. The method that

Page 299: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 8 Depreciation, Impairment, and Depletion

8-4 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

we choose depends on the type of property and the needs of our business. For certain types ofassets, an accelerated method of depreciation will be more appropriate. For others, we may decideto keep it simple by depreciating the same amount each year.

We will discuss each in the following sections.

8.7 Straight-Line (SL) Depreciation MethodStraight-line depreciation is considered to be the most common method of depreciating assets. Tocompute the amount of annual depreciation expense using the straight-line method requires twonumbers:

1. The initial cost of the asset less its salvage value

2. Its estimated useful life.

In other words, straight line depreciation is computed with the use of the following formula:

(8.1)

Example 8.3

Suppose that we purchase a truck for and we expect to use it in our business for years.Using the straight-line method for determining depreciation, and assuming that the salvage valueis we would divide the initial cost of the truck by its useful life.

The becomes a depreciation expense that is reported on our income statement underoperation expenses at the end of each year. The useful life is years; therefore, the depreciationis

(8.2)

Thus, the depreciation is per year for the next ten years.

We can use Excel’s SLN function to compute the straight line depreciation of an asset for oneperiod. It’s syntax is

=SLN(Cost,Salvage_Value,Life)

For this example, =SLN(30,000,1000,10) returns

8.8 Sum of the Years Digits (SYD) MethodSum of the Years Digits (SYD) is a method of accelerated depreciation. Accelerated methodsassume that a fixed asset loses a greater proportion of its value in the early years of use. Conse-quently, the amount of depreciation expense is higher at the beginning of the useful life, anddeclines over time.

Annual depreciation enseexp Cost Salvage value–Estimated useful life--------------------------------------------------------=

$30,000 10

$1,000

$30,00010

Annual depreciation enseexp 30000 1000–10

--------------------------------- 2900= =

$2,900

$2,900

Page 300: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 8-5Orchard Publications

Sum of the Years Digits (SYD) Method

Some kinds of property cars, for instance are more efficiently productive in the initial years ofuse. Over time, they become more costly to maintain. Rising maintenance and repair costs tendto offset the lower depreciation expense in later years. Property with this characteristic makes agood candidate for an accelerated method.

SYD is computed with the use of the following formula:

(8.3)

where period is the year in which depreciation is computed, and we must use the same units asuseful life, that is, years, months, and so on.

The expression in the numerator of (8.3) indicates the life of the depre-ciation in the first period decreased by in each subsequent period. This reflects the decliningpattern of depreciation over time. The expression in the

denominator is equal to the sum of the digits, that is, if we denote the sum of the years digits

and the useful life as , then

We must remember that (8.3) yields the depreciation for some particular year, not the totaldepreciation up to that year. To compute the total depreciation to the end of the nth year, we usethe equation

(8.4)

Example 8.4

Suppose that we purchase a truck for and we expect to use it in our business for years.Using the SYD method for determining depreciation, and assuming that the salvage value is

, for the first period (first year) the depreciation is:

(8.5)

Thus, the depreciation for the first year is

We can use Excel’s SYD function to compute the SYD depreciation of an asset for any period. It’ssyntax is

=SYD(Cost,Salvage_Value,Life,Period)

SYD Cost Salvage value– Useful life Period– 1+Useful life Useful life 1+

2----------------------------------------------------------------------------------

-------------------------------------------------------------------------------------------------------------------------------------=

Useful life Period– 1+

1Useful life Useful life 1+ 2

x

n

x 1 2 3 n 2– n 1– n+ + + + + + n n 1+2

--------------------= =

SYDTotal to nth yearCost Salvage value– 2 Useful life Period– 1+

Useful life Useful life 1+-----------------------------------------------------------------------------------------------------------------------------------------------=

$30,000 10

$1,000

SYD 30000 1000– 10 1– 1+ 210 10 1+

---------------------------------------------------------------------------------- 580000110

------------------ 5272.73= = =

$5,272.73

Page 301: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 8 Depreciation, Impairment, and Depletion

8-6 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

For this example,

=SYD(30,000,1000,10,1) returns

For the seventh period (seventh year) the depreciation is found by using the Excel formula

=SYD(30,000,1000,10,7) and this returns

8.9 Fixed-Declining Balance (FDB) MethodThe Fixed-Declining Balance (FDB) method computes depreciation at a fixed rate. For any periodother than the first and the last, this method uses the following formula:

(8.6)

For the first period, FDB uses the following formula:

(8.7)

where is the number of months in the first year.

For the last period, FDB uses the following formula:

(8.8)

Example 8.5

Suppose that we purchase a truck for in June and we expect to use it in our business for years. Using the FDB method for determining depreciation, and assuming that the salvage

value is , for the first period (first year) the depreciation is computed using the formula of(8.7) as follows:

(8.9)

We can use Excel’s DB function to compute the fixed-declining balance method of depreciation.

$5,272.73

$2,109.09

FDB Cost Total depreciation from prior periods– 1 Salvage valueCost

-------------------------------------

1Life----------

–=

FDB1st year Cost 1 Salvage valueCost

-------------------------------------

1Life----------

–Month

12-----------------=

Month

FDBLast year Cost Total depreciation from prior periods–=

1 Salvage valueCost

-------------------------------------

1Life----------

–12 Month–

12-----------------------------

$30,00010

$1,000

FDB1st year 30000 1 100030000---------------

110------

–7

12------ 210000

12------------------ 1 0.712– 5040= = =

Page 302: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 8-7Orchard Publications

Fixed-Declining Balance (FDB) Method

It’s syntax is

=DB(Cost,Salvage_Value,Life,Period,Month)

If the Month is omitted, it is assumed to be

For this example,

=DB(30000,1000,10,1,7) returns

The depreciation for the second through the tenth year is computed with the formula of (8.8).For instance, the depreciation for the second year is found from

(8.10)

We can verify this result with Excel’s DB function as follows:

=DB(30000,1000,10,2,7) and this returns

The depreciation for the last period is computed with the formula of (8.7). But this formularequires that we compute the depreciation for all previous years. For convenience, we use Excel’sDB function and we construct the following table:

The sum of the first 10 periods on this table is approximately and this number representsthe total depreciation taken in previous years. We will verify the depreciation of the eleventhyear using the formula of (8.8). Thus, the depreciation for the eleventh year, with only 5 monthsis found from

12

$5,040

FDB2nd year 30000 5040– 1 100030000---------------

110------

– 24960 1 0.712– 7188.48= = =

$7,188.48

Period Depreciation1 $5,040.002 $7,188.483 $5,118.204 $3,644.165 $2,594.646 $1,847.387 $1,315.348 $936.529 $666.80

10 $474.7611 $140.85

$28,826

Page 303: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 8 Depreciation, Impairment, and Depletion

8-8 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

(8.11)

8.10 The 125%, 150%, and 200% General Declining Balance (GDB) MethodsThe 125%, 150%, and 200% Declining Balance methods are also accelerated depreciation meth-ods, and are used when the productivity of an asset is expected to be greater during its early yearsof use. These methods use the following formula:

(8.12)

where is the rate at which the balance declines.

For the 125% declining balance,

For the 150% declining balance,

For the 200% declining balance,

The 200% declining balance is also referred to as Double Declining Balance (DDB).

The total depreciation taken in prior years cannot exceed the salvage value.

Example 8.6

Suppose that we purchase a truck for and we expect to use it in our business for years.Using the DDB method for determining depreciation, and assuming that the salvage value is

, for the first period (first year) the depreciation is computed using the formula of (8.11) asfollows:

(8.13)

We can use Excel’s DDB function to compute the double-declining balance method of deprecia-tion. It’s syntax is

=DBB(Cost,Salvage_Value,Life,Period,Factor)

If the Factor is omitted, it is assumed to be 2

Note: Although Excel requires that Salvage_Value is specified, it produces the same result nomatter what value we specify. Thus, with a salvage value of 0, 1000, or 2000, we get the same

FDB11th year 30000 28826– 1 100030000---------------

110------

–12 7–

12---------------=

1174 1 0.712–= 512------ 140.85=

GDB Cost Total depreciation from prior periods–Factor

Life of asset---------------------------------=

Factor

Factor 1.25=

Factor 1.50=

Factor 2.00=

$30,000 10

$1,000

DDB 30000 0–2

10------ 6000= =

Page 304: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 8-9Orchard Publications

The Variable Declining Balance (VDB) method

answer as shown below.

For this example, =DDB(30000,0,10,1,2) returns

=DDB(30000,1000,10,1,2) returns also.

=DDB(30000,2000,10,1,2) returns again.

If the salvage value of an asset is relatively low, the DDB method may not fully depreciate theasset by the end of the estimated useful life. The spreadsheet below shows that at the end of the

year period, only has been depreciated.

We can use the Variable Declining Balance (VDB) method which always fully depreciates theasset within the estimated life. This method is discussed in the next section.

8.11 The Variable Declining Balance (VDB) methodThe Variable Declining Balance (VDB) method computes the depreciation of an asset using theDDB method, and switches to SL method when the SL depreciation is greater than the DDBmethod or any other variable-rate declining balance method.

We can use Excel’s VDB function to compute the double-declining balance method of deprecia-tion. It’s syntax is

=DBB(Cost,Salvage_Value,Life,Start_Period,End_Period,Factor,No_Switch)

where:

Cost = Initial cost of the asset

Salvage_Value = The value of the asset at the end of the depreciation period

Life = The number of periods over which the asset is depreciated

Start_Period = The starting period for which we want to calculate the depreciation

$6,000

$6,000

$6,000

10 $26,779

Period Depreciation1 $6,000.002 $4,800.003 $3,840.004 $3,072.005 $2,457.606 $1,966.087 $1,572.868 $1,258.299 $1,006.63

10 $805.31Sum $26,778.77

Page 305: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 8 Depreciation, Impairment, and Depletion

8-10 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

End_Period = The ending period for which we want to calculate the depreciation

Factor = The rate at which the balance declines. If the Factor is omitted, it is assumed to be 2.

No_Switch = A logical value (TRUE or FALSE) that specifies whether to switch to straight linedepreciation when SL depreciation is greater than the declining balance method. If No_Switch isTRUE, Excel does not switch to SL depreciation even when the SL depreciation is greater thanthe declining balance depreciation. If No_Switch is FALSE or omitted, Excel switches to SLdepreciation when the SL depreciation is greater than the declining balance depreciation.

Example 8.7

Suppose that we purchase a truck for and we expect to use it in our business for years.Using the 150% declining balance method for determining depreciation, and assuming that thesalvage value is , the Excel formulas below compute the depreciation for each year. Weobserve that the switch to SL depreciation occurs in the sixth period.

8.12 The Units of Production (UOP) methodThe Units of Production (UOP) method allocates depreciation expenses according to actual physi-cal usage. We can use this method for assets that have limited productive capacity. It is an appro-priate method to use when the usage of a fixed asset varies from year-to-year. Unlike the SLmethod which treats depreciation as a fixed cost, the UOP method treats depreciation as a vari-able cost.

As an example, an asset that is a good candidate for this depreciation method is a large deliverytruck that it can be driven for miles before expensive maintenance costs render it use-less. With such an asset, it is immaterial whether the miles are driven in a few or many years.

For the UOP depreciation method, we use the following formula:

$30,000 10

$1,000

Period Formula DepreciationFirst =VDB(10000,1000,10,0,0.875,1.5) $1,312.50Second =VDB(10000,1000,10,0.875,1.875,1.5) $1,303.13Third =VDB(10000,1000,10,1.875,2.875,1.5) $1,107.66Forth =VDB(10000,1000,10,2.875,3.875,1.5) $941.51Fifth =VDB(10000,1000,10,3.875,4.875,1.5) $800.28Sixth =VDB(10000,1000,10,4.875,5.875,1.5) $689.74Seventh =VDB(10000,1000,10,5.875,6.875,1.5) $689.74Eighth =VDB(10000,1000,10,6.875,7.875,1.5) $689.74Ninth =VDB(10000,1000,10,7.875,8.875,1.5) $689.74Tenth =VDB(10000,1000,10,8.875,9.875,1.5) $689.74Last =VDB(10000,1000,10,9.875,10,1.5) $86.22Total Depreciation =Initial cost minus Salvage value $9,000.00

250 000

Page 306: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 8-11Orchard Publications

Depreciation Methods for Income Tax Reporting

(8.14)

Example 8.8

Suppose that on the first day of the year we bought a machine for and we estimate thatthis machine will have a good working life of years. At the end of years, we expect to sell itfor . We expect that the machine will produce units the first year, unitsthe second year, units the third year, units the fourth year, and unitsthe fifth year for a total of during the -year period. We compute the annual deprecia-tion with the formula of (8.14).

The depreciation schedule is shown on the table below.

We observe that the carrying cost at the end of the year 2007 is exactly $20,000 which is the sal-vage value of the machine.

8.13 Depreciation Methods for Income Tax ReportingIt is beyond the scope of this text to provide detailed description of the depreciation methods setforth by the Internal Revenue Service (IRS). Therefore, in this section we will briefly discuss thefollowing methods:

1. The Accelerated Cost Recovery System (ACRS)

2. The Modified Accelerated Cost Recovery System (MACRS)

Section 179

Each of these is an accelerated depreciation method, and the method used depends on the type ofproperty and the year it was placed in service. These methods are not acceptable by the so-calledGenerally Accepted Accounting Principles (GAAP). For a detailed discussion of these methods,the interested reader may refer to IRS Publication 946: How To Depreciate Property.

Annual depreciation Initial t - Salvage valuecosTotal estimated units of output------------------------------------------------------------------------------------=

$100,0005 5

$20,000 180 000 160 000140 000 120 000 100 000

700 000 5

Annual depreciation $100000 $20000–800000 units

--------------------------------------------- $0.1 per unit= =

Year Ended Balance Units Produced Annual Depreciation Carrying Cost$0.1xunits produced

1/1/2003 $100,00012/31/2003 $100,000 200,000 $20,000 $80,00012/31/2004 $80,000 180,000 $18,000 $62,00012/31/2005 $62,000 160,000 $16,000 $46,00012/31/2006 $46,000 140,000 $14,000 $32,00012/31/2007 $32,000 120,000 $12,000 $20,000

Page 307: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 8 Depreciation, Impairment, and Depletion

8-12 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

8.14 The Accelerated Cost Recovery System (ACRS)The Accelerated Cost Recovery System (ACRS) is an accounting method for calculating the depre-ciation of tangible assets on the basis of the estimated-life classifications into which the assets areplaced. ACRS was initiated by the Economic Recovery Act of 1981. The intent was to makeinvestments more profitable by sheltering large amounts of income from taxation during the earlyyears of an asset's life. The initial law established classifications of 3, 5, 10, and 15 years; theseclassifications were subsequently modified in order to reduce depreciation and increase the gov-ernment's tax revenues. The classification into which an asset is placed determines the percent-age of the cost potentially recoverable in each year.

8.15 The Modified Accelerated Cost Recovery System (MACRS)The Modified Accelerated Cost Recovery System (MACRS) is a depreciation method in which assetsare classified according to a prescribed life or recovery period hat bears only a rough relationshipto their expected economic lives. MACRS represents a 1986 change to the Accelerated CostRecovery System (ACRS) that was instituted in 1981. The depreciation rates in MACRS arederived from the double-declining-balance method of depreciation.

MACRS consists of two depreciation systems, the General Depreciation System (GDS) and theAlternative Depreciation System (ADS). These systems provide different methods and recoveryperiods to use in computing depreciation deductions.

To depreciate property under MACRS, the taxpayer must be familiar with the following terms:

Class Life: A number of years that establishes the property class and recovery period for mosttypes of property under the General Depreciation System (GDS) and the Alternative Deprecia-tion System (ADS).

Listed Property: Passenger automobiles, or any other property used for transportation, propertyof a type generally used for entertainment, recreation, or amusement, computers and their periph-eral equipment (unless used only at a regular business establishment and owned or leased by theperson operating the establishment), and cellular telephones or similar telecommunicationsequipment.

Nonresidential real property: Most real property other than residential rental property.

Placed in service: Ready and available for a specific use whether in a trade or business, the pro-duction of income, a tax-exempt activity, or a personal activity.

Property class: A category for property under MACRS. It generally determines the depreciationmethod, recovery period, and convention.

Recovery period: The number of years over which the basis (cost) of an item of property is recov-ered.

Residential rental property: Real property, generally buildings or structures, if 80% or more of its

Page 308: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 8-13Orchard Publications

The Modified Accelerated Cost Recovery System (MACRS)

annual gross rental income is from dwelling units.

Section 1245 property: Property that is or has been subject to an allowance for depreciation oramortization. Section 1245 property includes personal property, single purpose agricultural andhorticultural structures, storage facilities used in connection with the distribution of petroleum orprimary products of petroleum, and railroad grading or tunnel bores.

Section 1250 property: Real property (other than section 1245 property) which is or has beensubject to an allowance for depreciation.

Tangible property: Property we can see or touch, such as buildings, machinery, vehicles, furni-ture, and equipment.

Tax-exempt: Not subject to tax.

Our use of either the General Depreciation System (GDS) or the Alternative Depreciation Sys-tem (ADS) to depreciate property under MACRS determines what appreciation method andrecovery period we use. Generally, we must use GDS unless we are specifically required by law touse ADS or we elect to use it.

We must use ADS for the following property:

Listed property used 50% or less for business.

Any tangible property used predominantly outside the United States during the year.

Any tax-exempt use property.

Any tax-exempt bond-financed property.

All property used predominantly in a farming business and placed in service in any tax yearduring which an election not to apply the uniform capitalization rules to certain farming costsis in effect.

Any imported property covered by an executive order of the President of the United States.

Any property for which an election to use ADS was made (discussed next).

Electing ADS

Although our property may qualify for GDS, we can elect to use ADS. The election generallymust cover all property in the same property class that we placed in service during the year. How-ever, the election for residential rental property and nonresidential real property can be made ona property-by-property basis. Once we make this election, we can never revoke it.

The following is a list of the nine property classes under GDS and examples of the types of prop-erty included in each class.

Page 309: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 8 Depreciation, Impairment, and Depletion

8-14 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

3 year property:

a) Tractor units for over-the-road use

b) Any race horse over 2 years old when placed in service

c) Any other horse over 12 years old when placed in service

d) Qualified rent-to-own property*

5 year property:

a) Automobiles, taxis, buses, and trucks

b) Computers and peripheral equipment

c) Office machinery (such as typewriters, calculators, and copiers)

d) Any property used in research and experimentation

e) Breeding cattle and dairy cattle

f) Appliances, carpets, furniture, etc., used in a residential rental real estate activity

7 year property:

a) Office furniture and fixtures (such as desks, files, and safes).

b) Agricultural machinery and equipment.

c) Any property that does not have a class life and has not been designated by law as being in anyother class.

10 year property:

a) Vessels, barges, tugs, and similar water transportation equipment

b) Any single purpose agricultural or horticultural structure

c) Any tree or vine bearing fruits or nuts

* Qualified rent-to-own property is property held by a rent-to-own dealer for purposes of being subject to a rent-to-own contract. It is tangible personal property generally used in the home for personal use. It includes computersand peripheral equipment, televisions, videocassette recorders, stereos, camcorders, appliances, furniture, wash-ing machines and dryers, refrigerators, and other similar consumer durable property. Consumer durable propertydoes not include real property, aircraft, boats, motor vehicles, or trailers.If some of the property we rent to others under a rent-to-own agreement is of a type that may be used by the rent-ers for either personal or business purposes, we can still treat this property as qualified property as long as it doesnot represent a significant portion of our leasing property. But, if this dual-use property does represent a signifi-cant portion of our leasing property, we must prove that this property is qualified rent-to-own property.

Page 310: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 8-15Orchard Publications

The Modified Accelerated Cost Recovery System (MACRS)

15 year property:

a) Certain improvements made directly to land or added to it (such as shrubbery, fences, roads,and bridges).

b) Any retail motor fuels outlet* such as a convenience store.

20 year property:

This class includes farm buildings (other than single purpose agricultural or horticultural struc-tures).

25 year property:

This class is water utility property, which is either of the following.

a) Property that is an integral part of the gathering, treatment, or commercial distribution ofwater, and that, without regard to this provision, would be 20 year property.

b) Any municipal sewer

Residential rental property:

This is any building or structure, such as a rental home (including a mobile home), if 80% or moreof its gross rental income for the tax year is from dwelling units. A dwelling unit is a house orapartment used to provide living accommodations in a building or structure. It does not include aunit in a hotel, motel, inn, or other establishment where more than half the units are used on atransient basis. If we occupy any part of the building or structure for personal use, its gross rentalincome includes the fair rental value of the part we occupy.

Non-Residential real property:

This is Section 1250 property, such as an office building, store, or warehouse, that is neither resi-dential rental property nor property with a class life of less than 27.5 years.

If our property is not listed above, we can determine its property class from the Table of ClassLives and Recovery Periods in Appendix B of IRS Publication 946. The property class is generallythe same as the GDS recovery period indicated in the table.

To help us compute our deduction under MACRS, the IRS has established percentage tables that

* Real property is a retail motor fuels outlet if it is used to a substantial extent in the retail marketing of petroleumor petroleum products (whether or not it is also used to sell food or other convenience items) and meets any oneof the following three tests:• It is not larger than 1,400 square feet.• 50% or more of the gross revenues generated from the property are derived from petroleum sales.• 50% or more of the floor space in the property is devoted to petroleum marketing sales.A retail motor fuels outlet does not include any facility related to petroleum and natural gas trunk pipelines.

Page 311: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 8 Depreciation, Impairment, and Depletion

8-16 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

incorporate the applicable convention and depreciation method. We first determine the depreci-ation system (GDS or ADS), property class, placed-in service date, basis amount, recovery period,convention, and depreciation method that applies to our property. Then, we can compute thedepreciation using the appropriate percentage table provided by the IRS.

Appendix A of the IRS Publication 946* contains three charts to help us find the correct percent-age table to use. Presently, there are 20 tables (Table A-1 through Table A-20). Table 8-1 on thenext page is IRS Table A-1, that is used with the 3 ,5 ,7 ,10 ,15 , and 20 Year Property HalfYear Convention.

Example 8.9

Our company is a calendar-year corporation and has been in business for more than a year. OnJanuary 15, 2001, the company purchased and placed in service a computer and peripheral equip-ment for a total cost of . On December 15, 2001, the company purchased and placed inservice office furniture for a total cost of .

For this example, Table 8-1, MACRS Half-Year Convention applies. The computer and periph-eral equipment is a -year property. For the first year the rate is and thus the depreciationfor the first year is

The office furniture is a -year property, and for the first year the rate is . Therefore, thedepreciation for the first year is

For the year 2002 we use the same table but we use the percentages corresponding to the secondyear. Thus, the rate for the computer is and the depreciation for the second year is

The rate for the office furniture is and the depreciation for the second year is

The same procedure is used for later years.

8.16 Section 179Section 179 is a deduction allowed for up to the entire cost of certain depreciable business assets,other than real estate, in the year purchased, which we may be able to use as an alternative to

* IRS publications undergo frequent changes. The tables provided here are for instructional purposes only andtherefore the reader must obtained the latest publications from IRS.

$10,000$5,000

5 20%

$10000 0.20 $2000=

7 14.9%

$5000 0.1429 $714.50=

32%

$10000 0.32 $3200=

24.49%

$5000 0.2449 $1224.50=

Page 312: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 8-17Orchard Publications

Section 179

depreciating the asset over its useful life. The annual limit in 2001 was . We cannot usethe Section 179 deduction to the extent that it would cause us to report a loss from our business.

Typically, if property for business has a useful life of more than one year, the cost must be spreadacross several tax years as depreciation with a portion of the cost deducted each year.

The total amount we could elect to deduct under Section 179 for 2001 could not be more than. If we acquired and placed in service more than one item of qualifying property during

TABLE 8.1 3 ,5 ,7 ,10 ,15 , and 20 Year Property Half Year Convention

YearDepreciation rate for reecovery period

3-year 5-year 7-year 10-year 15-year 20-year

12345

6789

10

1112131415

1617181920

21

33.33%44.4514.81 7.41

20.00%32.0019.2011.5211.52

5.76

14.29%24.4917.4912.498.93

8.928.934.46

10.00%18.0014.4011.529.22

7.376.556.556.566.55

3.28

5.00%9.508.557.706.93

6.235.905.905.915.90

5.915.905.915.905.91

2.95

3.750%7.2196.6776.1775.713

5.2854.8884.5224.4624.461

4.4624.4614.4624.4614.462

4.4614.4624.4614.4624.461

2.231

$24,000

$24,000

Page 313: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 8 Depreciation, Impairment, and Depletion

8-18 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

the year 2001, we could allocate the Section 179 deduction among the items in any way, as longas the total deduction did not exceed . It is not necessary that we had to claim the entireamount of .

Beginning in the year 2003, the total amount we can elect to deduct under Section 179 is

Example 8.10

In 2001, we bought and placed in service a machine and a computer for our busi-ness. We elected to deduct the entire for the computer and , a total of which is the maximum amount we could deduct. Our deduction for the computer com-pletely recovered its cost and thus the basis for depreciation for the computer is zero. For themachine, since we deducted , the basis for depreciation for the machine is

If the cost of our qualifying Section 179 property placed in service is over , we mustreduce the dollar limit (but not below zero) by the amount of cover over . If the cost ofour Section 179 during 2001 was or more, we could not take a Section 179 deductionand we could not carry over the cost that is more than .

Example 8.11

In 2001, we bought and placed in service a machine costing . Because this cost is morethan , we should have reduced the dollar limit to

8.17 ImpairmentsAn impairment or decline of value, as defined by the accounting community, is a loss of a significantportion of the usefulness of an asset through casualty, obsolescence, or lack of demand for theasset’s services. When assets suffer a permanent impairment in value, an impairment loss isrecorded. An impairment loss is reported as part of income from continuing operations.

The following formula is used to compute the impairment loss:

(8.15)where

Book value: = net dollar value at which an asset is carried on a company’s balance sheet. Forexample an asset that was purchased for but on the books has depreciated hasa book value of . The book value should not be confused with the fair market valuewhich is defined below.

$24,000$24,000

$25,000

$24,000 $1,500$1,500 $22,500 $24,000

$1,500

$22,500

$25 000 $22500– $2 500=

$200,000$200,000

$224,000$224,000

$207,000$200,000

$24 000 $7 000– $17 000=

Impairment loss Book value Fair market value–=

$500,000 $300,000$200,000

Page 314: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 8-19Orchard Publications

Depletion

Fair market value: present value of an asset, that is, the value of a similar asset in its present condi-tion.

Example 8.12

Compute the impairment loss for each of the following assets:

a. Machine A: Book value = , Fair market value:

b. Machine B: Book value = , Fair market value:

c. Machine C: Book value = , Fair market value:

Solution:

a. Machine A:

The impairment loss is negative. Therefore, impairment for Machine A has not occurred.

b. Machine B:

The impairment loss is zero. Therefore, impairment for Machine B has not occurred.

c. Machine C:

The impairment loss is positive. Therefore, impairment for Machine C has occurred and it is.

8.18 DepletionAll natural resources of commercial value can be divided into two broad categories. The firstgroup consists of those resources in which nature reproduces, or replaces, the commodity that hasbeen extracted; the second group consists of those resources in which the extracted commodity isnot replaced. Thus, in the case of agricultural land, we can assume for valuation purposes thatnature will continue indefinitely to yield her annual harvest, barring any event that will renderthe land infertile. On the other hand, in the case of an oil well, a timber tract, or a mine, the min-eral that is extracted is not replaced, and there is consequently a definite limit to the wealthobtainable from the resource. Those in the latter group are designated “wasting” or “depleting”assets, by virtue of the fact that the asset “wastes away” or becomes depleted as it is exploited. Inthe case of several reproductive assets, the rate of extraction of the commodity must be regulatedto coincide with the rate at which nature is capable of replacing it.

The following factors are used to determine the depletion basis:

$100 $125

$150 $150

$275 $250

Impairment loss 100 125– 25–= =

Impairment loss 150 150– 0= =

Impairment loss 275 250– 25= =

$25

Page 315: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 8 Depreciation, Impairment, and Depletion

8-20 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

1. Acquisition costs: These costs include the price paid for the asset and any other costs tosearch for and find deposits of the natural resource.

2. Exploration costs: These costs include the price paid to extract the natural resource.

3. Development costs: These costs include drilling costs and tunnel formation. The costs for thepurchase of heavy equipment to extract and ship the natural resource is not part of the deple-tion basis.

4. Restoration cost: This costs is the price paid to restore the asset after extraction of the naturalresource.

8.19 Valuation of a Depleting AssetWhen the purchase of a depleting asset such as an ore deposit is contemplated, its accurateappraisal requires an estimate of the total quantity of mineral present, the rate at which it can beextracted, and the cost involved. In many numerical problems, the rate of extracting the ore andthe cost of this operation are considered to remain constant during the life of the asset, notwith-standing the fact that such is generally not the case. For convenience, we shall assume that theprofit realized through exploitation of the asset is calculated annually.

A wasting asset may possess some residual value after it is fully exhausted. For example, when thetimber has been completely removed from a tract of land, the land itself has commercial value. Inproblems pertaining to depletion, if no mention of salvage value appears, it is understood thatnone exists.

The final exhaustion of a depleting asset produces an abrupt cessation of the income derived fromits exploitation, assuming the absence of salvage value. Since none of the invested capital isrecovered at the conclusion of the venture, it follows that capital recovery occurred periodicallywhile the asset was being exploited. Hence, the annual profit of a depleting asset consists of twodistinct elements; the first is a return on the capital invested in the enterprise during that year,and the second is a partial restoration of the capital originally invested. The purchase and exploi-tation of a depleting asset therefore form a Type B investment and require the determination of anaverage investment rate rather than a constant rate pertaining to this asset alone.

To provide us with a rational means of calculating this average investment rate, the assumption ismade that the owners defer the recovery of their invested capital until the conclusion of the busi-ness venture by depositing a fixed portion of the annual profit in a sinking fund, the principal inthe fund to equal the original capital investment when the venture terminates. The fund is closedand this principal withdrawn by the owners at that date. Thus, the sum annually deposited in thefund represents capital recovery; the remainder of the annual profit represents a return on theoriginal investment, and is taken by the owners in the form of dividends. In order to achieve aconservative calculation of the average investment rate, it is customary to use a rather low invest-ment rate as the interest rate of the sinking fund.

Page 316: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 8-21Orchard Publications

Valuation of a Depleting Asset

We are in reality dealing with two distinct investments, namely, the purchase and exploitation ofthe depleting asset, and the reinvestment of recovered capital in a sinking fund. For simplicity,however, the two investments are considered to constitute a single composite investment, asthough it were legally binding upon the owners to defer the recovery of their capital by establish-ing this sinking fund. By adopting this simplifying assumption, we have transformed the actualType B investment to an equivalent one of Type A investment, in which capital recovery isachieved by means of a single lump-sum payment at the termination of the investment period.Conforming to the terminology generally employed, we shall refer to the purchase of the deplet-ing asset and the reinvestment of capital in the sinking fund as simply the “investment in theasset” and shall refer to the average investment rate pertaining to this composite investment assimply the “investment rate” of the asset.

If a depleting asset does possess salvage value, then this value represents partial capital recoveryat the termination of the venture. Therefore, the sinking fund need only accumulate a principalequal to the difference between the invested capital and the salvage value.

We shall now derive an equation for calculating the capital investment to be made in a depletingasset, in correspondence to a given investment rate. Let

= capital investment

= salvage value

= annual net profit (assumed to remain constant)

=number of years of the business venture

= rate of return on the investment

= interest rate earned by the sinking fund

Then

and

At the end of years, the principal in the sinking fund must equal the invested capital less thesalvage value. Hence,

and solving for capital investment we get

C

L

R

n

r

i

Annual return on the investment Cr=

Annual deposit on the king fundsin R Cr–=

n

C L– R Cr–1 i+ n 1–

i---------------------------=

C

Page 317: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 8 Depreciation, Impairment, and Depletion

8-22 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

(8.16)

Example 8.13

It is estimated that a timber tract will yield an annual profit of for years, at the end ofwhich time the timber will be exhausted. The land itself will then have an anticipated value of

. If a prospective purchaser desires a return of on his investment and can depositmoney in a sinking fund at , what is the maximum price he should pay for the tract?

Solution:

For this example, salvage value , annual net profit , number of years, rate of return , and interest rate . By substitution of these values into

(8.16) we get

Check:

Although for mathematical reasons we have blended the purchase of the asset and the deposit ofcapital in a sinking fund into a single investment, we must not lose sight of the fact that in realitythey are two distinct investments and that represents the average rate of return of the twoover the -year period. (This is sometimes referred to as the speculative rate, to distinguish itfrom the sinking-fund rate.) The rate of return resulting solely from purchase of the tract is greatlyin excess of .

Capital Invested =

Salvage value =

Principal required in sinking fund at end of 6th year =

Annual deposit required =

Annual return on investment =

Rate of return =

C R

r i1 i+ n 1–

---------------------------+------------------------------------ L

r 1 i+ n 1–i

--------------------------- 1+

---------------------------------------+=

$100,000 6

$40,000 8%4%

L 40000= R 100000=

n 6= r 0.08= i 0.04=

C 100000

0.08 0.041 0.04+ 6 1–

------------------------------------+----------------------------------------------------- 40000

0.08 1 0.04+ 6 1–0.04

------------------------------------ 1+

--------------------------------------------------------+=

1000000.08 0.15076+------------------------------------ 40000

0.53064 1+----------------------------+ 100000

0.23076------------------- 40000

1.53064-------------------+ $459 480= ==

$459 480

40 000

419 480

419 480 0.041 0.04+ 6 1–

------------------------------------ 63 241

100 000 63 241– 36 759

36 759 459 480 8%

8%6

8%

Page 318: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 8-23Orchard Publications

Valuation of a Depleting Asset

This method of allowing for depletion by applying the device of a hypothetical sinking fund forthe investment of recovered capital pending termination of the business venture is closely paral-lel, in its underlying theory, to the sinking-fund method of allocating depreciation. The deprecia-tion charge that is periodically entered in the accounting records of a business concern serves adual purpose. First, it records the loss represented by the disintegration of the capital invested inthe assets of the enterprise, as these assets deteriorate with use. Second, by deducting this depre-ciation from the gross profit for that particular period, the firm is in effect reserving a portion ofthe gross profit for the eventual replacement of its assets, since the enterprise is intended to con-tinue indefinitely. The sinking-fund method thus postulates that the replacement capital so accu-mulated should not be employed by the firm in the form of working capital, where it is surroundedby the hazards that inhere in all business activity, but rather replacement funds should be main-tained intact through some conservative form of investment, such as the creation of a sinkingfund. (Implicit in this reasoning is an assumed equality between the original cost of the assets andtheir replacement cost.)

By analogy, it is possible to regard the purchase and exploitation of a timber tract as constitutingnot a single isolated investment but rather one integral unit of a continuing program of invest-ment in depleting assets. Thus, as one tract is exhausted, it is replaced in this investment programby the purchase of a new tract. If we apply this conception, it is seen that, since the invested cap-ital vanishes as the timber is removed, it is essential that a portion of the gross profit for eachperiod be retained to replace the liquidated capital, thereby permitting the purchase of the suc-ceeding tract. Hence, whether we are dealing with the depreciation of an asset resulting from itsuse in production or with the depletion of a wasting asset resulting from the extraction of its con-tents, the creation of a sinking fund can be regarded as a warranty for the preservation of replace-ment capital.

The preceding analysis, of course, is a theoretical one, designed for the purpose of developing asimple method of evaluating a depleting asset. In actual practice, since entrepreneurs seek con-stantly to secure the maximum possible return on their available capital, this hypothetical sinkingfund is generally not established. Where a depleting asset is owned by a corporation, the law per-mits dividends to be paid for the full amount of the periodic earnings. Thus, each dividendreceived by a stockholder comprises both a return on his investment and a partial restoration ofhis capital, although the stockholder usually lacks knowledge of the precise composition of hisdividend.

Many problems pertaining to depletion require the calculation of the “purchase price” of an assetthat corresponds to a given speculative rate. It is to be understood, however, that this term isbeing used in a very broad sense, as though it were synonymous with the actual investment. Thetotal investment in a depleting asset represents, basically, the total capitalization of the firm; itencompasses the sums expended both in the purchase of the asset itself and in the purchase of theoperating equipment. The periodic profit referred to in these problems denotes the actual profitrealized through the sale of the commodity, prior to entering an allowance for depletion. Theresidual profit after this allowance has been made represents the interest earned by the invested

Page 319: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 8 Depreciation, Impairment, and Depletion

8-24 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

capital. The terminology employed is therefore somewhat contradictory, for in ordinary commer-cial parlance the term “profit,” as applied to a business not dealing in wasting assets, denotes theprofit remaining after the allowance for depreciation of the firm’s assets has been deducted.

Example 8.14

A mine is purchased for , and it is anticipated that it will be exhausted at the end of years. If the sinking-fund rate is , what must be the annual return from the mine to realize areturn of on the investment?

Solution:

For this example, capital investment , salvage value , number of years, rate of return , and interest rate . By substitution of these values into

(8.16) we get

Solving for we get

$1,000,000 204%

7%

C 1 000 000= L 0=

n 20= r 0.07= i 0.04=

1 000 000 R

0.07 0.041 0.04+ 20 1–

--------------------------------------+------------------------------------------------------- 0+ R

0.07 0.03358+------------------------------------ R

0.10358-------------------= = =

RR 1 000 000 0.10358 $103 580= =

Page 320: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 8-25Orchard Publications

Summary

8.20 Summary• A capital asset is a piece of equipment, a building, or a vehicle for use in our business.

• Depreciation is a method that allows us to deduct the cost of business property. It is consideredan expense and is listed in an income statement under expenses.

• Real property and personal property are two types of property that can be depreciated.

• Land can never be depreciated.

• To determine the annual depreciation cost for our assets, we need to know the initial cost ofthe assets and how many years the assets will retain some value for our business.

• Depreciable property must meet the following requirements:

1. It must be used in business or held to produce income

2. It must be expected to last more than one year

3. It must be something that wears out, decays, gets used up, becomes obsolete, or loses itsvalue from natural causes.

• We cannot depreciate the following items:

1. Property placed in service and disposed of in the same year

2. Inventory

3. Land

4. Repairs and replacements that do not increase the value of our property, make it more use-ful, or lengthen its useful life.

5. Items which do not decrease in value over time, such as antiques over 100 years old, expen-sive solid wood furniture, and fine china.

• The annual depreciation expense depends on the depreciation method that one chooses.These are:

1. Straight-line depreciation. It is computed using the formula

2. Sum of the Year’s Digits. It is a method of accelerated depreciation and is computed usingthe formula

Annual depreciation enseexp Cost Salvage value–Estimated useful life--------------------------------------------------------=

SYD Cost Salvage value– Useful life Period– 1+Useful life Useful life 1+

2----------------------------------------------------------------------------------

-------------------------------------------------------------------------------------------------------------------------------------=

Page 321: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 8 Depreciation, Impairment, and Depletion

8-26 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

3. Fixed Declining Balance. This method computes depreciation at a fixed rate and uses theformula

4. General Declining Balance (125%, 150%, 200%). These methods use the following formulawhere Factor is the rate at which the balance declines.

5. Variable-Declining Balance. This method computes the depreciation of an asset using theDDB method, and switches to SL method when the SL depreciation is greater than theDDB method or any other variable-rate declining balance method.

6. Units of Production. This method allocates depreciation expenses according to actual phys-ical usage and it is computed using the following formula:

• The Accelerated Cost Recovery System (ACRS), the Modified Accelerated Cost RecoverySystem (MACRS), and Section 179 are depreciation methods set forth by the Internal Reve-nue Service (IRS).

• Book value is the net dollar value at which an asset is carried on a company’s balance sheet.

• Fair market value is the present value of an asset, that is, the value of a similar asset in itspresent condition.

• An impairment loss occurs when an asset suffers a permanent impairment in value. It is com-puted using the formula

• Depleting assets are resources such as oil wells, timber tracts, and mines in which the extractedcommodity is not replaced. The capital investment to be made in a depleting asset is calcu-lated using the formula

where = capital investment, = salvage value, = annual net profit (assumed to remainconstant), =number of years of the business venture, = rate of return on the investment,and = interest rate earned by the sinking fund.

FDB Cost Total depreciation from prior periods– 1 Salvage valueCost

-------------------------------------

1Life----------

–=

GDB Cost Total depreciation from prior periods–Factor

Life of asset---------------------------------=

Annual depreciation Initial t - Salvage valuecosTotal estimated units of output------------------------------------------------------------------------------------=

Impairment loss Book value Fair market value–=

C R

r i1 i+ n 1–

---------------------------+------------------------------------ L

r 1 i+ n 1–i

--------------------------- 1+

---------------------------------------+=

C L Rn r

i

Page 322: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 8-27Orchard Publications

Exercises

8.21 Exercises

1. Compute the book value at the end of 6 years of a machine having a useful life of years and a salvage value of of its first cost at that time, using straight line depreciation.

2. Compute the book value at the end of years of a machine having a useful life of years and a salvage value of at the end of that time, using the Sum of the Years Digits(SYD) method

3. Compute the depreciation for each year using the fixed declining balance (FDB) method of anasset costing , having life expectancy of years, and a salvage value of .

4. Repeat Exercise 3 using the

a. 125% General Declining Balance Method.

b. 150% General Declining Balance Method.

c. 200% General Declining Balance Method.

Verify your answers with the Microsoft Excel DDB function or the MATLAB depgendb func-tion and tabulate the results for comparison. Include the results of Exercise 3.

5. It is estimated that a mine, now operating, can be expected to make a net profit after all taxesare paid of per year for years, at which time it will be exhausted and have no sal-vage value. What should an investor pay for the mine now, so that he will have an annualincome of on his investment after he has made an annual deposit into a fund which, at

interest, will accumulate to the amount of his investment (return of investment) in years, when the mine will be exhausted?

6. A syndicate wishes to purchase an oil well which, estimates indicate, will produce a netincome of per year for years. What should the syndicate pay for the well if, out ofthis net income, a return of on the investment is desired and a sinking fund is to beestablished at interest to recover this investment?

7. An office building, exclusive of its elevators and mechanical equipment, costs hasan estimated useful life of years and has no salvage value. Its elevators and mechanicalequipment cost , have an estimated useful life of years and a salvage value of

.a. Using the straight line method of depreciation determine the value of the building and its

equipment at the end of years’ service.b. What is the annual cost of amortizing the initial purchase of equipment and of providing a

sinking fund to replace the equipment at the end of years if the annual interest rate is?

$10,000 1010%

4 $20,000 8$2,000

$1,000 5 $400

$150,000 35

12%3% 35

$200,000 3010%

3%

$1,000,00040

$320,000 20$20,000

10

204%

Page 323: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 8 Depreciation, Impairment, and Depletion

8-28 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

8.22 Solutions to Exercises

1. Salvage value is and the depreciation at the end of the 6th year is

Therefore, the book value at the end of the 6th year is

2.

or

Therefore, the book value at the end of the 4th year is

3.

Since the depreciation is taken on a yearly basis, for the 2nd through the last year, FDB usesthe following formula:

For the 2nd year

For the 3rd year

10000 0.10 $1000=

Depreciation6th year10000 1000–

10--------------------------------- 6 900 6 5400= = =

Bookvalue6th year 10000 5400– $4600= =

SYDTotal to nth yearPeriod Cost Salvage value– 2 Useful life Period– 1+

Useful life Useful life 1+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------=

SYDTotal to 4th year4 20000 2000– 2 8 4– 1+

8 8 1+----------------------------------------------------------------------------------------- 4 18000 13

72------------------------------------ 13000= = =

Bookvalue4th year 20000 13000– $7000= =

FDB1st year Cost 1 Salvage valueCost

-------------------------------------

1Life----------

–Month

12-----------------=

FDB1st year 1000 1 4001000------------

1 5–

1212------ 1000 1 0.83255– $167.45= = =

FDB Cost Total depreciation from prior periods– 1 Salvage valueCost

-------------------------------------1 Life

–=

FDB2nd year 1000.00 167.45– 1 4001000------------

1 5– 832.55 1 0.83255– $139.41= = =

Page 324: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 8-29Orchard Publications

Solutions to Exercises

For the 4th year

and for the 5th year

4.a.

We now pose and observe that the total depreciation up to the 3rd year is

and since the salvage value is , we can only depreciate .Therefore, the depreciation for the 4th year is and thus there isno depreciation for the 5th year.

Check with Microsoft Excel:

=DDB(1000,400,5,1,1.25) returns

=DDB(1000,400,5,2,1.25) returns

=DDB(1000,400,5,3,1.25) returns

FDB3rd year 1000.00 167.45– 139.41– 1 4001000------------

1 5–=

693.14 1 0.83255– $116.06==

FDB4th year 1000.00 167.45– 139.41– 116.06– 1 4001000------------

1 5–=

577.08 1 0.83255– $96.63==

FDB5th year 1000.00 167.45– 139.41– 116.06 96.63–– 1 4001000------------

1 5–=

480.45 1 0.83255– $80.45==

125% GDB Cost Total depreciation from prior periods–1.25

Life of asset---------------------------------=

125% GDB1st year 1000.00 0–1.25

5---------- $250.00= =

125% GDB2nd year 1000.00 250.00–1.25

5---------- $187.50= =

125% GDB3rd year 1000.00 250.00– 187.50–1.25

5---------- $140.63= =

250.00 187.50 140.63+ + $578.13=

$400.00 1000.00 400.00– $600.00=

600.00 578.13– $21.87=

$250.00

$187.50

$140.63

Page 325: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 8 Depreciation, Impairment, and Depletion

8-30 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

=DDB(1000,400,5,4,1.25) returns

=DDB(1000,400,5,5,1.25) returns

Check with MATLAB:

GDB125=depgendb(1000, 400, 5, 1.25)

returns

GDB125 =

250.0000 187.5000 140.6250 21.8750 0

b.

Check with Microsoft Excel:

=DDB(1000,400,5,1,1.50) returns

=DDB(1000,400,5,2,1.50) returns

=DDB(1000,400,5,3,1.50) returns

=DDB(1000,400,5,4,1.50) returns

Check with MATLAB:

GDB150=depgendb(1000, 400, 5, 1.50)

returns

GDB150 =

300 210 90 0 0

c.

$21.88

$0

150% GDB Cost Total depreciation from prior periods–1.50

Life of asset---------------------------------=

150% GDB1st year 1000.00 0–1.50

5---------- $300.00= =

150% GDB2nd year 1000.00 300.00–1.50

5---------- $210.00= =

150% GDB3rd year 1000.00 400.00– 300.00 210.00+– $90.00= =

$300

$210

$90

$0

200% GDB Cost Total depreciation from prior periods–2.00

Life of asset---------------------------------=

Page 326: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 8-31Orchard Publications

Solutions to Exercises

Check with Microsoft Excel:

=DDB(1000,400,5,1,2.00) returns

=DDB(1000,400,5,2,2.00) returns

=DDB(1000,400,5,3,2.00) returns

Check with MATLAB:

GDB200=depgendb(1000, 400, 5, 2.00)

returns

GDB200 =

400 200 0 0 0

5.Salvage value , annual net profit , number of years , rate of return

, and interest rate . Then,

Period FDB 125% GDB 150% GDB 200% GDB

1 $167.45 $250.00 $300.00 $400.00

2 139.41 187.50 210.00 200.00

3 116.06 140.63 90.00

4 96.63 21.87

5 80.45

Total $600.00 $600.00 $600.00 $600.00

200% GDB1st year 1000.00 0–2.00

5---------- $400.00= =

200% GDB2nd year 1000.00 400.00–1.50

5---------- $200.00= =

200% GDB3rd year 1000.00 400.00– 400.00 200.00+– $0= =

$400

$200

$0

L 0= R 150000= n 35=

r 0.12= i 0.03=

C 150000

0.12 0.031 0.03+ 35 1–

--------------------------------------+------------------------------------------------------- 0+=

$1 098 585=

Page 327: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 8 Depreciation, Impairment, and Depletion

8-32 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

6.Annual net profit , salvage value , number of years , rate of return

, and interest rate . Then,

7.a.

At the end of the 10-year period, the building and equipment depreciation is shown on thetable below.

b.For this example, , , and . Then,

Check with Microsoft Excel:

The function

=PMT(0.04,20, 320000) returns

Next, we must find the sinking fund to replace equipment at the end of years. Since theequipment have a salvage value of , the uniform series of deposits is based on an

Building Equipment

Annual straight line depreciation $25,000$15,000

Total depreciation at the end of 10 years 250,000150,000

Book value at the end of 10 years 750,000170,000

Total book value of building and equipment at the end of 10 years

R $200 000= L 0= n 30=

r 0.10= i 0.03=

C 200 000

0.10 0.031 0.03+ 30 1–

--------------------------------------+------------------------------------------------------- 0+ 200 000

0.10 0.02102+------------------------------------ 200 000

0.12102--------------------- $1 652 619= = = =

SLB 1 000 000 0– 40=

SLE 320 000 20 000– 20=

25 000 10

15 000 10

1 000 000 250 000–

320 000 150 000–

750 000 170 000+ $920 000=

Initial investment 320000= i 0.04= n 20=

Annual tcos Initial investment Interest1 1 Interest+ n––------------------------------------------------=

320000 0.041 1 0.04+ 20––---------------------------------------- 320000 0.07358 $23 546.16= ==

$23,546.16

20$20,000

Page 328: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 8-33Orchard Publications

Solutions to Exercises

investment of . Then,

Finally, the annual cost of amortizing the initial purchase of equipment and of providing asinking fund to replace equipment at the end of years is:

$300,000

R Sni

1 i+ n 1–--------------------------- 300000 0.04

1 0.04+ n 1–------------------------------------ 300000 0.03358 $10 074.53= = = =

20

23 546.16 10 074.53+ $33 620.69=

Page 329: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 8 Depreciation, Impairment, and Depletion

8-34 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

NOTES:

Page 330: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 9-1Orchard Publications

Chapter 9

Introduction to Probability and Statistics

his chapter discusses the basics of probability and statistics. It is intended for readers whohave a need for an introduction to this topic, or an accelerated review of it. Readers with astrong background in probability and statistics may skip this chapter. Others will find it

useful, as well as a convenient source for review.

9.1 IntroductionProbability and statistics are two closely related branches of mathematics. They apply to all sci-ence and engineering fields, sociology, business, education, insurance, and many others. For thisreason, we devote all subsequent chapters to this topic.

In some cases, measurements of various parameters are deterministic; this means that the resultscan be predicted exactly. However, in most cases there are many unpredictable variablesinvolved, and it becomes an impossible task to predict the result exactly. Consider, for example,the case of a radar system detection, where the radar system detects the presence of a target andextracts useful information such as range (distance) and range rate (velocity) of the target. Here,we are confronted with probabilities such as:

a. the probability of false alarm, that is, the probability that the radar receiver decides that a targetis present when in fact it is not present.

b. the probability of detection, that is, the probability that the radar receiver decides a target ispresent when in fact it is present.

Obviously, we need to use a mathematical procedure to analyze such situations. This mathemati-cal procedure is the field of probability and statistics.

9.2 Probability and Random ExperimentsProbability is a measure of the likelihood of the occurrence of some event. The probability of anevent occurring is denoted as ; this is a real number between zero and one, that is,

The sum of the probabilities of all possible events is equal to one, that is,

(9.1)

where the symbol denotes summation.

T

A P A

0 P A 1

A1 A2 An

P A1 P A2 P A3 P An+ + + + P Aii 1=

n1= =

Page 331: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 9 Introduction to Probability and Statistics

9-2 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

Relation (9.1) states that the total probability is equal to ; it is similar to the geometric axiomthat the whole is equal to the sum of its parts.

We define a random experiment as one that is repeated many times under similar circumstances,but it yields unpredictable results in each trial. For example, when we roll a die, we conduct a ran-dom experiment where the outcome (result or event)* is one of the numbers through . Asanother example, a security (stock in a certain public company) may yield a predictable dividendvalue, but the price of the security varies in an unpredictable manner over a period of time.

The term population refers to a set of all possible outcomes of a random experiment. A specificnumber or value which is a result of a random experiment, is called a random variable. A discreterandom variable can assume only certain values; for instance, the tossing of a die or the flipping ofa coin, can only result in certain values. A continuous random variable, on the other hand, canassume any value within a given interval. For instance, temperature or pressure can assume aninfinite number of values within a certain interval. We will discuss random variables, in detail, onthe next chapter.

As stated earlier, the outcomes of a random experiment fluctuate because the causes which deter-mine the outcomes cannot be controlled. However, if the conditions of the experiment are some-what uniform for example, if the same die is used in successive throws, or if the same resistor isused in an experiment and held at a constant temperature we will observe some statistical regu-larities when we consider all results of a very large number of the random experiment. These statis-tical regularities can be expressed by laws, which yield the probability of the occurrence of anevent. An example of statistical regularity will be given in the next section.

9.3 Relative Frequency

Let denote one of the possible outcomes of a random experiment as a result of independenttrials. Now, let represent the number of times that result occurs. Then, the ratio

(9.2)

is called the relative frequency of the result . Obviously, the relative frequency must be a numberbetween zero and one, that is,

(9.3)

The plot of Figure 9.1 shows versus for a typical sequence of trials in a coin-tossing

experiment, where denotes either “heads” or “tails”. We observe that the relative frequency

* Sometimes outcomes and results (events) are used interchangeably; in a strict sense the set of outcomes in a random exper-iment is infinite, and if we choose those sets which are of interest to us, we call them events or results.

1

1 6

A NN A A

fN A N AN

-------------=

A

0 fN A 1

fN A NA

Page 332: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 9-3Orchard Publications

Relative Frequency

varies wildly for small values of independent trials, but as , it stabilizes in thevicinity of the value. This is a simple example of statistical regularity.

Figure 9.1. Relative Frequency in N Independent Trials

Different events from a random experiment are denoted as . Events that cannotoccur simultaneously in a given trial, are called mutually exclusive. For instance, if represents“heads” and “tails”, then and are mutually exclusive events since they cannot occursimultaneously if only a single coin is tossed just once.

The occurrence of the event “either or ” satisfies the equality

(9.4)

or(9.5)

As another example, consider the throwing of a die where denotes the result that the ith faceshows. Then, the result “even face shows up” represents the result or or and therefore,

(9.6)

Thus, for a fair die, we expect the relative frequency of each to settle about the value, andthe relative frequency of “even face shows up” to stabilize at .

To illustrate the basic concepts of probability, we find it convenient to use probabilities that relateto games of chance. The following example illustrates the validity of Equation (9.5).

Example 9.1

A box contains two blue and eight red balls. Compute the probability of drawing a blue ball (with-out looking inside the box, of course).

Solution:

Here, we have two possible events: is a blue ball and is a red ball. Since there are two blue

fN A N N

1 2

fN A1.0

0.5

N

A1 A2 A3 AN

A1

A2 A1 A2

Ai Aj

N Ai or Aj N Ai N Aj+=

fN Ai or Aj fN Ai fN Aj+=

Ai

A2 A4 A6

fN A2 or A4 or A6 fN A2 fN A4 fN A6+ +=

Ai 1 6

1 2

B R

Page 333: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 9 Introduction to Probability and Statistics

9-4 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

balls in a box containing balls total, we would expect the blue balls to be drawn of thetime and the red balls of the time. Thus, the probabilities are and .

Now, suppose that these balls, besides being colored, are also numbered through . If wekeep drawing a ball from the box a very large number of times while we are placing the ball back inthe box before drawing the next one, we would expect that any of these balls would appear or of the time since each ball is equally likely to be drawn. Then, if we add together thechances of drawing any of the two blue balls we get the probability of

This demonstrates Equation (9.5) which states that we can add the probabilities of each group ofmutually exclusively events to determine the probability of occurrence of the overall group.

Example 9.2

Two dice are thrown. What is the probability of getting a six?

Solution:

Each die has six faces; then the possible outcomes are , that is, the probability of draw-ing any combination of two faces is . The five different combinations that add up to are

. Therefore, the probability of getting a six is

We can also use the following approach:

There are possible outcomes but only are the desired ones which will yield a . Therefore, ifwe choose the drawing of a as the desired event, this will occur of the time in manyrepeated tosses.

9.4 Combinations and PermutationsSometimes we use combinations and permutations to compute probabilities. Consider the experi-ment where we select two numbers from the four number set . The possible pairs,without regard to the order, are , , , , , and . Thus, there are sixpossible pairs. In this case, we say that when selecting two items from a set of four distinct items,there are six possible combinations.

In general, suppose we have a collection of objects. The number of combinations of these objects taken at a time, is denoted as ; It is computed from the expression

10 20%80% P B 0.2= P R 0.8=

10 1 10

1 1010%

110------ 1

10------+ 2

10------ 0.2 20%= = =

6 6 36=

1 36 65 1+ 4 2+ 3 3+ 2 4+ 1 5+

136------ 1

36------ 1

36------ 1

36------ 1

36------+ + + + 5

36------=

36 5 66 5 36

1 2 3 and 41 2 1 3 1 4 2 3 2 4 3 4

n nr C n r

Page 334: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 9-5Orchard Publications

Combinations and Permutations

* (9.7)

Example 9.3

A deck of cards consists of the numbers through , jack, queen, king and ace where eachof these can be any of the four suits, i.e., heart, spade, diamond or club. Compute the number ofcombinations in a five card poker game that can be dealt from this deck of cards.

Solution:

We are seeking the number of combinations. Therefore, from (9.7),

Next, let us consider the case where we pick items from possible events, but we are interestedin the order of selection of the items. Now, the number of permutations of possible eventstaken at a time is denoted as . It is be computed from the expression

(9.8)

Example 9.4

Compute the number of permutations if we select numbers from the set of four numbers.

Solution:

The permutations are , , , , , , , , , ,, and . Therefore, for this example, there are permutations. The number of permu-

tations can also be obtained from (9.8). For this example, and . Thus,

Example 9.5

In a lotto contest, six numbers are selected from the set of numbers . Computethe probabilities of selecting the correct six numbers to win the lotto when:

* A number m followed by an exclamation mark (!), i.e., m!, is the product of all positive integers from m down to 1.In other words, . Thus, . Wecall m factorial. It is also discussed in Appendix B.

C n r nr

n!r! n r– !----------------------= =

m! m m 1– m 2– m 3– 3 2 1= 10! 10 9 2 1 3 628 000= =m!

52 2 10

C n r nr

n!r! n r– !---------------------- C 52 5 52

552!

5! 52 5– !--------------------------- 2598960= == = = =

r nr n

r P n r

P n r n!n r– !

------------------=

21 2 3 and 4

1 2 2 1 1 3 3 1 1 4 4 1 2 3 3 2 2 4 4 23 4 4 3 12

n 4= r 2=

P n r n!n r– !

------------------ P 4 2 4!4 2– !

------------------ 12= = = =

1 2 3 55 56

Page 335: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 9 Introduction to Probability and Statistics

9-6 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

a. the order of selection of the six numbers is immaterial

b. the order of selection is important

Solution:

a. Since the order of selection is immaterial, we need to compute the number of possible combi-nations. For this example, and . Then, using (9.7),

Check with Excel: =FACT(56)/(FACT(6)*FACT(56 6)) returns the same number.

Therefore, the probability of winning the lotto when combinations are considered, is

b. When the order of selection is important, we need to compute the number of possible permuta-tions. Then, using (9.8),

Thus, in this case, the probability of winning the lotto when permutations are considered, is

Example 9.6

In a 52-card game, a royal flush is a selection of five cards consisting of an ace, a king, a queen, ajack and a ten, all of the same suit. Compute the probability that a player will draw a royal flushwhen the order of the five cards drawn is unimportant.

Solution:

In Example 9.3, we found that the number of combinations of a five card poker game that can bedealt from this deck of cards is

and since there are four possible royal flushes (one for each suit), the probability of a royal flush is

n 56= r 6=

C n r nr

n!r! n r– !---------------------- C 56 6 56

656!

6! 56 6– !--------------------------- 3.2468436 107= = = = = =

Probabilitycombinations1

3.2468436 107------------------------------------ 3.0799143 8–10= =

P n r n!n r– !

------------------ P 56 6 56!56 6– !

--------------------- 2.3377274 1010= = = =

Probabilitypermutations1

2.3377274 1010--------------------------------------- 4.2776587 11–10= =

C n r nr

n!r! n r– !---------------------- C 52 5 52

552!

5! 52 5– !--------------------------- 2598960= = = = = =

Probabilityroyal flush 4 12598960--------------------- 1.5390772 10 6–= =

Page 336: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 9-7Orchard Publications

Joint and Conditional Probabilities

9.5 Joint and Conditional ProbabilitiesIn the preceding discussion, we have considered the probability of one particular event occurring,i.e., the tossing of a coin or the throwing of a die. Quite often, however, we need to consider thejoint probability representing the joint occurrence of two or more events. Consider, for example, thatin the drawing of two cards from a 52 deck the first card is diamond and the second is also a dia-mond. This is an example of a joint probability and we wish to find the probability that the secondcard will be diamond when the first was also a diamond.

In our subsequent discussion, we will consider the joint occurrence of only two events and and we will denote the joint probability as .

In the above example, the second event is conditioned (dependent) upon the first. We measurethis dependence by the conditional probability of occurring given that has occurred; this con-ditional probability is denoted as . It is computed from

(9.9)

We will derive (9.9) shortly.

Example 9.7

Compute the probability that, in the drawing of two cards from a 52 deck, the first card is red(heart or diamond) and the second is black (club or spade), provided that the first card drawn isnot returned back to the deck of the cards before the second is drawn.

Solution:

We let represent the drawing of the first card (red) and the drawing of the second (black).The desired joint probability of drawing first and then is denoted as . Since there are

red and black cards, the probability of drawing first a red card is .After the first card is drawn, there are cards left, red and black. Therefore, the proba-bility of drawing a black card is . Thus, the second drawing becomes conditional (depen-dent) upon the first drawing, and the conditional probability is . The joint prob-ability of drawing a red card first and a black second is computed from (9.9), which isrearranged as

The concepts of joint occurrences and conditional probability can be generalized as follows:

Suppose we perform a random experiment, and we observe the occurrence of events and inthat order. We repeat this experiment many times while we measure the relative frequency of

A BP AB

B AP B|A

P B A P ABP A

----------------=

R BR B P RB

26 26 P R 26 52 1 2= =

51 25 2626 51

P B R 26 51=

P RB

P RB P R P B R 12--- 26

51------ 26

102--------- 13

51------= = = =

A B

Page 337: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 9 Introduction to Probability and Statistics

9-8 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

occurrence separately as and and also as a pair . Here, we wish to find if event is, or isnot dependent on event , and if it is, to determine the relative dependence, that is, to compute

from the relative frequency measurements.

We let denote the number of times that the combination occurs in repetitions of theexperiment. Then, using the definition of the relative frequency in (9.2), and assuming that represents a very large number, the joint probability of occurring first and then is

(9.10)

However, in the same trials, the event occurred times and the event occurredtimes. Since some of the times in which event occurred it was followed by event , includes

. Then, the ratio

(9.11)

represents the relative frequency of occurrence of event occurring after event has occurred.This is the conditional probability , that is,

(9.12)

In the previous example, represented a very large number of drawings of two successive cards, the number of times that a red card shows up, the number of times a black card shows up,

and the number of times a red is followed by a black card.

If, in (9.12), we divide both and by we get

(9.13)

and multiplying (9.13) by we get

(9.14)

We observe that (9.14) is the same as (9.9) except that it is re-arranged.

Now, suppose that the probability of event occurring is independent of event . Then (9.14)reduces to . This situation would occur if, in the two-card example, the first carddrawn is returned back to the deck of the cards before the second is drawn. Then, substitution of

A B AB BA

P B A

nAB AB n

nP AB A B

P ABnABn

--------=

n A nA B nB

A B nA

nAB

nABnA

-------- 1

B AP B A

P B AnABnA

---------- 1=

nnA nB

nAB

nAB nA n

P B AnAB nnA n

----------------- P ABP A

----------------= =

P A

P AB P A P B A=

B AP B A P B=

Page 338: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 9-9Orchard Publications

Joint and Conditional Probabilities

into (9.14) yields

(9.15)

Relation (9.15) states that if event is independent of event , we can compute the joint prob-ability by multiplying together the separate probabilities and . In this case, theorder of occurrence of events and is immaterial and we can also express (9.15) as

(9.16)

These simplifications have led us to the condition of statistical independence which states that twoevents are said to be statistically independent if their probabilities satisfy the following relations.

(9.17)

Example 9.8

A box contains two red and three white balls. Two balls are drawn from this box. Compute thejoint probabilities of drawing two red balls in succession if

a. we do not place the first ball back into the box before drawing the second.

b. we do place the first ball back into the box before drawing the second.

Solution:

a. Let event be a red ball drawn on the first draw, and event another red ball on the sec-ond draw. Then, the probability of drawing a red ball on the first draw is . Sinceonly one red ball remains in the box which now contains only four balls, the conditional prob-ability of drawing the second red ball on the second draw is . Therefore, the

joint probability is

We can obtain the same result using combinations (no need to use permutations since the redballs are assumed identical). Then,

Thus, we have possible combinations of five balls arranged in groups of two. Since we areonly interested in the combination which contains two red balls, the probability of this occur-ring is . This is the same answer as before.

P B A P B=

P AB P A P B=

B AP AB P A P B

A B

P BA P B P A=

P AB P BA P A P B= =

P B A P B=

P A B P A=

R1 R2

P R1 2 5=

P R2 R1 1 4=

P R1R2

P R1R2 P R1 P R2 R125--- 1

4--- 1

10------= = =

C n r nr

n!r! n r– !---------------------- C 5 2 5

25!

2! 5 2– !------------------------ 10= = = = = =

10

P R1R2 1 10=

Page 339: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 9 Introduction to Probability and Statistics

9-10 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

b. If the first ball is placed back into the box before the second is drawn, the events and arestatistically independent and thus

Example 9.9

Box A contains two red balls and one white, and Box B contains three red balls and two white.One of the boxes is selected at random, and one ball is drawn from it. Compute the probabilitythat the ball drawn is red.

Solution:

Here, there are two possibilities of drawing a red ball, so we let denote a red ball, denotethe probability of drawing a red ball, denote the joint probability that a red ball is drawnfrom Box A, and denote the joint probability that a red ball is drawn from Box B. The pos-sibilities of drawing a red ball are:

a. Choose Box A and draw or

b. Choose box B and draw

Since events (a) and (b) are mutually exclusive,

Now, the probability of choosing Box A is and drawing a red ball from it is . Then,

Similarly, the probability of choosing Box B is and drawing a red ball from it is . Then,

Therefore, the probability that ball drawn is red is

9.6 Bayes’ Rule

Let be any event, and be mutually exclusive events one of which will definitely

occur. We use Bayes’ Rule to compute the probabilities of the various events whichcan cause event to occur. Mathematically, Bayes’ rule states that

R1 R2

P R1R2 P R1 P R225--- 2

5--- 4

25------= = =

R P RP AR

P BR

R

R

P R P AR P BR+=

1 2 2 3

P AR P A P R A 12--- 2

3--- 2

6--- 1

3---= = = =

1 2 3 5

P BR P B P R B 12--- 3

5--- 3

10------= = =

P R 13--- 3

10------+ 19

30------= =

C D1 D2 Dn

D1 D2 Dn

C

Page 340: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 9-11Orchard Publications

Bayes’ Rule

(9.18)

In (9.18), represents the probabilities of the events before the experiment is performed;these are referred to as the a priori probabilities. After the experiment is performed and event has occurred, the probabilities are referred to as the posteriori probabilities.

We can think of Bayes’ rule as one which evaluates the probability of the “cause” given the“effect” .

Example 9.10

In Example 9.9 what is the probability that the red ball was drawn from Box A?

Solution:

We will apply Bayes’ rule to obtain the solution. Since there were two boxes, we use in(9.18). For our example, is the drawn red ball and so we replace it with . Also, representseither Box A or B, and since we are seeking the probability that the red ball was drawn from BoxA, we replace it with A. Because box A contained 3 balls, one of which was red, while Box B con-tained 5 balls, three of which were red, (9.18) is written as

Therefore, the probability that the red ball was drawn from Box A is

P Dk CP Dk P C Dk

P Dk P C Dk

k 1=

n-----------------------------------------------=

P Dk

CP C Dk

Dk

C

n 2=

C R Dk

P A R P A P R AP A P R A P B P R AB+-------------------------------------------------------------------------

12--- 2

2 1+------------

12--- 2

2 1+------------ 1

2--- 3

3 2+------------+

----------------------------------------------------------------------- 1019------= = =

P A R 10 19=

Page 341: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 9 Introduction to Probability and Statistics

9-12 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

9.7 Summary• Probability is a measure of the likelihood of the occurrence of some event.

• The probability of an event occurring is denoted as ; this is a real number between zeroand one.

• The sum of the probabilities of all possible events is equal to one.

• A random experiment is an experiment that is repeated many times under similar circum-stances, but it yields unpredictable results in each trial.

• The term population refers to a set of all possible outcomes of a random experiment.

• A random variable is a specific number or value which is a result of a random experiment.

• A discrete random variable can assume only certain values.

• A continuous random variable can assume any value within a given interval.

• The relative frequency is defined as where is the number oftimes that result occurs in independent trials.

• Statistical regularity refers to the condition where the relative frequency stabilizes in a certainvalue as the number of independent trials approaches infinity.

• Events that cannot occur simultaneously in a given trial are said to be mutually exclusive.

• Combinations are arrangements of objects where the order of arrangement does not matter. Ina collection of objects the number of combinations of these objects taken at a time, isdenoted as and it is computed from the expression

• Permutations are arrangements of objects where different ordering are considered differentresults. In a collection of objects the number of permutations of possible events taken ata time is denoted as . It is be computed from the expression

• A joint probability represents the joint occurrence of two or more events. The joint probabilityof event occurring first and event occurring second is denoted as .

• If a second event is conditioned (dependent) on an event occurring first, we measure thisdependence by the conditional probability of occurring given that has occurred; this con-

A P A

fN A fN A N A N= N A

A N

n n rC n r

C n r nr

n!r! n r– !----------------------= =

n n rP n r

P n r n!n r– !

------------------=

A B P AB

B AB A

Page 342: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 9-13Orchard Publications

Summary

ditional probability is denoted as and it is computed from

• Two events are said to be statistically independent if their probabilities satisfy the followingrelations.

• Bayes’ rule states that if is any event, and be mutually exclusive events one ofwhich will definitely occur, we can compute the probabilities of the various events

which can cause event to occur using the relation

P B|A

P B A P ABP A

----------------=

P AB P BA P A P B= =

P B A P B=

P A B P A=

C D1 D2 Dn

D1 D2 Dn C

P Dk CP Dk P C Dk

P Dk P C Dk

k 1=

n-----------------------------------------------=

Page 343: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 9 Introduction to Probability and Statistics

9-14 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

9.8 Exercises1. A box contains 9 white and 14 black balls. Compute the probability that a white ball is drawn

on the first trial.

2. Two dice are thrown. What is the probability of getting

a. 7

b. 11

3. Compute the number of combinations and permutations in a 7 card poker game that can bedealt from a 52-card deck.

4. In a lotto contest, 5 numbers are selected from the set of numbers [1, 2, 3, ..., 45]. Compute theprobability of selecting the correct five numbers to win the lotto if the order of the selection ofthe five numbers is unimportant.

5. Compute the probability that in the drawing of 2 cards from a 52-card deck the first card is aclub and the second is a diamond.

6. A box contains 7 blue and 9 red balls. Compute the joint probability of drawing two blue ballsin succession if we do not place the first ball back into the box before drawing the second ball.

7. Box A contains 5 red and 4 blue balls and Box B contains 6 red and 9 blue balls. One of theboxes was selected at random and a red ball was drawn from it. What is the probability that thedrawn red ball was picked from Box B?

Page 344: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 9-15Orchard Publications

Solutions to Exercises

9.9 Solutions to Exercises

1. There are 23 balls total and the probability of getting any ball is . Since there are 9 whiteballs,

2. The probability of drawing any combination is . Then,

a. The combinations which add up to 7 are , , , , , and , that is,6 combinations. Therefore,

b. The combinations which add up to 11 are and , that is, 2 combinations. There-fore,

3. Combinations:

Check with Excel: =FACT(52)/(FACT(7)*FACT(52 7)) returns the same number.

Permutations:

4. Because it is stated that the order is unimportant, we need to find the combinations. Thus,

and

5. Let , .Then,

6. , , , , and thus

1 23P white 9 23=

1 6 1 6 1 36=

1 6+ 2 5+ 3 4+ 4 3+ 5 2+ 6 1+

P 7 6 36 1 6= =

5 6+ 6 5+

P 11 2 36 1 18= =

C n r nr

n!r! n r– !---------------------- C 52 7 52

752!

7! 52 7– !-------------------------- 133 784 560= = = = = =

P n r n!n r– !

------------------ P 52 7 52!52 7– !

--------------------- 674 274 180 000= = = =

C n r nr

n!r! n r– !---------------------- C 45 5 45

545!

5! 45 5– !-------------------------- 1 221 759= = = = = =

Probabilitycombinations1

1 221 759------------------------ 8.18492 7–10= =

P C Probability of drawing a club= P D Probability of drawing a diamond=

P AB P A P B A 13 52 13 51 169 2652 13 204= = = =

B 7= R 9= B R+ 16= P B1 7 16= P B2 B1 6 15=

P B1B2 P B1 P B2 B1 7 16 6 15 42 240 21 120= = = =

Page 345: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 9 Introduction to Probability and Statistics

9-16 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

7.

and by Bayes’ rule

5R4B

Box A

6R9B

Box B

P Red Box B

12--- 6

6 9+------------

12--- 6

6 9+------------ 1

2--- 5

5 4+------------+

---------------------------------------------------------------------- 6 306 30 5 18+-------------------------------- 90

215--------- 18

43------= = = =

Page 346: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 10-1Orchard Publications

Chapter 10

Random Variables

his chapter defines discrete and continuous random variables, the cumulative distributionfunction, the probability density function, and their properties. Statistical averages,moments, and characteristic functions are also discussed. Some sections presume knowl-

edge of advanced mathematics; these may be skipped without loss of continuity.

10.1 Definition of Random VariablesWe may associate an experiment and its possible outcomes with a space and its points. Then, wemay associate a point called the sample point with each possible outcome of the experiment.The total number of sample points , corresponding to the aggregate of all possible outcomes ofthe experiment, is called the sample space.

An event may correspond to a single sample point or a set of sample points. For example, in an exper-iment involving the throw of a die, there are six possible outcomes . By assigning asample point to each of these possible outcomes we get a sample space that consists of six samplepoints. Thus a “five” corresponds to a single sample point. Also, if we choose an even number torepresent a sample point, then the sample space consists of three sample points, that is, .

Now, suppose that the outcome is a variable that can wander over the set of sample points, andwhose value is determined by the experiment. Then, a function whose domain is a sample spaceand whose range is some set of real numbers, is called a random variable of the experiment. In oursubsequent discussion we will abbreviate a random variable as rv.

If the outcome of an experiment is , we will represent the rv as or simply . For example,the sample space representing the outcomes of the throw of a die is a set of six sample points

. Thus, if we identify the sample point with the event that dots are showing (forexample number 3 has three dots) when the die is thrown, we say that is a rv where repre-sents the number of dots that show up when the die is thrown. This is an example of a discrete rv.

In general, an rv is a discrete rv if can take on only a finite number of values in any finiteobservation interval. If the rv can take on any value in the entire observation interval, then is acontinuous rv. For example, the value of the temperature at a particular instant of time is a contin-uous rv.

T

si

s

1 2 6

2 4 6

s X s X

1 2 6 k kX k k

X XX

Page 347: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 10 Random Variables

10-2 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

10.2 Probability FunctionThe probability function (or probability distribution) is defined as

(10.1)

In general, is a probability function if(10.2)

and

(10.3)

10.3 Cumulative Distribution Function

Let the rv be defined in the axis of real numbers as , and consider any point onthis axis. Then, the probability of an event is referred to as cumulative distribution function orprobability distribution function of the rv . It is abbreviated as cdf, and it is denoted as

(10.4)

In other words, is the probability that the rv will be equal to or less than some value . Sinceall values of are mutually exclusive (i.e., temperature can have only one value at any instant, ora pointer may stop at only one point), then must be the sum of all probabilities from to

.

Now, we will introduce the concept of the cumulative frequency distribution; this will help us under-stand the meaning of the cumulative distribution function.

Consider the ages of 25 adult people picked at random from a population. Their ages and the fre-quency at which they occur is shown in Table 10.1.

TABLE 10.1 Frequency distribution of the ages of 25 adults.Age Frequency

23 to less than 30 4

30 to less than 40 9

40 to less than 50 8

50 to less than 60 2

60 to less than 75 2

P X x= f x=

f xf x 0

f xx

1=

X X– xX x

X

PX x P X x=

PX x X x

xPX x –

x

Page 348: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 10-3Orchard Publications

Cumulative Distribution Function

Using the frequencies of occurrence shown on the right column of Table 10.1, we can computethe cumulative relative frequency by dividing each frequency by the total number of people, thatis, 25. The cumulative frequency percentages are shown in Table 10.2.

In the second column (cumulative frequency) of Table 10.2, the successive numbers areobtained by addition. For example, on the third row, we added the values 4 and 9 yielding thevalue 13, since there are thirteen people whose age is less than 40.

We can use Excel’s FREQUENCY function to compute how often values occur within a range ofvalues such as those in Table 10.1. The syntax is

FREQUENCY(data_array,bins_array)

where

data_array = an array or a reference to a set of values for which we want to count frequencies ofoccurrence.

bins_array = an array or a reference to intervals into which we want to group the values indata_array.

For example, suppose that the test scores of an examination are as shown in Column A of thespreadsheet of Figure 10.1. These are the data_array. Column B shows the bins_array; these val-ues indicate that we want to count the number of scores corresponding to ranges

and .

We want the frequencies of occurrence to be displayed in Column C; therefore, we highlightCells C1:C10, in C1 we type =FREQUENCY(A1:A20,B1:B9), and we press the keys

simultaneously. Cell C1 indicates that there are zero scores below 10, C2indicates that there is only one score below 19 and so on. Cell C10 displays 2; this indicates thatthere are 2 values (95 and 97) that are greater than the highest interval which we specified, thatis, 89.

TABLE 10.2 Cumulative frequency percentages for 25 adults.Age (less than) Cumulative Frequency Cumulative Relative

FrequencyCumulative Frequency Percentage

23 0 0/25=0.00 0

30 4 4/25=0.16 16

40 4+9=13 13/25=0.52 52

50 13+8=21 21/25=0.84 84

60 21+2=23 23/25=0.92 92

75 23+2=25 25/25=1.00 100

0 9 10 19 20 29 30 39 40 49 50 59 60 69 70 79, 80 89 90 100

Ctrl Shift Enter

Page 349: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 10 Random Variables

10-4 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

Figure 10.1. Test scores

Properties of the cdf

1. is bounded between zero and one, that is,

(10.5)

Proof:

Since is a probability, it lies between and . Moreover, the condition excludes all outcomes, and thus it is zero; however, includes all outcomes and thereforeit is equal to one.

2. is a monotonic,* non-decreasing function of , that is,

(10.6)

Proof:

If , the events and are mutually exclusive. Also, the event implies and . Therefore,

* These are sequences in which the successive values either consistently increase or decrease but do not oscillate in relativevalue. Each value of a monotonic increasing sequence is greater than, or equal to the preceding value; likewise, each valueof a monotonic decreasing sequence is less than, or equal to the preceding value.

123456789

1011121314151617181920

A B C69 10 045 19 181 29 186 39 132 49 273 59 229 69 156 79 318 89 779 285788583819588974553

PX x

PX x

PX – 0 and= PX 1=

PX x 0 1 X –=

X =

PX x x

if x1 x2

then PX x1 PX x2

x1 x2 X x1 x1 X x2 X x2

X x1 x1 X x2

Page 350: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 10-5Orchard Publications

Cumulative Distribution Function

or(10.7)

Moreover, since is a non-negative real number, then,

(10.8)

3. is continuous on the right.

Proof:

Let the rv assume some value with probability , and consider the probability. If , the event is excluded but if , the event is included in. Since the events and are mutually exclusive, it follows that when

, the probability must jump by the amount as shown in Figure 10.2.

Figure 10.2. Plot of

Now, let and be two infinitesimal* values that continuously approach zero as a limit but

never become exactly zero. The notations and are used to denote

and

Therefore, is continuous on the right.

* Immeasurably or incalculably minute. In other words, very small.

P X x2 P X x1 P x1 X x2+=

P x1 X x2 P X x2 P X x1– PX x2 PX x1–= =

P x1 X x2

PX x2 PX x1 or PX x1 PX x2

PX x

X a P X a=

P X x x a X a= x a= X a=

P X x X x a x a=

x a= P X x P X a=

0 ax

PX (x)

1

P(X=a) DiscontinuityPX (a-)

PX (a+)

at x=a

PX x

PX a– PX a+

PX a– PX0lim a –=

PX a + PX0lim a +=

PX x

Page 351: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 10 Random Variables

10-6 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

In general, can have stepwise discontinuities, as in Figure 10.2, can be everywhere con-tinuous, or be mixed, that is, be continuous in some ranges, and have discontinuities in others.

Example 10.1

A coin is tossed twice so the sample space is where and. Let be a discrete rv where arbitrarily we have assigned for ( to

represent the number of tails which can come up, for and , and for ( ) as shown in Table 10.3.

a. Find the probability function corresponding to the rv .

b. Construct a probability graph.

c. Find the cdf of the rv .

d. Construct the graph of .

Solution:

a. The probability function was defined in (10.1) as . The probabilities that wewill get two tails, or one head and one tail etc. are

Then, the probability function is obtained from Table 10.3 as

The probability function is often shown in table form as in Table 10.4.

b. A probability graph can be either in the form of a bar chart, or a histogram as shown in Figure10.3.

TABLE 10.3 Table for Example 10.1

Sample Point TT HT TH HHX 0 1 1 2

TABLE 10.4 Probability Function of Example 10.1

x 0 1 2

PX x

S HH HT TH TT= H Heads=

T Tails= X X 0= TT 2 TailsX 1= HT TH X 2= HH

2 Heads

X

PX x X

PX x

P X x= f x=

P TT 1 4= P HT 1 4= P TH 1 4= P HH 1 4=

P X 0= P TT 1 4= =

P X 1= P HT P TH+ 1 4 1 4+ 1 2= = =

P X 2= P HH 1 4= =

f x P X x== 1 4 1 2 1 4

Page 352: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 10-7Orchard Publications

Cumulative Distribution Function

Figure 10.3. Bar Chart and Histogram for Example 10.1

We observe that in the bar chart the sum of the ordinates is , while in the histogram the sumof the areas of the rectangles is .

c. The cdf function is

d. The plot of the cumulative distribution function is shown in Figure 10.4.

We observe that the magnitudes of the jumps at , and are the ordinates , and of the bar chart of part (b). Therefore, it is possible to construct the bar chart represent-

ing a probability function from the cdf graph. The plot of Figure 10.4 is often referred to as astaircase or step function, and the value of the function at an integer is assigned from the higherstep. Thus, the value at is , not . For this reason, we say that the cdf is continuousfrom the right at , and . We also observe that the function either remains the same, orjumps to a higher value, and so it is a monotonically increasing function.

Example 10.2

Let the rv represent the transmission times of messages in a communications system whereit is known that

(10.9)

a. Find and sketch the cdf for (10.9).

b. Find the probability \

01 2 0 1 2

Bar Chart Histogram

f x f x

1 4

1 21 2

1 4

xx

1 4

11

PX x P X x=

PX x

0 – x 01 4 0 x 1

1 4 1 2+ 3 4= 1 x 23 4 1 4+ 1= 2 x

=

PX x

0 1 2 1 4 1 21 4

1 3 4 1 40 1 2

X x

PX X x e x–= x 0 0

PX x P X x=

P 1 X 2

Page 353: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 10 Random Variables

10-8 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

Figure 10.4. Cumulative Distribution Function for Example 10.2

Solution:

a. Since , the cdf for this example is

(10.10)

and the graph of this cdf is shown in Figure 10.5.

Figure 10.5. Cdf for Example 10.2

We observe that the cdf is continuous for all , and it is monotonically increasing.

b. From (10.7),

0 1 2

1

PX x

x

3 4

1 4

1 2

P X x 1 PX X x–=

PX x 1 PX X x– 1 e x––= =

PX x

1 e x––

x

PX x x 0

P x1 X x2 PX x2 PX x1–=

Page 354: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 10-9Orchard Publications

Probability Density Function

Then, with (10.10),

10.4 Probability Density FunctionWhile the cdf is particularly useful when computing probabilities, the probability density function(pdf) is more useful when we need to compute statistical averages. We will discuss statisticalaverages in Section 10.6.

We denote the pdf as and by definition,

(10.11)

From the definition of cdf, i.e.,

and the definition of the derivative, we have

(10.12)

Next, we recall (10.7), i.e.,

(10.13)

and we replace with and with . Then, (10.13) becomes

(10.14)

By substitution of (10.14) into (10.12), we get

(10.15)

and in the limit as , we express (10.15) as

(10.16)

We call the probability differential; it represents the probability that the rv lies between and .

P 1--- X 2--- 1 e 2–– 1 e 1––– e 1– e 2–– 0.233= ==

fX x

fX x xdd PX x=

PX x P X x=

fX x P X x x+ P X x–x

-------------------------------------------------------------x 0lim=

P x1 X x2 P x2 P x1– P X x2 P X x1–= =

x2 x x+ x1 x

P x X x x+ P X x x+ P x x–=

fX x P x X x x+x

-------------------------------------------x 0lim=

x 0

fX x dx P x X x dx+=

fX x dx X

x x dx+

Page 355: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 10 Random Variables

10-10 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

Since

(10.17)

it follows that the area under the pdf curve from to , is the probability that rv is less

than or equal to , that is,

(10.18)

where is a dummy variable* of integration.

Properties of the pdf

1. , i.e., the pdf of any rv is always non-negative.

Proof:

From the definition

(10.19)

and recalling that is a monotonic, non-decreasing function of , its slope is never nega-tive and thus .

2. The area under any pdf is always unity. In other words,

(10.20)

Proof:

From (10.18),

and letting the upper limit of integration , we get

(10.21)

* Since a definite integral depends only on the limits of integration, we can use any variable as the symbol for integration.

For instance, etc. For this reason, the variable x, t, , etc. is referred to as “dummy

variable”.

PX – 0= and fX x xdd PX x=

fX x – x X

x

PX x = fX d–

x

f x xda

bf t td

a

bf d

a

b= =

fX x

fX x 0

fX x xdd PX x=

PX x x

fX x 0

fX x xd–

1=

PX x = fX d–

x

x

PX fX x xd–

1= =

Page 356: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 10-11Orchard Publications

Two Random Variables

3. The probability that the rv lies in the range is obtained from the integral

, that is,

(10.22)

Proof:

From (10.7),

and from (10.18)

(10.23)

Therefore,

10.5 Two Random Variables

This section requires knowledge of partial differentiation* and double integration†. It may beskipped without loss of continuity.

Let and be two random variables. By definition the joint probability distribution function (jointcdf), denoted as , is the probability that rv is less or equal to a specified value andrv is less or equal to a specified value . The joint sample space in this case is the plane.

The joint cdf represents the probability that the outcome of an experiment will resultin a sample point lying inside the quadrant

that is,

(10.24)

* This is differentiation of a variable of a function of two or more variables such as . Partial differentiation isperformed by differentiation with respect to a single variable regarding other variables as constants.

† We use double integration to find the area of a region of an xy-plane. For instance, the double integral repre-

sents the area of a region of the xy-plane.

X x1 X x2

fX x xdx1

x2

P x1 X x2 fX x xdx1

x2=

P x1 X x2 P x2 P x1– P X x2 P X x1–= =

PX x = fX d–

x

P x1 X x2 P x2 P x1– fX x xd–

x2fX x xd

x1– fX x xd

x1

x2= = =

z f x y=

yd xd2

3

0

1

X YPXY x y X x

Y y x y–

PXY x y

X x– Y y–

PX Y, = P X x Y y,

Page 357: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 10 Random Variables

10-12 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

If the joint cdf is continuous everywhere, and its partial derivative

(10.25)

exists and is continuous everywhere except possibly on a finite set of curves, then, we call thejoint probability density function, or joint pdf of the random variables and .

From the definition of the partial derivative and (10.22), we may write:

(10.26)

Relation (10.26) states that may be thought of as the probability that the result ofan experiment will correspond to a sample point falling in the incremental area about point

in the joint sample space.

The joint cdf is also a monotonic, non-decreasing function of both and . Thus, itsderivative is for all and . If the joint pdf is continuous everywhere, thenthe joint cdf is

(10.27)

The joint cdf assumes its maximum value at and . Therefore,

(10.28)

If two random variables and are continuous and their probability density functions exist,then and are said to be statistically independent if and only if

(10.29)

10.6 Statistical Averages

By definition, the mean or expected value of a continuous rv is

(10.30)

Similarly, the expected value of a function of , say is defined as

PXY

fX Y, x y

2PX Y, x y,=

fXY

X Y

fX Y, x y dxdyy

y y+

x

x x+

P x X x dx+ y Y y dy+,=

fX Y, x y dxdy

dxdyx y

PX Y, x y, x y

fX Y, x y 0 x y fX Y, x y

PX Y, x y, fX Y, d d–

x

y=

PX Y, x y, x = y =

fX Y, d d––

1=

X YX Y

fX Y, x y fX x fY y=

mX E X X

mX E X= = xfX x xd–

X g X

Page 358: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 10-13Orchard Publications

Statistical Averages

(10.31)

For the special case where , we obtain the of the rv which is definedas

(10.32)

We observe that when , (10.32) gives the expected value , i.e., (10.30).

For , we get the mean-square value of , defined as

(10.33)

The expected value of a positive integer power of a rv is referred to as the nth moment aboutthe mean* and it is computed from

(10.34)

We observe that the left side of (10.34) is the expected value of the difference between the rvand its mean . For we obtain the first moment, that is,

(10.35)

Thus, the first moment of an rv is zero. If, in (10.34) we let , we get the second moment

which is known as the variance of the rv . It is denoted as or . In this case,

or

(10.36)

In the special case where , the variance and the mean-square value of , i.e.,

* In some probability and statistics books, it is also referred to as the rth central moment.

E g X = g x fX x xd–

g X X n= nth moment X

E X n = xnfX x xd–

n 1= E X

n 2= X

E X 2 = x2fX x xd–

n X

E X mX– n = x mX– nfX x xd–

XmX n 1=

E X mX– x mX– fX x xd–

xfX x xd–

mX fX x xd–

– mX mX 1– 0= = = =

X n 2=

X Var X X2

Var X X2 E X mX– 2 x mX– 2fX x xd

–E X2 2mXX– mX

2+= = = =

E X2 2mXE X mX2+– E X2 2mXmX– mX

2+ E X2 2mX2– mX

2+= ==

Var X X2 E X2 mX

2–= =

mX 0= X2 X E X2

Page 359: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 10 Random Variables

10-14 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

are equal as it can be seen from the right side of (10.36).

The variance* provides a measure of the spread or dispersion of the pdf of rv and its mean .The square root of the variance is called the standard deviation of the rv , and it is denoted as ,that is,

(10.37)

Example 10.3

A continuous rv has the pdf

(10.38)

a. Sketch this distribution, and find the value of .

b. Compute the probability that , that is lies between and .

c. Compute the expected value .

d. Compute the variance and standard deviation .

Solution:

a. The expression represents a straight line with slope and y-intercept . It is

shown in Figure 10.6.

The ordinate is found by the substitution of in (10.38).

Now, if is to be a pdf, the shaded area, which is a trapezoid, must be equal to . This areacan found from (4.20), that is, the area of a trapezoid. Then, we must have

(10.39)

* In analogy with physics, we can think of the mean as the center of mass. This is the point in a system of bodies at which themass of the system may be considered to be concentrated. It is also called the center of gravity, or centroid. We can alsothink of the variance as the moment of inertia, which is a measure of a body's resistance to angular acceleration. In physics,the moment of inertia is equal the product of the mass of a particle and the square of its distance from the center of gravity.In probability, the square root of the variance, that is, the standard deviation is a measure of the distance from the mean.

X mX

X X

X Var X=

X

fX x1

16------x k+ 0 x 4

0 otherwise=

k

1 x 3 x 1 3

E X

Var X X

116------x k+ m 1 16= k

k 14---+ x 4=

fX x 1

12--- 4 k k 1

4---++ 1=

Page 360: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 10-15Orchard Publications

Statistical Averages

Figure 10.6. Pdf for Example 10.3.

Solution of (10.39) yields and thus (10.38) reduces to

b. The probability that is represented by the shaded area of Figure 10.7. As before,we find this area, with the formula that gives the area for a trapezoid.

Figure 10.7. Computation of the probability for Example 10.3.

The area of the shaded trapezoid is

x

fX x

k

k 14---+

1 2 43

k 18---=

fX x1

16------x 1

8---+ 0 x 4

0 otherwise=

P 1 x 3

x

fX x

18--- 3

16------+ 5

16------=

1 2 43

18---

18--- 1

16------+ 3

16------=

P 1 x 3

12--- 2 3

16------ 5

16------+ 1

2--- 0.5= =

Page 361: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 10 Random Variables

10-16 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

Therefore,

c. The expected value is found from (10.30). For this example,

(10.40)

d. The variance is found from (10.36), that is,

(10.41)

We know the value of from part (c), and thus we need only to compute . Then, using(10.33) we get

(10.42)

Next, by substitution of the values of (10.40) and (10.42) into (10.41), we get

The standard deviation is

For a discrete rv that has possible values with probabilities respec-tively, the expected value is defined as

(10.43)

and if have equal probability of occurrence, then

(10.44)

The expected value is referred to as the mean or average of , and it is denoted as .

P 1 x 3 50%=

mX E X xfX x xd–

x 116------x 1

8---+ xd

0

4= = =

x2

16------ xd

0

4 x8--- xd

0

4+ x3

48------

0

4x2

16------

0

4

+ 6448------ 16

16------+ 7

3--- 2.33= = = ==

Var X X2 E X2 mX

2–= =

mX E X2

E X2 x2fX x xd–

x2 116------x 1

8---+ xd

0

4= =

x3

16------ xd

0

4 x2

8----- xd

0

4+ x4

64------

0

4x3

24------

0

4

+ 25664

--------- 6424------+ 20

3------= = ==

Var X X2 E X2 mX

2– 203

------ 73---

2– 11

9------= = = =

X Var X 119------ 11

3---------- 1.106= = = =

X x1 x2 xn P1 P2 Pn

E x

E x x1P1 x2P2 xnPn+ + + xiPii 1=

n= =

x1 x2 xn

E xx1 x2 xn+ + +

n----------------------------------------= =

x1 x2 xn

Page 362: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 10-17Orchard Publications

Statistical Averages

The mean square of a discrete rv is

(10.45)

The variance of a discrete rv having probability function is given by

and using the same procedure as in the derivation of (10.36), we get

(10.46)

Note 8.1

In a gambling game, the expected value can be used to determine whether the game is favorableto the player or not. If the expected value is positive, the game is considered to be favorable tothe player; if negative, the game is unfavorable. If the expected value is zero, the game is consid-ered fair.

Example 10.4

Suppose that a player tosses a fair die. If an odd number occurs, he wins that number of dollarsand if an even number occurs, he loses that number of dollars.

a. Determine whether this game is fair, favorable, or unfavorable to the player.

b. Compute the standard deviation.

Solution:

a. Let us denote the odd numbers 1, 3, and 5, as positive since the player wins when these occur,and the even numbers as negative, that is 2, 4, and 6, since he loses when these numbersoccur. We show the possible outcomes of the game and their probabilities of occurrence

in Table 10.5.

The expected value is found from (10.43). For this example,

TABLE 10.5 Table for Example 10.41 3 4 -2 -4 -6

1/6 1/6 1/6 1/6 1/6 1/6

E X 2 X

E X 2 x12P1 x2

2P2 xn2Pn+ + + xi

2Pii 1=

n= =

X f x

X2 E X – 2 xi – 2f xi

i 1=

nx – 2f x= = =

X2 E X 2 2–=

xi

P X xi=

xi

P X xi=

Page 363: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 10 Random Variables

10-18 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

and since the expected value is negative, we conclude that the game is unfavorable to theplayer.

b. The mean square of a discrete rv is obtained from (10.45), that is,

and from (10.46), the variance is

Therefore, the standard deviation is

Another statistical average is the characteristic function* of rv which is defined as the

expectation of , that is,

(10.47)

Here, we observe that except for a sign change in the exponent, the characteristic function is the Fourier transform of the pdf . Also, in analogy to the Inverse Fourier transform, wehave the relation

(10.48)

Example 10.5

Find the pdf of the rv defined as the sum of two statistically independent random variables and , that is, .

Solution:

From (10.45)

* This is an advanced topic of probability theory and may be skipped without loss of continuity.

E x x1P1 x2P2 xnPn+ + +=

1 16--- 3 1

6--- 5 1

6--- 2 1

6--- 4 1

6---– 6 1

6---––+ + 1

2---–==

X

E X 2 x12P1 x2

2P2 xn2Pn+ + +=

12 16--- 22 1

6--- 32 1

6--- 42 1

6--- 52 1

6--- 62 1

6---+ + + + + 91

6------==

X2 E X2 mX

2– 916

------ 12---–

2– 91

6------ 1

4---– 179

12--------- 14.92= = = = =

X 14.92 3.86= =

X v X

e jvX

X v E e jvX fX x e jvX xd–

= =

X v

fX x

fX x 12------ X v e j– vx vd

–=

Z XY Z X Y+=

Page 364: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 10-19Orchard Publications

Summary

(10.49)

and since and are statistically independent, it follows that

(10.50)

and by analogy with Fourier analysis that the convolution of two time functions corresponds tomultiplication of their Fourier transforms and vice versa, the pdf of the rv is given by theconvolution of the pdf of and , i.e.,

(10.51)

10.7 Summary

• A sample point is associated with each possible outcome of the experiment.

• The sample space is the total number of sample points , corresponding to the aggregate ofall possible outcomes of an experiment.

• An event may correspond to a single sample point or a set of sample points.

• A random variable (rv) is a variable that can wander over the set of sample points, and whosevalue is determined by an experiment.

• A discrete rv can take on only a finite number of values in any finite observation interval.

• A continuous rv can take on any value in the entire observation interval.

• A probability function (or probability distribution) is defined as where

and

• The cumulative distribution function (cdf) or probability distribution function is theprobability that a rv will be equal to or less than some value . In other words,

• A relative frequency table shows how often values occur within a range of values.

• is bounded between zero and one, that is,

• is a monotonic, non-decreasing function of , i.e.,

Z v E e jvZ E e jv X Y+ E e jvXe jvY= = =

X Y

Z v E e jvX E e jvYX v Y v= =

fZ z Z

X Y

fZ z fX z y– fY y yd–

fX x fY z x– xd–

= =

si

s

P X x= f x=

f x 0 f xx

1=

PX x

X xPX x P X x=

PX x PX – 0 and= PX 1=

PX x x if x1 x2

then PX x1 PX x2

Page 365: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 10 Random Variables

10-20 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

• is continuous on the right.

• The probability density function (pdf) is more useful when we need to compute statistical aver-

ages. It is denoted as and defined as

• , i.e., the pdf of any rv is always non-negative.

• The area under any pdf is always unity. In other words,

• The probability that the rv lies in the range is obtained from the integral

, that is,

• The mean or expected value of a continuous rv is

• The mean-square value of , defined as

• The expected value of a positive integer power of a rv is referred to as the nth moment

about the mean and it is computed from

• The first moment of an rv is zero.

• The second moment which is known as the variance of the rv is denoted as or

and is related to the mean square value and the mean as

• The variance provides a measure of the spread or dispersion of the pdf of rv and its mean.

• The square root of the variance is called the standard deviation of the rv , and it is denoted as

, that is,

• For a discrete rv that has possible values with probabilities respec-

tively, the expected value is defined as

PX x

fX x fX x xdd PX x=

fX x 0

fX x xd–

1=

X x1 X x2

fX x xdx1

x2P x1 X x2 fX x xd

x1

x2=

mX E X X mX E X= = xfX x xd–

X E X 2 = x2fX x xd–

n X

E X mX– n = x mX– nfX x xd–

X

X Var X X2

Var X X2 E X2 mX

2–= =

XmX

X

X X Var X=

X x1 x2 xn P1 P2 Pn

E x E x x1P1 x2P2 xnPn+ + + xiPii 1=

n= =

Page 366: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 10-21Orchard Publications

Summary

and if have equal probability of occurrence, then

• The mean square of a discrete rv is

• The variance of a discrete rv having probability function is given by

and

• In a gambling game, the expected value can be used to determine whether the game is favor-able to the player or not. If the expected value is positive, the game is considered to be favor-able to the player; if negative, the game is unfavorable. If the expected value is zero, the gameis considered fair.

• Another statistical average is the characteristic function of rv which is defined as the

expectation of , that is,

x1 x2 xn E xx1 x2 xn+ + +

n----------------------------------------= =

E X 2 X E X 2 x12P1 x2

2P2 xn2Pn+ + + xi

2Pii 1=

n= =

X f x

X2 E X – 2 xi – 2f xi

i 1=

nx – 2f x= = =

X2 E X 2 2–=

X v X

e jvXX v E e jvX fX x e jvX xd

–= =

Page 367: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 10 Random Variables

10-22 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

10.8 Exercises1. A fair coin is flipped four times.

a. List the possible outcomes

b. Find the probability of occurrence of each of the possible outcomes.

c. Find the probability that at most two heads occur.

d. Find the probability that at least two heads occur.

2. In a gambling game, a player tosses a fair die and wins if 2, 3 and 5 occurs and his winnings arethat number of dollars. He loses if 1, 4 or 6 occurs and his losses are that number of dollars. Isthis game favorable to the player?

3. An rv has the distribution shown below.

Show the cdf in a graph form.

4. A fair coin is tossed until a head or five tails occur. Compute the expected value of thetosses of the coin for this to occur.

5. The concentric circles of the figure below represent a game in a theme park where a ball, fromsome distance, is thrown into a box with three holes represented by the three concentric cir-cles. The numbers indicate the number of points won in each case. Thus, a player wins 10, 5, 3,or 0 points if he throws the ball inside the small, middle, large or outside the large circle respec-tively. The probability of winning any of these four points is and it is just as likely to throwthe ball inside any of these holes or outside. Compute the expected value of pointsearned each time a player throws a ball.

X

xi 2– 1 2 4

P x xi= 1 4 1 8 1 2 1 8

E X

1 2E X

105

3

0 (outside)Ball

Player

Page 368: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 10-23Orchard Publications

Exercises

6. A player tosses two fair coins and wins $5 if two heads occur, $2 if one head occurs, and $1 ifno heads occur.

a. Compute his expected winnings.

b. What is the maximum dollar amount he should pay to play the game if the casino requiresa fee to be paid in order to play?

Page 369: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 10 Random Variables

10-24 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

10.9 Solutions to Exercises1.

a.

b. The experiments (flips of the coin) are independent of each other and the coin is fair.Therefore, the probability of each occurrence is

c.

d.

2.The possible outcomes of the game and their respective probabilities are shown below wherethe negative numbers indicate that the player loses if a non-prime number occurs.

The expected value is

and since the result is negative, the game is unfavorable to the player.

HHHH HTHH THHH TTHH

HHHT HTHT THHT TTHT

HHTH HTTH THTH TTTH

HHTT HTTT THTT TTTT

2 3 5 1 4 6

1 16

P # of Heads 2 P zero Heads P 1 Head P 2 Heads+ +=1

16------ 4

16------ 6

16------+ + 11

16------==

P # of Heads 2 P 2 Heads P 3 Heads P 4 Heads+ +=6

16------ 4

16------ 1

16------+ + 11

16------==

xi

xi

P X xi= 1 6 1 6 1 6 1 6 1 6 1 6

E X 2 16--- 3 1

6--- 5 1

6--- 1 1

6--- 4 1

6---– 6 1

6---––+ + 1

6---–= =

Page 370: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 10-25Orchard Publications

Solutions to Exercises

3.

4.Only one toss occurs if heads occurs the first time, i.e., the event . Two tosses occur if thefirst is tails and the second is heads, i.e., the event , and so on. Therefore,

Then,

5.

3– 2– 1– 10 2 3 4

1

3 4

1 2

1 4

1 41 8

1 8

1 2

HTH

P X xi= P H P X 1= 1 2= = =

P X xi= P TH P X 2= P T P H 1 2 1 2 1 4= = = = =

P X xi= P TTH P X 3= 1 2 1 2 1 2 1 8= = = =

P X xi= P TTTH P X 4= 1 16= = =

P X xi= P TTTTH P X 5= 1 32= = =

or P TTTTT P X 5= 1 32= = =

1 32 1 32+ 1 16==

E X 1 12--- 2 1

4--- 3 1

8--- 4 1

16------ 5 1

16------+ + + + 31

16------= =

P X 10=12--- Area of 10 points

Area of t etarg----------------------------------------- 1

2--- 1 2

5 2------------- 1

50------= = =

P X 5=12--- Area of 5 points

Area of t etarg-------------------------------------- 1

2--- 3 2 1 2–

5 2--------------------------------- 8

50------= = =

P X 3=12--- Area of 3 points

Area of t etarg-------------------------------------- 1

2--- 5 2 3 2–

5 2--------------------------------- 16

50------= = =

P X 0= Area outside the outer circle 0= =

Page 371: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 10 Random Variables

10-26 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

and

6.a.

and thus the expected value is

or

b.If the player pays less than , the game is favorable to the player.

If the player pays exactly , the game is fair.

If the player pays more than , the game is unfavorable to the player.

E X 10 150------ 5 1

50------ 3 16

50------ 0+ + + 98

50------ 49

25------= = =

The probability of winning $5 1 4=

The probability of winning $2 1 2=

The probability of winning $1 1 4=

E X 5 14--- 2 1

2--- 1 1

4---+ + 10

4------ 5

2---= = =

E X $2.50=

$2.50

$2.50

$2.50

Page 372: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 11-1Orchard Publications

Chapter 11

Common Probability Distributions and Tests

his chapter is a continuation of the previous chapter. It discusses several probability distri-butions, percentiles, Chebyshev’s inequality, law of large numbers, sampling distribution of

means, tests of hypotheses, levels of significance, and the , , F, and (chi-square) tests.

11.1 Properties of Binomial CoefficientsThe notation

(11.1)

where represents the number of trials in an experiment, and the probability that an event willoccur, is used extensively in probability theory.

For and making use of *, we get

(11.2)

(11.3)

(11.4)

(11.5)

(11.6)

(11.7)

* By definition of the factorial, . Therefore, and for , thelast expression reduces to and thus .

Tz t 2

nk

n!n k– !k!

-----------------------=

n k

k 0 1 2 and 3= 0! 1=

n! n n 1– n 2– 1= n 1+ ! n 1+ n!= n 0=1! 1 0!= 0! 1=

n0

n!n 0– !0!

------------------------ n!n!1-------- 1= = =

n1

n!n 1– !1!

------------------------ n= =

n2

n!n 2– !2!

------------------------ n n 1–2!

--------------------= =

n3

n!n 3– !3!

------------------------ n n 1– n 2–3!

-------------------------------------= =

nn

n!0!n!---------- 1= =

nn 1–

n!n n– 1+ ! n 1– !

----------------------------------------------- n!1! n 1– !------------------------ n= = =

Page 373: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 11 Common Probability Distributions and Tests

11-2 Mathematics for Business, Science, and Technology, Second Edition

Orchard Publications

and if

(11.8)

(11.9)

and therefore,

(11.10)

The relation

(11.11)

is known as the binomial expansion*, binomial theorem, or binomial series.

11.2 The Binomial (Bernoulli) DistributionThe Binomial (Bernoulli) distribution is defined as

(11.12)

for and . Therefore, is non-negative.

From (11.12) and (11.11),

(11.13)

* The expansion of contains terms. Formulated in medieval times, the binomial theorem was developed (about1676) for fractional exponents by the English scientist Sir Isaac Newton, enabling him to apply his newly discovered meth-ods of calculus to many difficult problems. The binomial theorem is useful in various branches of mathematics, particularlyin the theory of probability.

a b+ n=

na

a b+

aa b+ !

a b a–+ !a!--------------------------------- a b+ !

b!a!-------------------= = =

nb

a b+

ba b+ !

a b b–+ !a!--------------------------------- a b+ !

a!b!-------------------= = =

na

nb

=

if a b+ n=

a b+ n an nan 1– b n n 1–2!

--------------------an 2– b2+ +=

+n n 1– n 2–3!

-------------------------------------an 3– b3 abn 1– bn+ + +

nkk 0=

nan k– bk=

a b+n n 1+

b k n p,;nk

pk 1 p– n k– n!n k– !k!

-----------------------pk 1 p– n k–= =

k 0 1 2 n= 0 p 1 b k n p;;

b k n p,;k 0=

n nk

pk 1 p– n k–

k 0=

np 1 p–+ n 1= = =

Page 374: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 11-3Orchard Publications

The Binomial (Bernoulli) Distribution

and thus the binomial distribution is a pdf of the discrete type.

In (11.13), we call the probability of a success. Likewise, we call the probability of a failure.Then,

(11.14)

For and , (11.12) becomes

(11.15)

Moreover, for , (11.15) reduces respectively to

The pdf and cdf of the binomial distribution for , , and are shownin Figures 11.1 and 11.2. We observe that they are the same as in Example 10.1.

Figure 11.1. Probability density function for the binomial distribution

Example 11.1

A coin is tossed six times. Compute:

a. the probability that exactly (no more, no less) two heads show up

b. the probability of getting at least four heads

c. the probability of no heads.

d. the probability of at least one head.

b k n p;;

p q

q 1 p–=

n 2= p 1 2=

b k 2 12---,;

2k

12---

k1 1

2---–

2 k– 2!2 k– !k!

----------------------- 12---

k 12---

2 k– 2!2 k– !k!

----------------------- 12---

2= = =

k 0 1 and 2=

b 0 2 12---,;

2!2!0!---------- 1

2---

20.25= =

b 1 2 12---,;

2!1!1!---------- 1

2---

20.50= =

b 2 2 12---,;

2!0!2!---------- 1

2---

20.25= =

n 2= p 1 2= k 0 1 and 2=

01 2

b k 2 1 2;

1 4

1 2

k

Page 375: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 11 Common Probability Distributions and Tests

11-4 Mathematics for Business, Science, and Technology, Second Edition

Orchard Publications

Figure 11.2. Cumulative distribution function for the binomial distribution.

Solution:

Here, . Let us denote as a success if heads show up, and as a failure if tails show up.Obviously, and .

a. We use the binomial distribution with successes, that is,

or

b. The probability of getting at least four heads is obtained by adding the probabilities with ,, and . Then,

c. The probability of no heads (all tails), is the probability of all failures. Thus,

0 1 2

1

k

3 4

1 4

1 2

P X k

n 6= p qq 1 p–= p q 1 2= =

k 2=

b k n p,;nk

pk 1 p– n k– nk

pkqn k– 62

12---

2 12---

6 2–= = =

6!6 2– !2!

------------------------ 12---

2 12---

6 2– 6!4!2!---------- 1

2---

2 12---

4 6 52 1------------ 1

4--- 1

16------ 15

64------= = =

k 4=

k 5= k 6=

nk

pk 1 p– n k– 64

12---

4 12---

2 65

12---

5 12---

1 66

12---

6+ +=

1564------ 6

64------ 1

64------+ + 22

64------ 11

32------= ==

q6 12---

6 164------= =

Page 376: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 11-5Orchard Publications

The Binomial (Bernoulli) Distribution

d. The probability of at least one head is

Example 11.2

A die is tossed seven times. Compute the probability that:

a. a 5 or a 6 occurs exactly three times

b. a 5 or a 6 never occurs

c. a 5 or 6 occurs at least once

Solution:

If a 5 or 6 shows up, we will call it a success .

a. If a 5 or 6 occurs three times, then and . Therefore,

b. The probability that 5 or 6 never occurs in seven trials, is equivalent to seven failures. A failure is

and thus the probability of seven failures is

c. The probability that a 5 or 6 occurs at least once is 1 minus the probability that 5 or 6 neveroccurs. Therefore,

The mean and the variance for the binomial distribution are:

(11.16)

and

1 q6– 1 164------– 63

64------= =

p

p 16--- 1

6---+ 1

3---= = k 3=

nk

pk 1 p– n k– 73

13---

3 23---

4 7!7 3– ! 3!

------------------------------ 13---

3 23---

4= =

7 6 53 2

--------------------- 127------ 16

81------ 560

2187------------ 0.256 25.6%= = ==

q

q 1 p– 1 13---– 2

3---= = =

q7 23---

7 1282187------------ 0.059 5.9%= = = =

1 q7– 1 1282187------------– 2059

2187------------ 0.942 94.2%= = = =

2

np=

Page 377: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 11 Common Probability Distributions and Tests

11-6 Mathematics for Business, Science, and Technology, Second Edition

Orchard Publications

(11.17)where

= number of samples, = probability of success, and = probability of failure.

Example 11.3

It is estimated that of PC users buy a new computer every three years. In a group of PCusers, compute

a.the mean number of users using the same PC after three years

b.the standard deviation

Solution:

Here, and . Then,

a. Using (11.16), the mean is

b. The standard deviation is the square root of the variance. Then, from (11.17),

11.3 The Uniform DistributionLet be an rv with pdf . The rv is said to be uniformly distributed in the interval if

(11.18)

The pdf of the uniform distribution is shown in Figure 11.3.

Figure 11.3. The pdf of the uniform distribution.

2 npq=

n p q

80% 4000

n 4000= p 0.8=

np 4000 0.8 3200= = =

npq 4000 0.8 0.2 25.3= = =

X fX x X a x b

fX x1

b a–------------ a x b

0 otherwise=

xa b

fX x1

b a–------------

Page 378: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 11-7Orchard Publications

The Uniform Distribution

From Figure 11.3 we observe that

and

The cdf of the uniform distribution if found from

(11.19)

and it is shown in Figure 11.4.

Figure 11.4. The cdf of the uniform distribution

We observe that in Figure (11.4),

and thus the equation of the straight line of the cdf, in terms of the slope and the vertical axisintercept (not shown), is

(11.20)

To find the intercept , we evaluate at . Then,

Therefore,

(11.21)

and by substitution (11.21) into (11.20), we get

fX x 0

Area fX x xda

b1= =

PX x fX x xda

b=

PX x

xa b

1

slope ab rise

run---------- 1 0–

b a–------------ 1

b a–------------= = =

c

PX x slope x c+ xb a–------------ c+= =

c PX x x a=

PX x x a= 0 ab a–------------ c+= =

c ab a–------------–=

PX x xb a–------------ a

b a–------------– x a–

b a–------------= =

Page 379: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 11 Common Probability Distributions and Tests

11-8 Mathematics for Business, Science, and Technology, Second Edition

Orchard Publications

Therefore, the cdf of the uniform distribution for the entire interval is

(11.22)

Example 11.4

A Silicon Valley commuter has determined that the commuting time from home to work variesbetween 55 and 75 minutes. Compute the probability that in any day, the commuting time will bebetween 60 and 70 minutes.

Solution:

The pdf of the uniform distribution for this example is shown in Figure 11.5 where and.

Figure 11.5. The pdf of Example 11.4

Then, , and . The probability that the commuting time willbe between 60 and 70 minutes is shown by the cross-hatched area whose value (probability) is

Example 11.5

Prove that the mean and variance of the uniform distribution are given by

(11.23)

and

(11.24)

respectively.

0 x

PX x

0 x ax a–b a–------------ a x b

1 x b

=

b 75=

a 55=

fX x

0.05

x7570656055

b a– 20= 1 b a– 1 20 0.05= =

Probability 6070 Area 60

70 70 60– 0.05 0.5 or 50%= = =

2

a b+2

------------=

2 b a–12

----------------=2

Page 380: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 11-9Orchard Publications

The Uniform Distribution

Proof:

From Chapter 10, equations (10.30) and (10.36),

(11.25)

and

(11.26)

Then, for the uniform distribution, the mean or expected value is

*

and the variance is

where

and thus

Example 11.6

A food distributor sells 10 lb. bags of potatoes at a certain price. It is known that the actual weightof each bag varies between 11.75 and 10.75 lbs. Compute:

a. the mean (average) weight of each bag

b. the variance and the standard deviation

c. the probability that a bag weighs more than 10 lbs.

Solution:

a. The weight of each bag is uniformly distributed and thus from (11.23),

* We have used the identity

† We have used the identity

mX E X= = = xfX x xd–

Var X X2 E= = X mX– 2 =E X 2 mX

2–

mX E X= = = x 1b a–------------ xd

a

b x2

2 b a–--------------------

a

bb2 a2–

2 b a–-------------------- a b+

2------------= = =

x2 y2– x y+ x y–=

Var X X2 E= = X mX– 2 E X2 mX

2– E X2 2–= =

E X2 x2 1b a–------------ xd

a

b x3

3 b a–--------------------

a

bb3 a3–

3 b a–-------------------- a2 ab b2+ +

3-----------------------------= = = =

x3 y3– x y– x2 xy y2

+ +=

Var X X2= E X2 2– a2 ab b2+ +

3----------------------------- a b+

2------------

2– b a– 2

12-------------------= = =

Page 381: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 11 Common Probability Distributions and Tests

11-10 Mathematics for Business, Science, and Technology, Second Edition

Orchard Publications

b. The variance and standard deviation are found from (11.24). Then,

and

c. The probability that a bag weighs more than 10 lbs. is denoted by . It is shown in Fig-ure 11.6. The probability is represented by the cross hatched area whose value is

. Thus, , that is, there is a probability that 75% of the bagsweigh more that 10 lbs.

Figure 11.6. The pdf of Example 11.6

11.4 The Exponential DistributionThe pdf of the exponential distribution is defined as

(11.27)

It can be shown that the mean of the exponential distribution is

(11.28)and the variance is

(11.29)The exponential distribution is also expressed as

(11.30)

a b+2

------------ 9.75 10.75+2

------------------------------ 10.25= = =

Var X X2= b a– 2

12------------------- 10.75 9.75– 2

12------------------------------------- 1

12------= = =

112------ 0.29= =

P X 10

1 0.75 0.75= P X 10 0.75=

fX x

x

1.00

10.7510.5010.2510.009.75

fX x e x– x 00 otherwise

=

1=

2 1 2=

fX x1---e x– x 0

0 otherwise=

Page 382: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 11-11Orchard Publications

The Exponential Distribution

By integrating the pdf, we find that the cfd of the exponential distribution is

(11.31)

The pdf of the exponential distribution is shown in Figure 11.7 and the cdf in Figure 11.8.

Figure 11.7. The pdf of the exponential distribution

Figure 11.8. The cdf of the exponential distribution

Example 11.7

The lifetimes for a certain brand of computer monitors are exponentially distributed with a mean years. Compute the probability that these monitors have lifetimes between and years.

Solution:

The probability is computed from the cross-hatched area in Figure 11.11.

P X a 1 e x––=

1 e x–

x

fX x

1 e x––

x

PX x

4= 4 8

P 4 x 8

Page 383: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 11 Common Probability Distributions and Tests

11-12 Mathematics for Business, Science, and Technology, Second Edition

Orchard Publications

Figure 11.9. Computation of the pdf for Example 11.7For this example,

(11.32)From (11.31),

and

By substitution into (11.32),

(11.33)

Therefore, we can say that there is a probability of that the monitors have lifetimesbetween and years.

The result can also be found with Excel’s EXPONDIST function whose syntax is

=EXPONDIST(x,lambda,cumulative)

where

x = value of the function

lambda = the parameter value

cumulative = exponential function. If TRUE, the cdf is returned, and if FALSE, the pdf isretuned.

With the data given in Example 11.7, . Then,

=EXPONDIST(8,1/4,TRUE) returns 0.865, while

=EXPONDIST(4,1/4,TRUE) returns 0.632.

The area in the interval is . This is the same answer as the one wefound using (11.32).

0 4 8 1 2

x

fX x

P 4 x 8 P x 8 P x 4–=

P x 8 1 e 8 4––=

P x 4 1 e 4 4––=

P 4 x 8 1 e 8 4–– 1 e 4 4––– 1 e 2–– 1– e 1–+ 0.233= = =

23.3%4 8

1 1 4= =

4 x 8 0.865 0.632– 0.233=

Page 384: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 11-13Orchard Publications

The Normal (Gaussian) Distribution

11.5 The Normal (Gaussian) DistributionThe normal distribution is the most widely used distribution in scientific and engineering applica-tions, demographic studies, poll results, and business applications.

Suppose we gather and plot the heights (in feet and inches) of several people versus the number ofthese people. If many samples are collected, we obtain the curve shown in Figure 11.10. This isthe so-called bell curve of the normal distribution.

Figure 11.10. The shape of the normal distribution.

The pdf of the normal distribution is defined as

(11.34)

where and .

If the mean is zero, i.e., if , (11.34) reduces to

(11.35)

The cdf of the normal distribution is

(11.36)

The normal distribution is usually expressed in standardized form, where the standardized rv isreferred to as the standardized rv and, in this case, is related to as

fX x 12 X

-----------------ex –

2 2 X–=

mean= X s dard deviationtan=

0=

fX x 12 X

-----------------ex2 2 X–

=

PX x 12 X

----------------- ex –

2 2 X–xd

x=

ZX Z X

Page 385: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 11 Common Probability Distributions and Tests

11-14 Mathematics for Business, Science, and Technology, Second Edition

Orchard Publications

(11.37)

Then, the mean of the rv is and the variance is one, that is, The pdf of the stan-dardized normal distribution is then simplified to

(11.38)

and the corresponding cdf becomes

(11.39)

where is a dummy variable of integration.

Figure 11.11 shows the standard normal curve. It also shows the areas within 1, 2 and 3 standarddeviations from the mean taken as zero.

Figure 11.11. The standardized normal curve

As shown in Figure 11.11, the area for the interval (one standard deviation) isequal to approximately of the total area, and the areas for the intervals (two standard deviations) and (three standard deviations), are and

of the total area respectively.

Z X –

X-------------=

Z 0= X2 1=

fZ z 12

----------e z2 2–=

PZ z P Z z 12

---------- e u2 2– ud–

z 12--- 1

2---------- e u2 2– ud

0

z+= = =

u

Normalized (Standard) Normal Distribution ( = 0, = 1)

0.0

0.1

0.2

0.3

0.4

z

f(z)

12 13 2 3

= 0Area between1 and +1

is 68.27%

Area between2 and +2

is 95.45%

Area between3 and +3

is 99.73%

0

1 z +1–

68.27% 2 z +2–

3 z +3– 95.45%99.73%

Page 386: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 11-15Orchard Publications

The Normal (Gaussian) Distribution

Example 11.8

In a college physics examination, the mean and standard deviation are and respectively.Compute the scores in standard units of students receiving the grades

a. b. c. d. Solution:

Using (11.37) we get:

a.

b.

c.

d.

Example 11.9

The mean and standard deviation on a college mathematics examination are and respec-tively. Compute the grades corresponding to the standard scores

a. b. c. d. Solution:

Solving (11.37) for , we get

(11.40)Then, with (11.40) we get

a.

b.

c.

d.

We can use Excel’s STANDARDIZE function to normalize a value from a distribution with aknown mean and known standard deviation. The syntax is

STANDARDIZE(x,mean,standard_dev)

74 12

65 74 86 92

Z1x1 –-------------- 65 74–

12------------------ 0.75–= = =

Z2x2 –-------------- 74 74–

12------------------ 0.00= = =

Z3x3 –-------------- 86 74–

12------------------ 1.00= = =

Z4x4 –-------------- 92 74–

12------------------ 1.50= = =

74 12

1.00– 0.50 1.25 1.75

x

x Z +=

x1 Z1 + 12 1– 74+ 62= = =

x2 Z2 + 12 0.50 74+ 80= = =

x3 Z3 + 12 1.25 74+ 89= = =

x4 Z4 + 12 1.75 74+ 95= = =

Page 387: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 11 Common Probability Distributions and Tests

11-16 Mathematics for Business, Science, and Technology, Second Edition

Orchard Publications

where

x = value to be normalized

mean = mean of the distribution

standard_dev = standard deviation of the distribution

For example, the normalized value of from a distribution with and is foundwith =STANDARDIZE(50,25,2.8) which returns .

We can obtain probability values from the normalized normal curve from published tables; how-ever, we must be careful how to use these tables. For special and repeated applications, it is prefer-able to construct a spreadsheet, from which we can get quick and accurate answers to a variety ofquestions. We will refer to the spreadsheet of Figure 11.12 to answer the questions posed inExample 11.10 that follows. We will provide instructions to construct this spreadsheet at the con-clusion of this example.

Example 11.10

Suppose we are employed by a manufacturing company that makes computer memory chips.Industry standards, which take into consideration life, size, tolerance, and reliability, have estab-lished ratings that vary from 3 to 9 where 3 is the lowest and 9 the highest. For the past ten years,our facility has received the following ratings:

We can compute the mean and standard deviation with the Excel functions AVER-AGE(number1,number2,....) and STDEV(number1,number2,....) respectively. Then,

=AVERAGE(3,4,3,5,7,6,7,8,9,8) returns . Also,

=STDEV(3,4,3,5,7,6,7,8,9,8) returns which, for convenience, we round to .

Therefore, for this example and

The management needs answers to the following questions assuming that our competitors’ ratingshave the same mean and standard deviation.

Question 1:

If one of our competitors has a rating of points in the current year, what is the probability thathe ranks among the top of memory chip manufacturers?

We can answer this question by referring to the table (spreadsheet) of Figure 11.12. The valuesin Column A represent memory chip ratings, and we find that the mean appears in A16.

50 25= 2.8=

z 8.929=

3 4 3 5 7 6 7 8 9 8

6

2.16 2

6= 2=

85%

X6=

Page 388: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 11-17Orchard Publications

The Normal (Gaussian) Distribution

Figure 11.12. Spreadsheet for finding areas under the normal curve.

To find the probability that chips have a rating less than , that is, less than the mean, we look atE16 and we see that there is probability that the chips have a rating less than . In otherwords, there is a probability of almost that the chips have a rating below the mean. We alsofind, from E21, that there is a probability of that the chips have a rating less than .To

Area Calculations for Normal distribution= 6 Probability that a random sample:= 2 a. is less than a certain value

A B C D E F G H I (left side - Column E)X Z Curve Bar Left Right Z to Both Between

value value height area side side mean ends ends1 0.00 -3.00 0.00443 0.13% 0.13% 99.87% 49.87% 0.26% 99.74%2 0.40 -2.80 0.00792 0.12% 0.25% 99.75% 49.75% 0.51% 99.49%3 0.80 -2.60 0.01358 0.21% 0.47% 99.53% 49.53% 0.94% 99.06%4 1.20 -2.40 0.02239 0.36% 0.83% 99.17% 49.17% 1.66% 98.34% b. exceeds a certain value5 1.60 -2.20 0.03547 0.58% 1.41% 98.59% 48.59% 2.81% 97.19% (right side - Column F)6 2.00 -2.00 0.0540 0.89% 2.30% 97.70% 47.70% 4.60% 95.40%7 2.40 -1.80 0.0790 1.33% 3.63% 96.37% 46.37% 7.26% 92.74%8 2.80 -1.60 0.11092 1.90% 5.53% 94.47% 44.47% 11.06% 88.94%9 3.20 -1.40 0.1497 2.61% 8.14% 91.86% 41.86% 16.27% 83.73%

10 3.60 -1.20 0.1942 3.44% 11.58% 88.42% 38.42% 23.15% 76.85% c. is between mean and z11 4.00 -1.00 0.2420 4.36% 15.94% 84.06% 34.06% 31.87% 68.13% (z to mean - Column G)12 4.40 -0.80 0.2897 5.32% 21.25% 78.75% 28.75% 42.51% 57.49%13 4.80 -0.60 0.3332 6.23% 27.48% 72.52% 22.52% 54.97% 45.03%14 5.20 -0.40 0.3683 7.01% 34.50% 65.50% 15.50% 69.00% 31.00%15 5.60 -0.20 0.3910 7.59% 42.09% 57.91% 7.91% 84.18% 15.82%16 6.00 0.00 0.3989 7.90% 49.99% 50.01% 0.01% 99.98% 0.02%17 6.40 0.20 0.3910 7.90% 57.89% 42.11% 7.89% 84.22% 15.78% d. is greater than a given value 18 6.80 0.40 0.3683 7.59% 65.48% 34.52% 15.48% 69.03% 30.97% from the mean.19 7.20 0.60 0.3332 7.01% 72.50% 27.50% 22.50% 55.00% 45.00% (both ends - Column H)20 7.60 0.80 0.2897 6.23% 78.73% 21.27% 28.73% 42.54% 57.46%21 8.00 1.00 0.2420 5.32% 84.04% 15.96% 34.04% 31.91% 68.09%22 8.40 1.20 0.1942 4.36% 88.41% 11.59% 38.41% 23.19% 76.81%23 8.80 1.40 0.1497 3.44% 91.85% 8.15% 41.85% 16.31% 83.69%24 9.20 1.60 0.1109 2.61% 94.45% 5.55% 44.45% 11.10% 88.90%25 9.60 1.80 0.0790 1.90% 96.35% 3.65% 46.35% 7.30% 92.70% e. is within a given value 26 10.00 2.00 0.0540 1.33% 97.68% 2.32% 47.68% 4.64% 95.36% from the mean.27 10.40 2.20 0.0355 0.89% 98.57% 1.43% 48.57% 2.85% 97.15% (between ends - Column I)28 10.80 2.40 0.0224 0.58% 99.15% 0.85% 49.15% 1.69% 98.31%29 11.20 2.60 0.0136 0.36% 99.51% 0.49% 49.51% 0.97% 99.03%30 11.60 2.80 0.0079 0.21% 99.73% 0.27% 49.73% 0.54% 99.46%31 12.00 3.00 0.0044 0.12% 99.85% 0.15% 49.85% 0.30% 99.70%

12 13 2 3

12 13 2 3

12 13 2 3

12 13 2 3

649.99% 6

50%84.04% 8

Page 389: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 11 Common Probability Distributions and Tests

11-18 Mathematics for Business, Science, and Technology, Second Edition

Orchard Publications

find the probability that our competitor is in the top , we look for a value of in ColumnE. This percentage is between and , and Column A shows that the 95% probabil-ity corresponds to a rating between and as indicated in A24 and A25. Therefore, weconclude that the probability that our competitor is in the top is zero.

Question 2:

Let us assume that the highest rating awarded to any manufacturing facility is . Based on ourprevious ratings, what is the probability that our chips will be rated above ?

We look in Column F which lists the probabilities that a random sample exceeds a certain value.F16 indicates that there is only a probability that the chips will be rated above .

Question 3:

Suppose our policy dictates that manufactured chips with a rating of or less must be rejected.What is the probability that we find chips which will have this rating.

We look in Column E which lists the probabilities that a random sample is less than a certainvalue. E6 indicates that there is only a probability that the chips will be rated or below.

Question 4:

Suppose our rating system includes decimal values between integers. What is the probability thata shipment contains chips which have a rating between and ?

We look in Column E which lists the probabilities that a random sample is less than a certainvalue. Here, we subtract the left side area for the lower value from the left side area for the highervalue. That is, we subtract from . Thus, .Therefore, the probability that this shipment consists only of chips rated between and is

.

Question 5:

What is the probability that the rating is more than points above or below the mean?

Column H lists the probabilities for both ends. For a rating of less than ( ), H6 gives probability. Likewise, for a rating of more than ( ), H26 gives probability. Theseprobabilities must be equal to each other since the standardized normal distribution is symmetri-cal about the mean.

Question 6:

What is the probability that the ratings are within points of the mean?

We look in Column I which lists the probabilities between ends. The answer can be found from

5% 95%94.45% 96.35%

11.2 11.65%

1210

2.32% 10

2

2.30% 2

4.8 7.2

4.8 27.48% 7.2 72.50% 72.50% 27.48%– 45.02%=

4.8 7.245.02%

4

2 6 4– 4.60%10 6 4+ 4.64%

4

Page 390: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 11-19Orchard Publications

The Normal (Gaussian) Distribution

either I6 or I26. We observe that I6 indicates a probability of and I26 shows . Ofcourse, we could have obtained the answer by subtracting the result of Question 5 from unity(100%), that is, .

Question 7:

What answer should we give to a customer of ours, if he wants to know what the probability isthat the chips he buys have ratings from to ?

We look in Column G which lists the probabilities between the mean and a given value. G21yields a probability of and this is the answer to our customer’s question.

Instructions for constructing the table of Figure 11.12.

1. Start with a blank spreadsheet and in rows A1:J6 of the spreadsheet type the informationshown. List the data , and of the known observations in range N1:N10of the spreadsheet.

In B2, type the formula =ROUND(AVERAGE(N1:N10),0)

and in B3, the formula =ROUND(STDEV(N1:N10),0)

These formulas compute and round, to the nearest integer, the average and standard deviationof the data in range N1: N10.

2. Using the autofill feature, we enter the numbers through in A7:A37 of the spreadsheet.We will use these as references to indicate the appropriate rows of our table.

3. In Column B of the table (Column C of the spreadsheet), we enter the values starting with up to in increments. Again, we use the autofill feature to enter these values.

In Row 1, Column A of the table (cell B7 of the spreadsheet), type the formula=C7*$B$3+$B$2. This formula represents the equation

(11.41)

This is the same equation as (11.37), that is,

(11.42)

Therefore, if the observations data in Column L of the spreadsheet change, the mean and stan-dard deviation will change accordingly, but it will not be necessary to change our table. Wecopy B7 to B8:B37.

4. In Column C of the table (cell D7 of the spreadsheet) we enter the formula

=EXP(C7^2*( 1/2))/SQRT(2*PI())

95.40% 95.36%

100% 4.60%– 95.40%=

6 8

34.06%

5 4 7 8 3 9 6 3 8 7

1 31

Z3.00– +3.00 0.2

X Z std mean Z += =

Z X –

X-------------=

Page 391: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 11 Common Probability Distributions and Tests

11-20 Mathematics for Business, Science, and Technology, Second Edition

Orchard Publications

This represents the height of the curve; this is, in (11.38), that is,

(11.43)

5. The normalized cdf of the normal distribution is, from (11.39),

(11.44)

This gives us the area of the curve from to some point . Obviously, the area from to is . Now, we recall that we have divided the range into increments (

values column.) We want our starting point to be at and therefore, we need to find thearea under the curve for the interval . This can be found by integrating (11.44).That is, in the upper limit of integration, we could let . However, this is a very difficultintegration. Instead, we refer to math tables, such as CRC Standard Mathematical Tables, wherewe find that this area is and this establishes our first value for Column D of the table(cell E7 of the spreadsheet). This value is entered as a percentage, that is, . The secondvalue in Column D (cell E8 of the spreadsheet), is found by taking the average of the first twovalues in Column C (cells D7 and D8 of the spreadsheet), so that this value will be approxi-mately equal to the value obtained from math tables. Accordingly, we enter the second valuein Column D as =AVERAGE(D7:D8)*0.2 and this represents the area of the bar for the units width. Then, we copy E8 to E9:E37.

6. We want Column E of the table (F on the spreadsheet) to represent the sum of the areas ofColumn D of the table from a given point. The first value is the same as in Column D of thetable, that is, . Therefore, we copy from cell E7 to F7. The next value in ColumnE of the table (F on the spreadsheet) must be the sum of the areas from to so we type=E8+F7 in cell F8. Then, we copy F8 to F9:F37.

7. Column F of the table (G on the spreadsheet) is used to show the total area from any point to. This area is obviously minus the area indicated by Column E of the table (F on the

spreadsheet). Therefore, in cell G7, we type =1 F7 and we copy this to G8:G37.

8. Column G of the table (H on the spreadsheet) is used to show the area between a point andthe mean. Since the mean divides the curve into two equal areas, we need be concerned withonly half the area under the curve. Therefore, from the leftmost tail of the curve, Row 1 of thetable (cell H7 of the spreadsheet) to the middle of the curve, Row 16 of the table (cell H22 ofthe spreadsheet), we subtract the left side values of Column E of the table (F of the spread-sheet) from 0.5. Thus, in cell H7 we type =0.5 F7 and we copy this to cells H8:H22. For theremaining cells, we subtract the right side values, Column E of the table (F on the spread-sheet). Therefore, in cell H23 we type =0.5 G23 and we copy this to cells H23:H37.

f z

fZ z 12

----------e z2 2–=

PZ z P Z z 12

---------- e u2 2– ud–

z= =

– z –

+ 1 3 z +3– 0.2 Zz 3–=

z 3––

z 3–=

0.00130.13%

0.2 z

0.13% 0.13%3– 2.8–

z+ 1

z

Page 392: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 11-21Orchard Publications

The Normal (Gaussian) Distribution

9. Column H of the table (I on the spreadsheet) shows the area at both ends. It is found by sub-tracting twice the area between point and the mean from . Therefore, in cell I7 we type=1 2*H7 and we copy it to cells I8:I37.

10. Column I of the table (J on the spreadsheet) shows the area which remains between the endsafter we subtract both left and right ends. Therefore, in cell J7 we type =1 I7 and we copy it tocells J8:J37.

The MATLAB* code below will construct the plot of the standardized normal distribution.

% This file produces a plot of the standard normal distribution;

z=linspace( 3,3); fz=1./sqrt(2*pi).*exp( z.^2/2); plot(z,fz); grid;

title('Standard Normal Distribution'); xlabel('Independent Variable Z');

ylabel('Dependent Variable f(Z)');

Example 11.11

Prove that the Gaussian (normal) pdf is truly a probability density function.†

Proof:

We must prove that:

a. the pdf is non-negative, that is,

b. the area under the curve is equal to 1, that is,

The proof that can be seen from the bell curve of Figure 11.11.

To prove that the area under the curve is equal to unity, we start with

(11.45)

and we let

(11.46)

Then,(11.47)

* MATLAB (MATrix LABoratory) is a very powerful tool for making mathematical calculations, from basic to advancedcomputations. It also produces impressive plots. It is introduced in Appendix A.

† This proof is lengthy and requires knowledge of advanced mathematics. It may be skipped without loss of continuity.

z 1

fX x 0

fX x xd–

1=

fX x 0

fX x xd–

12 X

----------------- e1

2 X2

----------– x –2

xd–

=

x –

X------------ t=

dx Xdt=

Page 393: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 11 Common Probability Distributions and Tests

11-22 Mathematics for Business, Science, and Technology, Second Edition

Orchard Publications

and by substitution of (11.46) and (11.47) into (11.45), we get

(11.48)

Next, we let

then,

or

(11.49)

Now, we convert (11.49) to polar coordinates by letting , , and. We note that as and vary from to , varies from to

whereas varies from to . Therefore,

(11.50)

or

(11.51)

Letting , it follows that and thus

or

Example 11.12

For the normal pdf, i.e.,

(11.52)

fX x xd–

12

---------- e12---– t2

td–

=

A 12

---------- e12---– t2

td–

=

A2 AA 12

---------- e12---– x2

x 12

---------- e12---– y2

yd–

d–

= =

A2 12------ e

12---– x y+

2

xd yd––

=

x rcos= y rsin=

dxdy dA rdrd= = x y – + r 00 2

A2 12------ e 1 2– r2

r rd d00

2 12------ d e 1 2– r2

r rd00

2= =

A2 22------ e 1 2– r2

r rd0

=

r2 2 = d rdr=

A2 e– d0

e–– 0 0 1–– 1= = = =

fX x xd–

1=

fX x 12 X

-----------------ex –

2 2 X2

–=

Page 394: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 11-23Orchard Publications

The Normal (Gaussian) Distribution

prove that * and .

Proof:

(11.53)

Letting

(11.54)

it follows that(11.55)

and

(11.56)

Substitution of (11.55) and (11.56) into (11.53) yields

or

(11.57)

From the plot of Figure 11.13 below, we observe that

(11.58)is an odd function, i.e., .

Figure 11.13. Plot of the function

* This proof also requires knowledge of advanced mathematics. Thus, it may be skipped.

E X = Var X X2=

E X = xfX x xd–

x 12 X

-----------------ex –

2 2 X2

–xd

–=

x –

X------------ t=

x Xt +=

dx X dt=

E X 12

---------- Xt + e t2 2– td–

=

E X X

2---------- te t2 2– td

–=

2---------- e t2 2– td

–+

te t2 2–

f t–– f t=

u=f(t)=texp(-t 2 /2)

-20.0-10.0

0.010.020.0

-2 -1 0 1 2

t

s=f(t

)

u f t te t2– 2= =

Page 395: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 11 Common Probability Distributions and Tests

11-24 Mathematics for Business, Science, and Technology, Second Edition

Orchard Publications

Then, the first integral of (11.57) is zero* whereas the second is since it is the integralof the pdf of the normal distribution of (11.52) with and . Therefore, .

Next, for the variance, we first compute the mean square value of X, , that is,

(11.59)

As before, we let

Then,

and

By substitution into (11.59),

or

(11.60)

and as we found in part (a), the second integral of the above expression is zero and the third is

. Therefore, (11.60) is reduced to

Next, we compute the variance from

The proof will be complete if we show that the integral

(11.61)

is equal to one.

* Odd functions have the property that the net area from to or, in general, from to is zero.

1 =

– + x– +x

0= X 1= E X =

E X 2

E X 2 = x2fX x xd–

12 X

----------------- x2ex –

2 2 X2

–xd

–=

x –

X------------ t=

x Xt +=

dx Xdt=

E X 2 12

---------- Xt + 2e t2 2– td–

=

E X 2 X2

2---------- t2e t2 2– td

2 X

2------------- te t2 2– td

2

2---------- e t2 2– td

–+ +=

2 1 2=

E X 2 X2

2---------- t2e t2 2– td

2+=

Var X

Var X E X2 2– X2

2---------- t2e t2 2– td

2 2–+ X2 1

2---------- t2e t2 2– td

–= = =

12

---------- t2e t2 2– td–

Page 396: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 11-25Orchard Publications

The Normal (Gaussian) Distribution

We will integrate (11.61) by parts* recalling that

(11.62)

Here, we let(11.63)

and

(11.64)

Differentiating (11.63) and integrating (11.64) we get

and

We also recall that if

then

(11.65)

Therefore, using (11.62) we get

since the first term on the right side is zero and the second is unity.

Related to the cfd of the normal distribution are the error function† defined as

(11.66)

where is a dummy variable.

The complementary error function is defined as

* This is a method of integration, where the given integral is separated into two parts to simplify the integration. Itis discussed in calculus textbooks.

† The error function is also known as the “probability integral”.

u vd uv v ud–=

u t=

dv te t2 2– dt=

du dt=

v e t2 2––=

y ex2

=

dydx------ ex2 d

dx------ x2 2xex2

= =

12

---------- t2e t2 2– td–

12

---------- tet2

2----–

12

---------- e t2 2– td–

+ 1= =

PX x erf u

erf u 2------- e2

– d0

u=

erfc u

Page 397: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 11 Common Probability Distributions and Tests

11-26 Mathematics for Business, Science, and Technology, Second Edition

Orchard Publications

(11.67)

The error function can also be expressed in series form as

(11.68)

The error function is an odd function, that is,

(11.69)

The cfd of the normal distribution is often expressed in terms of the error function. Theirrelation is derived as follows:

We know that

and that the pdf of the normal distribution is symmetrical about the vertical axis. Therefore,

From (11.36),

(11.70)

Next, we make a variable change in (11.70), that is, we let

(11.71)

then,

(11.72)

By substitution of (11.71) and (11.72) into (11.66), we get:

(11.73)

or

erfc u 2------- e2

– du

1 erf u–= =

erf u 2------- 1– nu2n 1+

n! 2n 1+----------------------------

n 0=

=

e– rf u– erf u=

PX x

fX x xd–

1=

fX x xd–

0 12---=

PX x 12 X

----------------- ex –

2 2 X2

–xd

x 12--- 1

2 X

----------------- ex –

2 2 X2

–xd

0

x+= =

x –

2 X

-------------=

d 12

------- 1X

------dx=

erf x –

2 X

------------- 22 X

----------------- ex –

2 X

--------------2

– xd0

x=

Page 398: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 11-27Orchard Publications

The Normal (Gaussian) Distribution

(11.74)

Finally, substitution of (11.74) into (11.70) yields

(11.75)

Example 11.13

Determine the probability that the Gaussian rv lies in the interval

where is a non-zero positive integer.

Solution:

By definition,

and from (8.7),(11.76)

Then,

and using (11.75),

Similarly,

Therefore, with (11.76),

or

12---erf x –

2 X

------------- 12 X

----------------- ex –

2 X

--------------2– xd

0

x=

PX x 12--- 1 erf x –

2 X

--------------+=

X

k X– X k X+

k

PX x P X x=

PX x1 X x2 PX x2 PX x1–=

PX k X– X k X+ PX k X+ PX k X––=

PX k X+12--- 1 erf

k X –+

2 X

----------------------------+12--- 1 erf k

2-------+= =

PX k X–12--- 1 erf

k– X –

2 X

--------------------------+12--- 1 erf k–

2-------+= =

PX k X– X k X+12--- 1 erf k

2-------+

12--- 1 erf k–

2-------+–=

PX k X– X k X+12--- erf k

2------- erf k–

2-------–=

Page 399: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 11 Common Probability Distributions and Tests

11-28 Mathematics for Business, Science, and Technology, Second Edition

Orchard Publications

Since the error function is an odd function, that is, , the above relation reducesto

(11.77)

The error function is tabulated in math tables such as Standard Mathematical Tables by CRC Pressand Handbook of Mathematical Functions by Dover Publications. It can also be computed with theMATLAB erf(1/sqrt(2)) function.

When , (11.77) yields

(11.78)

Likewise, when ,

(11.79)

and when ,

(11.80)

The values of (11.78), (11.79), and (11.80) are in agreement with the values shown on the nor-malized Gaussian distribution of Figure 11.11. In particular, we see that when , the proba-bility that a Gaussian rv lies between of its mean , is very close to unity.

The error and complementary error functions are also available in Excel. The syntax for the errorfunction is

=ERF(lower_limit,upper_limit)

where

lower_limit = lower bound for integrating the error function

upper_limit = upper bound for integrating the error function. If omitted, the integration isbetween zero and the lower limit.

Excel uses the formulas

(11.81)

and

e– rf u– erf u=

PX k X– X k X+ erf k2

-------=

k 1=

erf 12

------- erf 0.707 0.6827= =

k 2=

erf 22

------- erf 1.414 0.9545= =

k 3=

erf 32

------- erf 2.1213 0.9973= =

k 3=X 3 X

ERF z 2------- e t2–

0

zdt=

Page 400: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 11-29Orchard Publications

The Normal (Gaussian) Distribution

(11.82)

For example,

=ERF(0.75) returns 0.711

=ERF(0.5,1) returns 0.322

The syntax for the complementary error function in Excel is

=ERFC(x)

where

x = lower bound for integrating the error function, not the complementary error function.

Excel uses the formula

(11.83)

For example, =ERFC(0.25) returns 0.724

Example 11.14

A satellite communications system sends out two possible messages to a ground station; let thesebe represented by and volt signals. However, the transmitted messages are corrupted by addi-tive atmospheric noise. The ground receiver station has been designed so that any signal equal toor below volts, is interpreted as volts, while any signal above volts is interpreted as volts. From past experience, it is known that if a volt signal is transmitted, the received signal is

random whose Gaussian pdf has mean value and standard deviation .

Compute the probability that a volt transmitted message will be interpreted as volts messageby the ground receiver station.

Solution:

The Gaussian pdf is

The probability that the rv is equal to or less than volts is

ERF a b 2------- e t2–

a

bdt ERF b ERF a–= =

ERFC z 2------- e t2–

xdt 1 ERF x–= =

0 5

2.5 0 2.5 55

3= X 2=

5 0

fX x 12 X

-----------------e1

2 X2

---------- x –2

–=

X x

P X x fX x xd–

xfX x xd

0

fX x xd0

x+= =

Page 401: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 11 Common Probability Distributions and Tests

11-30 Mathematics for Business, Science, and Technology, Second Edition

Orchard Publications

or

(11.84)

and using (11.75), we express (11.84) as

(11.85)

Next, with , and , we get

Since , it follows that

Therefore, there is a probability of that the volt signals transmitted by the satellite, willbe misinterpreted by the ground receiver station.

A third useful function, which is related to the standard Gaussian cdf, is the functiondefined as

(11.86)

that is, the function gives the probability of the right tail of the normal distribution.

Recalling that

(11.87)

and comparing (11.86) with (11.87), we see that

(11.88)

It can also be shown that

(11.89)

P X x 12--- 1

2 X

------------------ e

12 X

2---------- x 1–

2–xd

0

x+=

P X x 12--- 1 erf x –

2 X

--------------+=

x 2.5= 3= X 2=

P X 2.5 12--- 1 erf 2.5 3–

2 2--------------------+

12--- 1 erf 0.5–

2----------+= =

erf x–– erf x=

P X 2.5 12--- 1 e– rf 0.5

2------- 1

2--- 1 0.2763– 0.3618= = =

36.18% 5

Q

Q 12

---------- e2 2– d=

Q

PZ z P Z z 12

---------- e u2 2– ud–

z= =

Q z 1 PZ z–=

Q 12--- 1 erf

2-------–=

Page 402: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 11-31Orchard Publications

The Normal (Gaussian) Distribution

The function is used in electronic communications theory to define error probabilitybounds.

The MATLAB code given below, tabulates several values of and the corresponding values of.

alpha=0: 0.25: 6; qalpha=zeros(33,2); qalpha(:,1)=alpha';

qalpha(:,2)=0.5 .* (1 erf(alpha ./ sqrt(2)))';

fprintf('alpha qalpha \n'); fprintf('%3.2f \t %E \n', qalpha');

alpha qalpha

0.00 5.000000E-001

0.25 4.012937E-001

0.50 3.085375E-001

0.75 2.266274E-001

1.00 1.586553E-001

1.25 1.056498E-001

1.50 6.680720E-002

1.75 4.005916E-002

2.00 2.275013E-002

2.25 1.222447E-002

2.50 6.209665E-003

2.75 2.979763E-003

3.00 1.349898E-003

3.25 5.770250E-004

3.50 2.326291E-004

3.75 8.841729E-005

4.00 3.167124E-005

4.25 1.068853E-005

4.50 3.397673E-006

4.75 1.017083E-006

Q

Q

Page 403: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 11 Common Probability Distributions and Tests

11-32 Mathematics for Business, Science, and Technology, Second Edition

Orchard Publications

5.00 2.866516E-007

5.25 7.604961E-008

5.50 1.898956E-008

5.75 4.462172E-009

6.00 11.865876E-010

Plots of and using Excel are shown in Figure 11.14 where, in Columns A, B, and C(not shown), we have listed the values of , , and respectively in increments of start-ing with in A4 and ending with in A604. For negative values and zero of the function (range A4:A304), we have used the formula ERF( A4) in B4 and copied it down toB5:B304. For positive values of the function (range A305:A604), we used the formula=ERF(A305) in B305 and copied down to B306:B604. For negative values and zero of the function (range A4:A304) we have used the formula =0.5*(1 B4/SQRT(2)) in C4 and copied itdown to C5:C304. For positive values of the function (range A305:A604), we have used theformula =0.5*(1 ERF(A305/SQRT(2))) in C305 and copied down to C306:C604.

Figure 11.14. The Error and the Q functions

11.6 PercentilesPercentiles split the data into parts. Let us consider the pdf of Figure 11.15. The area to theleft of point is ; we denote this area as a percentile . Typical percentile values are or

, or , ...... or , and or and these are denoted as , , ,, or respectively.

erf x Q xerf Q 0.01

1.50– +1.50 erf x

erf xQ x

Q x

The erf(x) and Q(x) Functions

-1.5

-1.0

-0.5

0.0

0.5

1.0

1.5

-3 -2 -1 0 1 2 3x

erf(x

), Q

(x)

erf(x)Q(x)

100xa a pa 0.05

5% 0.10 10% 0.95 95% 0.99 99% p0.05 p0.10

p0.95 p0.99

Page 404: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 11-33Orchard Publications

Percentiles

Figure 11.15. Sketch to illustrate the concept of percentile

For continuous functions, the percentile is defined as

(11.90)

Example 11.15

Compute , , and for the cdf of the exponential distribution of Figure 11.16 if.

Figure 11.16. Cdf for Example 11.15Solution:

From (11.90),

or

xa

Area a=

jth pj

pj P X xp p x xd–

xp p100---------= ==

p0.90 p0.95 p0.99

1 2=

1 e x––

x

PX x

pj P X xp p x xd–

xp1 e x–– 1 e 2x–– p

100---------= = = ==

Page 405: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 11 Common Probability Distributions and Tests

11-34 Mathematics for Business, Science, and Technology, Second Edition

Orchard Publications

Taking the natural log of both sides of the above expression, we get

or

Then,

For a pdf of the discrete type, we can get approximate values of percentiles, if we first arrange thesample in ascending order of magnitude; then, we compute the percentile , from the relation

(11.91)

where .

If in (11.91) turns out to be an integer, the percentile is the average of the observations inpositions and in the sampled data set starting at the bottom (lowest value) of the distribu-tion. If is not an integer, we select the next integer which is greater than .

Example 11.16

Given the test scores , find the score at the percentile.

Solution:

The first step is to arrange the sample in ascending order. This is done in Table 11.1.

TABLE 11.1 Table for Example 11.16

i position 1 2 3 4 5 6 7 8 9 10

Scores 79 80 82 85 85 86 87 90 92 95

e 2x– 1 p100---------–=

2x– 1 p100---------–ln=

x pj12--- 100 p–

100------------------ln–

12--- 100

100 p–------------------ln= = =

p0.9012--- 100

100 90–---------------------ln 2.3

2------- 1.15= = =

p0.9512--- 100

100 95–---------------------ln 3

2--- 1.50= = =

p0.9912--- 100

100 99–---------------------ln 4.6

2------- 2.3= = =

jth pj j 1 2 99=

i jn100---------=

n number of samples=

i jthi i 1+

i i

87 85 90 80 82 92 79 85 95 86 90th

Page 406: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 11-35Orchard Publications

Percentiles

Next, using (11.91), with and , we get

and since is an integer, we compute the percentile by taking the average of the valuesin the 9th and 10th position, that is,

(11.92)

Therefore, the score at the percentile is .

We can also use Excel’s PERCENTILE function which returns the percentile values in arange. The syntax is

=PERCENTILE(array,,j)

where

array = range of data that defines the relative standing

j = percentile value in the range .

For the above example,

=PERCENTILE({87,85,90,80,82,92,79,85,95,86},0.9) returns .

This differs somewhat from the value of which we found in (11.92). This is due to the factthat this formula of (11.91) is an approximation, and Excel also returns an approximation.

We observe that when using Excel’s PERCENTILE function, we need not arrange the sample inascending order of magnitude before we compute the percentile.

Example 11.17

The sampled data below, represent the averages for the same test given at different schools.

Find the average score at the percentile.

Solution:

The first step is to arrange the sample in ascending order. This is done in Table 11.2.

j 90= n 10=

i jn100--------- 90 10

100------------------ 9= = =

i 9= 90th

92 95+2

------------------ 93.5=

90th 93.5

jth

0 j 1

92.3

93.5

jth

10

87.3 85.8 90.7 80.2 82.4 92.6 71.1 85.9 95.1 86.7

95th

Page 407: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 11 Common Probability Distributions and Tests

11-36 Mathematics for Business, Science, and Technology, Second Edition

Orchard Publications

Next, using (11.91), with and , we get

and since is not an integer, we compute the percentile by taking the next integergreater than which is . From Table 11.2 we find that the average score at the percen-tile is .

With Excel =PERCENTILE({87.3,85.8,90.7,80.2,82.4,92.6,711.1,85.9,95.1,86.7},0.95) we getthe value .

11.7 The Student’s t-DistributionApproximately 95% of the area under the standard normal curve is between and

. This interval is called 95% confidence interval for the population mean . Here, theword population refers to a particular situation where our estimates are based on, and the wordsample implies a small selection from that population. For example, population may refer to agroup of students passing a certain examination, and a sample may be one or more students fromthis population.

When the sample size is less than 30, the Student’s -distribution* or simply -distribution is usedinstead of the standard normal distribution. The -distribution is actually a family of probabilitydistributions, and each separate -distribution is determined by a parameter called the degrees offreedom, which we will denote as df. If is the sample size for , then the degrees of freedomcan be computed from

(11.93)

The -distribution curves, like the standard normal distribution curve, are centered at zero. Thus,the mean is zero, that is,

(11.94)

TABLE 11.2 Table for Example 11.17

i position 1 2 3 4 5 6 7 8 9 10

Scores 71.1 80.2 82.4 85.8 85.9 86.7 87.3 90.7 92.6 95.1

* The name “student” has nothing to do with students. It is a pen name for William Gossett who published his work underthat name.

j 95= n 10=

i jn100--------- 95 10

100------------------ 9.5= = =

i 9.5= 95th9.5 10 95%

95.1

93.98

z 1.96–=

z +1.96=

t tt

tn n 30

df n 1–=

t

0=

Page 408: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 11-37Orchard Publications

The Student’s t-Distribution

The variance of each -distribution depends upon the value of df. It is found from

(11.95)

Figure 11.17 shows the -distribution for , , and where we observe that, forhigher values of df, this distribution approximates the normal distribution.

The pdf of the -distribution is given in terms of the (gamma) function. This function is dis-cussed in Appendix B. Thus, for the -distribution,

(11.96)

for

Figure 11.17. The Student’s t-distribution for different degrees of freedom

The MATLAB code to plot the pdf of the -distribution is listed below.

% MATLAB Program for Student's t-Distribution;

t=linspace(-4,4);

t

2 dfdf 2–--------------= df 3

t df 1= df 3= df 20=

tt

fX x

df 1+2

--------------

df df2-----

----------------------------------- 1 x2

df-----+

df 1+2

-------------------–

=

x +–

The Student's t- Distribution

0.0

0.1

0.2

0.3

0.4

-3 -2 -1 0 1 2 3

df=1

df=3 df=20

t

Page 409: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 11 Common Probability Distributions and Tests

11-38 Mathematics for Business, Science, and Technology, Second Edition

Orchard Publications

stud_t1=gamma((1+1)./2)./(sqrt(1.*pi).*gamma(1./2)).*(1+t.^2./1).^-((1+1)./2);

stud_t3=gamma((3+1)./2)./(sqrt(3.*pi).*gamma(3./2)).*(1+t.^2./3).^-((3+1)./2);

stud_t20=gamma((20+1)./2)./(sqrt(20.*pi).*gamma(20./2)).*(1+t.^2./20).^-((20+1)./2);

plot(t,stud_t1,'--',t,stud_t3,'-.',t,stud_t20,'-');

lx=[1.4,2.8]; ly=[.3,.3]; hold on;

plot(lx,ly,'--',lx,ly-0.05,'-.',lx,ly-0.10,'-');

text(2.9,0.30, 'df=1');

text(2.9,0.25, 'df=3');

text(2.9,0.20, 'df=20');

title('The Student''s t-Distribution with three different degrees of freedom');

Percentile values of the -distribution for different degrees of freedom are denoted as . Thesecan be found in math tables such as the CRC Standard Mathematical Tables. The tables give valuesof for the cdf

(11.97)

These tables give values for the number of degrees of freedom equal to and for and .

The t-distribution is symmetrical; therefore,

(11.98)

For instance,

In Figure 11.18, the shaded area represents the area from to . Therefore, the area to theright of is .

Figure 11.18. Percentile values for Student’s t-distribution.

t tp

x

PX x

df 1+2

--------------

df df2-----

---------------------------------- 1 x2

df-----+

df 1+2

-------------------–

xd–

x=

1 2 30 40 60 120PX x 0.60 0.75 0.90 0.95 0.975 0.99 0.995= 0.9995

t1 p– tp–=

t0.10 t0.90–=

p – tp

tp 1 tp–

t p

tp

Page 410: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 11-39Orchard Publications

The Student’s t-Distribution

We will illustrate the use of the -distribution with the following example.

Example 11.18

Use the percentile values for the -distribution with to find:

a. the area under the curve to the right of .

b. the area under the curve to the left of

c. the area under the curve between and .

Solution:

a. From a Student’s -distribution table we find that

Therefore, the area to the right of is

b. Since the -distribution is symmetrical,

Therefore, the area to the left of is the same as in part (a), that is,

c. Since the total area under the curve is unity, the area under the curve between and is

We will formally define the so-called one-tail test and two-tail test in Section 11.20. Briefly, wechoose the one-tail test if we are interested on some extreme values on one side of the mean, thatis, in one “tail” of the distribution. But if we are interested on some extreme values on both sidesof the mean, that is, both “tails” of the distribution, we choose a two-tail test.

Microsoft Excel has the build-in function TDIST which returns the probability associated with theStudent’s t-distribution. Its syntax is

=TDIST(x,degrees_freedom,tails)

where

x = the numeric value at which to evaluate the distribution.

degrees_freedom = an integer indicating the number of degrees of freedom.

tails = number of distribution tails to return. If tails = 1, TDIST returns the one-tail distribution.

t

tp t df 7=

tp 2.998=

tp 2.998–=

tp 2.998–= tp 2.998=

t

Area df 7=

left of tp 2.998=0.99=

tp 2.998= 1 0.99– 0.01=

t

Area df 7=

left of tp 2.998–=Area df 7=

right of tp 2.998=0.99= =

tp 2.998–= 1 0.99– 0.01=

tp 2.998–=

tp 2.998= 1 0.01– 0.01– 0.98=

Page 411: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 11 Common Probability Distributions and Tests

11-40 Mathematics for Business, Science, and Technology, Second Edition

Orchard Publications

If tails = 2, TDIST returns the two-tail distribution.

In Example 11.18, we were given and . Using Excel, for tails =1, we enterthe formula =TDIST(2.998,7,1) and Excel returns 0.01. For tails = 2, we enter the formula=TDIST(2.998,7,2) and Excel returns 0.02. These are the same answers we found earlier.

Example 11.19

For a -distribution with ,

a. find the value for which the area under the curve to the right of is 0.05.

b. find the value for which the area under the curve to the left of is 0.05.

c. using the results of (a) and (b), find the absolute value for which the area between and is 0.11.

Solution:

a. Since the -distribution is symmetrical,

and thus

From a t-distribution table,

b.

c. From (a) and (b),

is 0.05 and is also 0.05 yielding a

total area of 0.10. Then, the area between these values of is . Therefore, theabsolute value for which the area between and is 0.90 is .

Excel has the build-in function TINV which returns the inverse of the Student’s t-distribution. Itssyntax is

=TINV(probability,degrees_freedom)

where

tp x= 2.998= df 7=

t df 7=

tp tp

tp tp

tp tp–

+tp

tt1 p– tp–=

t0.05 right t0.95 left–=

tp df 7=

Area 0.05 to the right of tp=tp df 7=

Area 0.95 to the left of tp=1.895= =

tp df 7=

Area 0.05 to the left of tp=tp df 7=

0.95 to the right of tp 1.895–= =

Area left of tp 1.895–= Area right of tp +1.895=

tp 1 0.10– 0.90=

tp tp– +tp tp 1.895=

Page 412: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 11-41Orchard Publications

The Chi-Square Distribution

probability = probability associated with the two-tail t-distribution.

degrees_freedom = an integer indicating the number of degrees of freedom.

We can verify the answer for part (c) of Example 11.19 using Excel’s formula =TINV(0.10,7) andExcel returns 1.895. This is the same answer as that we found earlier.

11.8 The Chi-Square Distribution

The (chi-square) distribution, like the -distribution, is a family of probability distributions,and each separate distribution is determined by the degrees of freedom, which we will denote as .

The pdf of the distribution is given in terms of the (gamma) function which is discussed in

Appendix B. For the distribution,

(11.99)

Figure 11.19 shows the distribution for , , and .

Figure 11.19. The distribution for different degrees of freedom.

The MATLAB code to plot the pdf of the distribution is listed below.

2 tdf

2

2

fX x 12df 2 df 2---------------------------------x df 2 1– e x 2– x 0=

0 x 0=

2 df 5= df 10= df 15=

The 2 Distribution

0.000

0.025

0.050

0.075

0.100

0.125

0.150

0.175

0.200

0 5 10 15 20 25 30

df=5

df=10

df=15

2

2

Page 413: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 11 Common Probability Distributions and Tests

11-42 Mathematics for Business, Science, and Technology, Second Edition

Orchard Publications

x=linspace(0.5,30); chi_sq5=1./(2.^(5./2).*gamma(5./2)).*x.^((5./2) 1).*exp( x./2);

chi_sq10=1./(2.^(10./2).*gamma(10./2)).*x.^((10./2)-1).*exp( x./2);

chi_sq15=1./(2.^(15./2).*gamma(15./2)).*x.^((15./2) 1).*exp( x./2);

plot(x,chi_sq5,'--',x,chi_sq10,'-.',x,chi_sq15,'-');

lx=[10,15]; ly=[.14,.14]; hold on; plot(lx,ly,'--',lx,ly 0.01,'-.',lx,ly 0.02,'-');

text(16,0.14, 'df=5'); text(16,0.13, 'df=10'); text(16,0.12, 'df=15');

title('The Chi Square Distribution with 5, 10 and 15 degrees of freedom');

The mean of the distribution is(11.100)

and the variance is

(11.101)

Percentile values of the distribution for different degrees of freedom are denoted as and canbe found in math tables such as the CRC Standard Mathematical Tables. The tables give values of

for the cdf

(11.102)

These tables give values for the number of degrees of freedom equal to and for from up to

Example 11.20

Figure 11.20 shows an distribution with .

Figure 11.20. distribution for Example 11.20

2

df=

2 2df=2

p2

x

PX x 12df 2 df 2---------------------------------x df 2 1– e x 2– xd

x=

1 2 30 PX x

0.005 0.995

2 df 5=

21

22

df = 5

2

Page 414: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 11-43Orchard Publications

The Chi-Square Distribution

Find the values of and for which

a. the shaded area on the right of is equal to

b. the shaded area on the left of is equal to

c. the shaded area on the right of is equal to

d. the total of the shaded areas to the left of and to the right of is

Solution:

a. Referring to a table of the distribution, we first locate the row corresponding to .

Now, if the shaded area on the right of is to be equal to , the area to the left must be. Then, on the table, we move to the right until we reach the column headed

. There, we read and this is the value of that will result in the area of tothe right of it.

b. If the shaded area to the left of is to be equal to , the value of will represent the percentile. Then, in the table, again with , we move to the right until we reach the

column headed . There, we read and this is the value of that will result in thearea of to the left of it.

c. If the shaded area on the right of is to be equal to , the area to the left must be. Then, on the table, we move to the right until we reach the column headed

. We read and this is the value of that will result in the area of to the right.

d. Since this distribution is not symmetric, we can abritrarily decide on the area of one side andsubtract this area from to find the area of the other side. Let us decide on equal areas, that

is on the left and on the right. Therefore, if the area to the right of is to be

, the area to the left of it will be and thus represents the per-

centile. From tables, . Likewise, if the shaded area on the left is and this

represents the percentile and from tables . Therefore, this condition will

be satisfied if and .

12

22

22 0.05

12 0.10

22 0.01

12

22 0.05

2 df 5=

22 0.05

1 0.05– 0.95=

0.950 11.11 22 0.05

12 0.10 1

2

10th df 5=

0.100 1.61 12

0.10

22 0.01

1 0.01– 0.99=

0.990 15.1 22 0.01

0.05

0.025 0.025 22

0.025 1 0.025– 0.975= 22 97.5th

0.9752 12.8= 0.025

2.5th 0.0252 0.831=

12

0.9752 12.8= = 2

20.0252 0.831= =

Page 415: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 11 Common Probability Distributions and Tests

11-44 Mathematics for Business, Science, and Technology, Second Edition

Orchard Publications

We can use Excel’s CHIDIST and CHIINV functions to find values associated with the distribu-tion. The first has the syntax

=CHIDIST(x,degrees_freedom)

and returns the one-tail probability of this distribution.

For example,

=CHIDIST(12.8,5) returns 0.025.

The second returns the inverse of the distribution and has the syntax

=CHIINV(probability,degrees_freedom)

For example,

=CHIINV(0.025,5) returns 12.8. This is the same value as in part (d) of Example 11.20.

11.9 The F DistributionThe F distribution is another family of curves whose shape differs according to the degrees of free-dom. The pdf of the F distribution is

(11.103)

These curves differ not only according to the size of the samples, but also on how many samplesare being compared. The F distribution has two sets of degrees of freedom, (degrees of free-dom for the numerator) and (degrees of freedom for the denominator). The designation of anF distribution with 10 degrees of freedom for the numerator, and 15 degrees of freedom for thedenominator is .

Figure 11.21 shows two F distributions, one with , and the other with .

The mean of the F distribution is given by

(11.104)

Thus, for the F distribution with ,

2

fX x

df1 df2+

2---------------------

df12

-------df22

-----------------------------------------df1

df12

-------df2

df22

-------x

df12

------- 1–df2 df1x+

df1 df2+

2--------------------------–

x 0=

0 x 0=

df1

df2

df df1 df2 10 15= =

df 8 40 df 8 4

df2df2 2–---------------- df2 3=

df 8 40

df 8 40df2

df2 2–---------------- 40

40 2–--------------- 1.053= = =

Page 416: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 11-45Orchard Publications

The F Distribution

Figure 11.21. The F distribution for different degrees of freedom.

and for the other with ,

The variance of the F distribution is given by

(11.105)

Percentile values of the F distribution for different degrees of freedom are denoted as and canbe found in math tables such as the CRC Standard Mathematical Tables. The tables give values of

for the cdf

(11.106)

The F distribution tables are based on the and degrees of freedom and provide values cor-responding to

The F Distribution

0

1

2

3

4

5

6

0 1 2 3 4 5 6

df=(8,40)

df=(8,4)In the expression df(i,j), theindex i is the df of thethe numerator, and j is the df of the denominator.

df 8 4

df 8 4df2

df2 2–---------------- 4

4 2–------------ 2= = =

2 2df2 df1 df2 2–+

df1 df2 2– 2 df2 4–-----------------------------------------------------= df2 5

Fp

x

PX x

df1 df2+

2---------------------

df12

-------df22

-----------------------------------------df1

df12

-------df2

df22

-------x

df12

------- 1–df2 df1x+

df1 df2+

2--------------------------–

xd0

x=

df1 df2

PX x 0.90 0.95 0.975 0.99 0.995 and 0.999=

Page 417: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 11 Common Probability Distributions and Tests

11-46 Mathematics for Business, Science, and Technology, Second Edition

Orchard Publications

Lower percentile values for the F distribution can be found from the relation

(11.107)

For example,

Excel provides the functions FDIST and FINV to find values associated with the F distribution.

The first has the syntax

=FDIST(x,degrees_freedom1,degrees_freedom2)

and returns the probability of this distribution.

For example,

=FDIST(0.164,4,7) returns 0.95.

The second returns the inverse of the distribution and has the syntax

=FINV(probability,degrees_freedom1,degrees_freedom2)

Thus, for the above example, =FINV(0.95,4,7) returns 0.164.

The F distribution is used extensively in the Analysis of Variance (ANOVA) which compares themeans of several populations. ANOVA is discussed in Chapter 13.

11.10 Chebyshev’s Inequality

Let be an rv (continuous or discrete) with mean and variance . Chebyshev’s inequalitystates that

(11.108)

That is, the probability of differing from its mean by more than some positive number , is less

than or equal to the ratio of the variance to the square of the number . This inequality isoften expressed as

(11.109)

where and .

If, in (11.109), we let , we get

F1 p df1 df2–1

Fp df2 df1

---------------------=

F0.05 4 71

F0.95 7 4-------------------- 1

6.09---------- 0.164= = =

X 2

P X –2

2------

X2

P X – k 1k2-----

k= k 1

k 2=

Page 418: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 11-47Orchard Publications

Law of Large Numbers

and this implies that the probability of differing from its mean by more than two standard devi-ations, is less than or equal to . That is, the probability that will lie within two standarddeviations of its mean is greater or equal to since

Likewise, if ,

or

that is, at least or of the data will fall between and .

11.11 Law of Large NumbersLet

be mutually independent random variables each having mean and variance .

If

then,

(11.110)

and since is the arithmetic mean of , the law of large numbers states that theprobability of the arithmetic mean differing from its expected value by more than thevalue of approaches zero as .

11.12 The Poisson DistributionThe Poisson distribution is a pdf of the discrete type, and it is defined as

(11.111)

P X – 2 122----- 1

4--- 0.25= =

X0.25 X

0.75

P X – 2 1 0.25– 0.75=

k 3=

P X – 3 132----- 1

9---=

P X – 3 1 19---– 8

9---=

8 9 89% 3– 3+

X1 X2 Xn2

Sn X1 X2 Xn+ + +=

PSnn----- –

nlim 0=

Sn n X1 X2 Xn

Sn n

e n

f x P X x= p x;xe–

x!-------------= = =

Page 419: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 11 Common Probability Distributions and Tests

11-48 Mathematics for Business, Science, and Technology, Second Edition

Orchard Publications

for where is a given positive number.

This distribution appears in many natural phenomena such as the number of telephone calls perminute received by a receptionist, the number of customers walking into a bank at some particulartime, the number of errors per page in a book with many pages, the number of particles emittedby a radioactive substance, etc.

Besides the applications mentioned above, the Poisson distribution provides us with a closeapproximation of the binomial distribution for small values of provided that the probability ofsuccess is small so that the probability of failure , that is, and

(11.112)where .

Note: An event in which is called a rare event.

Figure 11.22 shows the graph of a Poisson distribution with .

Figure 11.22. Poisson pdf with

To understand the meaning of the distribution of Figure 11.22, consider the case where customersarrive at a bank at the rate of two customers per minute on the average. The graph shows that theprobability that three customers will arrive in one minute is approximately or , theprobability that four customers will arrive in one minute is approximately and so on. In otherwords, the probability of having events occurring at a given time follows a Poisson distribution.

Example 11.21

Prove that

(11.113)

x 0 1 2=

xp q q 1 p–= 1

np=

n number of trials=

q 1 p–= 1

2=

x

p x;

0 1 2 3 4 5 6 7

0.135

0.270 0.270

0.180

0.90

0.360.12 0.03

2=

0.180 18%9%

x

p x;x 0=

1=

Page 420: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 11-49Orchard Publications

The Poisson Distribution

that is, prove that the Poisson distribution is a probability distribution.

Proof:

We recall that

(11.114)

Then,

(11.115)

From (11.111) and (11.115)

(11.116)

Example 11.22

Let be an rv with Poisson distribution . Prove that:

a.

b.

Proof:

a. By definition

and

(11.117)

The presence of on the right side of (11.117) makes the entire term vanish for . There-fore, we make the substitution

(11.118)

The summation now is from to . We factor out from (11.117) so that we willhave the term present in both the numerator and denominator. With these changes,(11.117) becomes

ey 1 y y2

2!----- y3

3!-----+ + + +=

ex

x!-----

x 0=

=

p x;x 0=

xe–

x!-------------

x 0=

e–x

x!-----

x 0=

e– e 1= = = =

X p x;

E x = =

Var x 2= =

p x;xe–

x!-------------=

E x xp x;

x 0=

xxe–

x!-------------

x 0=

= = =

x x 0=

xx!---- 1

x 1– !------------------=

x 1= xx 1–

Page 421: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 11 Common Probability Distributions and Tests

11-50 Mathematics for Business, Science, and Technology, Second Edition

Orchard Publications

(11.119)

Next, we make the substitution (11.120)

and we observe that as goes from to , goes from to . Then,

(11.121)

This summation is unity as we found in (11.116). Therefore, for the Poisson distribution,

(11.122)b. From (10.46),

(11.123)

The mean-square value is

(11.124)

Again, we let . Since as goes from to , goes from to . Then,

(11.125)

where in , was obtained from (11.121), and unity from (11.116). Therefore,

(11.126)

Example 11.23

A proofreader found that there are errors distributed randomly in a document consisting of pages. Find the probability that any page contains

a. exactly two errors

b. two or more errors

x 1– e–

x 1– !--------------------

x 1=

=

u x 1–=

x 1 u 0

ue–

u!-------------

u 0=

=

=

Var x E x2 2–=

E x2

E x2 x2p x;x 0=

x2xe–

x!-------------

x 0=

xx 1– e–

x 1– !--------------------

x 1=

= = =

u x 1–= x 1 u 0

E x2 u 1+ue–

u!-------------

u 0=

u 1+ p u;u 0=

= =

uue–

u!-------------

u 0=

ue–

u!-------------

u 0=

+ 1+==

1+

Var x E x2 2– 1+ 2–= = =

300500

Page 422: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 11-51Orchard Publications

The Poisson Distribution

Solution:

Let us represent the number of errors in any page as the number of successes in a sequence ofBernoulli trials (binomial distribution). Since there are errors, we let . There are pages and thus the probability that exactly one error appears on any page is . Since issmall, we will use the Poisson distribution approximation to the binomial distribution, that is,(11.112). Thus,

(11.127)Then,

a. For exactly two errors in any page, and from (11.111)

that is, the probability for exactly two errors in any page is approximately .

b. The probability that any page will contain two or more errors can be found from the relation

where

and

Then,

that is, the probability that any page will contain two or more errors is approximately .

We can also use Excel’s POISSON function whose syntax is

=POISSON(x,mean,cumulative)

where

x = the number of events

mean = expected numeric value

cumulative = exponential function. If TRUE, the cdf is returned, and if FALSE, the pdf isreturned.

For example,

p300 n 300= 500

p 1 500= p

np 300 1500--------- 0.6= = =

x 2=

p p x; 2;0.6 0.6 2e 0.6–

2!------------------------- 0.1= = =

10%

p two or more errors 1 p zero or one error–=

p zero errors 0.6 0e 0.6–

0!------------------------- 0.549= =

p one error 0.6 1e 0.6–

1!------------------------- 0.329= =

p two or more errors 1 0.549 0.329+– 0.122= =

12.2%

Page 423: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 11 Common Probability Distributions and Tests

11-52 Mathematics for Business, Science, and Technology, Second Edition

Orchard Publications

=POISSON(0.6,2,TRUE) returns 0.135 and this is approximately equal to the value we found in(a) of Example 11.23.

Example 11.24

An electronics company manufactures memory chips and from past data, it is estimated that are defective. If a sample of 150 chips is selected, what is the probability that there will be two orless defective chips?

Solution:

Here , , and . Since is small, we can use (11.112). Then, the meannumber of defectives in a sample of is

Using Excel,

=POISSON(2,1.5,TRUE) we get 0.8088.

This means that the probability that we will find two or less defective chips in a sample of isabout .

11.13 The Multinomial DistributionThe multinomial distribution is a generalization of the binomial distribution and states that in repeated trials, the probability that event occurs times, event occurs times and so onuntil occurs times, where

(11.128)

is obtained by

(11.129)

We observe that for , (11.129) reduces to the binomial distribution of (11.12).

The multinomial rv is the random vector * (11.130)

where is the number of times that outcome occurs.

For the multinomial distribution

* The exponent T means that the vector is transposed, that is, is a column vector, not a row vector as in matrices.

1%

x 2= n 150= p 0.01= p150

= np= 150 0.01 1.5= =

15080.9%

nA1 k1 A2 k2

Am km

k1 k2 km+ + + n=

p n!k1!k2! km!-----------------------------p1

k1p2k2 pm

km=

m 2=

X X1 X2 XnT=

X

Xi i

Page 424: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 11-53Orchard Publications

The Hypergeometric Distribution

(11.131)

(11.132)

Example 11.25

A fair die is tossed eight times. Compute the probability that the faces and will appear twice,and all other faces only once.

Solution:

Here, , represent the events that and will appeartwice, and represent the events that all other faces will appear only once,and states that each face has equal probability of occur-rence. Then, using (11.129) we get

that is, the probability that the faces and will appear twice, and all other faces only once isonly .

11.14 The Hypergeometric DistributionLet represent the items selected from a sample of items in which items are successes and

are failures. If the rv is equal to the number of successes in the selected items, issaid to be a hypergeometric rv.

The hypergeometric distribution states that

(11.133)

For the hypergeometric distribution, the mean and variance are

(11.134)

(11.135)

To illustrate this distribution with an example, consider a box that contains B blue balls and R red

Mean of Xi npi=

Variance of Xi i2 npi 1 pi–= =

5 6

n number of trials 8= = k5 k6 2= = 5 6

k1 k2 k3 k4 1= = = =

p1 p2 p3 p4 p5 p6 1 6= = = = = =

p 8!2!2!1!1!1!1!------------------------------- 1

6---

2 16---

2 16--- 1

6--- 1

6--- 1

6--- 35

5832------------== 0.006 or 0.6%=

5 60.6%

n N kN k– X n X

P X x=

kx

N k–

n x–Nn

--------------------------------

k!x! k x– !----------------------- N k– !

n x– ! N k– n– x+------------------------------------------------------

N!n! N n– !-------------------------

----------------------------------------------------------------------------------= =

2

n kN----=

2 N n–N 1–------------- n k

N---- 1 k

N----–=

Page 425: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 11 Common Probability Distributions and Tests

11-54 Mathematics for Business, Science, and Technology, Second Edition

Orchard Publications

balls. Assume that we perform trials in an experiment in which a ball is drawn at random, itscolor is observed and noted, and the ball is placed back in the box. This type of experiment isreferred to as sampling with replacement. If the rv represents the number of B balls chosen (con-sidered as successes) in n trials, then, from the binomial distribution we see that the probability ofexactly successes is

(11.136)

where we have used the facts that

and

Now, if we modify (11.136) so that the sampling is without replacement, we obtain (11.133).

Example 11.26

A statistics and probability class consists of students of whom are foreign students. Supposethat students of this class are randomly selected to meet with the dean of mathematics. Com-pute the probability that at most one of these students will be foreign.

Solution:The condition that at most one will be satisfied when no foreign student or only one student meetswith the dean. Here, is a hypergeometric rv with , , , and

. For this example, the probability distribution of is

n

X

x

P X x=nx--- BxRn x–

B R+ n--------------------=

p BB R+

------------------=

q 1 p– RB R+

------------------= =

25 53

3

X N 25= k 5= N k– 25 5– 20= =

n 3= X

P X 0=

50

203

253

------------------------

5!5 0– !0!

------------------------ 20!20 3– !3!

---------------------------

25!25 3– !3!

----------------------------------------------------------------------------------- 1 6840

13800--------------------- 0.496= = = =

P X 1=

51

202

253

------------------------

5!5 1– !1!

------------------------ 20!20 2– !2!

---------------------------

138003!

----------------------------------------------------------------------- 5 190

2300------------------ 0.413= = = =

P X 2=

52

201

253

------------------------

5!5 2– !2!

------------------------ 20!20 1– !1!

---------------------------

138003!

----------------------------------------------------------------------- 10 20

2300------------------ 0.087= = = =

Page 426: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 11-55Orchard Publications

The Hypergeometric Distribution

Figure 11.23 shows the plot of the probability distribution of the rv for this example.

Therefore, the probability that at most one foreign student will meet with the dean is

We can use Excel’s HYPGEOMDIST function whose syntax is

=HYPGEOMDIST(sample_s,number_sample,population_s,number_population)

where:

sample_s = number of successes in the sample

Figure 11.23. Probability distribution of the rv X for Example 11.26

number_sample = the size of the sample

population_s = number of successes in the population

number_population = population size

For Example 11.26, success is the condition that at most one will be satisfied, when no foreign stu-dent or only one student meets with the dean. Then,

=HYPGEOMDIST(0,3,5,25) returns 0.496 and

=HYPGEOMDIST(1,3,5,25) returns 0.413.

Therefore, the probability that at most one foreign student will meet with the dean is and this is the same result as before.

P X 3=

53

200

253

------------------------

5!5 3– !3!

------------------------ 20!20 0– !0!

---------------------------

138003!

----------------------------------------------------------------------- 60

13800--------------- 0.004= = = =

X

p 0.496 0.413+ 0.909 90.9%= = =

x0 1 2 3 4 5 6 7

0.496

0.413

0.087

0.004

0.496 0.413+ 0.909=

Page 427: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 11 Common Probability Distributions and Tests

11-56 Mathematics for Business, Science, and Technology, Second Edition

Orchard Publications

Note: The binomial distribution becomes an approximation to the hypergeometric distributionwhen .

Example 11.27

A box contains computer chips and it is known that of these are defective. Compute theprobability of finding one defective in a sample of randomly selected chips by using:

a. the hypergeometric distribution

b. the binomial distribution, if applicable for this example

Solution:

a. Using (11.133) with , and , we have

(11.137)

b. Let the probability of selecting a defective chip be denoted as p (success); then, the probabilityof failure is . To find out if the binomial distribution is applicable, we examine thecondition

Since this number is greater than , we can apply the binomial distribution. Then,

(11.138)

We observe that (11.137) and (11.138) are in close agreement.

11.15 The Bivariate Normal DistributionThe bivariate normal distribution is a generalization of the normal distribution. It applies to twocontinuous rv and given by the joint density function

(11.139)

where , , , are the means and standard deviations of the and respectively, and

n 0.05N

200 75

n 5= N 200= k 7=

P X 1=

71

1934

2005

----------------------------

7!1! 7 6– !------------------------ 193 !

5 1– ! 193 4–------------------------------------------

200!5! 200 5– !------------------------------

----------------------------------------------------------------------- 7 560317602.5357 109--------------------------------- 0.155= = ==

q 1 p–=

n 0.05N 0.05 200 10= =

n 5=

P X 1=nx

pxqn x– n!n x– !x!

----------------------- 5!4!1!---------- 7

200---------

11 7

200---------–

40.152= = = =

X Y

f x y 1

2 1 2 1 2–--------------------------------------e

x 1–

1--------------

22

x 1–

1--------------

y 2–

2--------------

y 2–

2--------------

2+–

2 1 2–

---------------------------------------------------------------------------------------------------------------–

=

1 2 1 2 X Y

Page 428: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 11-57Orchard Publications

The Rayleigh Distribution

is the correlation coefficient* between and . This distribution is also referred to as the two-dimensional normal distribution.

If the correlation coefficient , (11.139) reduces to a product of two factors that is a functionof and alone for all values of and and therefore, and are independent.

11.16 The Rayleigh DistributionThis distribution is a special case of the bivariate normal distribution where the means are zero,the standard deviations are equal, and and are uncorrelated, that is, ,

, and . In this case, (11.139) reduces to

(11.140)

This expression is known as the circular case of the bivariate normal distribution and the distance to

the origin of the and is denoted as where .

The Rayleigh distribution is defined as

(11.141)

where , and is the variance of the variables and in (11.140).

The Rayleigh pdf is shown in Figure 11.24 for , , and .

Figure 11.24. Pdf of the Rayleigh distribution

* We will discuss the correlation coefficient in the next chapter.

X Y

0=

x y x y X Y

X Y 1 2 0= =

1 2= = 0=

f x y 12 2-------------e x2 y2

+ 2 2–=

x y r r x2 y2+=

fr r r2

------e r2 2 2– for r 0=

r x2 y2+= 2 x y

1= 2= 3=

0

0.2

0.4

0.6

0.8

0 1 2 3 4 5 6 7 8r

f(r)

=1

=2

=3

Page 429: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 11 Common Probability Distributions and Tests

11-58 Mathematics for Business, Science, and Technology, Second Edition

Orchard Publications

This distribution is used with the scattering of electromagnetic radiation by particles that havedimensions much smaller than the wavelength of the radiation, resulting in angular separation ofcolors, and responsible for the reddish color of sunset and the blue of the sky.

The Rayleigh distribution is characterized by the following constants, all normalized to the param-eter .

1. Most probable value is . That is, for , the distribution has its maximum value at ,for at and so on, as shown in Figure 11.24.

2. The mean , also known as mean radial error, or expected value is

(11.142)

3. The cumulative distribution point is . This is the point where, on the average, of the time the function is above this value, and of the time below it. It is found

from

(11.143)

4. The second moment is

(11.144)

5. The variance is

(11.145)

Example 11.28

Use the Rayleigh distribution to compute the probability that:

a. a transmitted signal will fade below the most probable value of

b. a received signal will exceed some arbitrary value

Solution:

a. Integrating (11.141), we get

1= x 1=

2= x 2=

E r

E= r2---=

50% r 1.18=

50% 50%

fr r rdr

e

r2

2 2---------–

0.5= =

E r2 2 2=

Var r

Var r 2 2 2–=

k

fr r rd0

re

r2

2 2---------–

2---------------d

0r 1

2------ re

r2

2 2---------–

d0

r= =

Page 430: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 11-59Orchard Publications

Other Probability Distributions

and from tables of integrals (or integration by parts)

Then,

This indicates that there is a probability of that the transmitted signal will be below themost probable value of .

b. The probability that a received signal will exceed some arbitrary value is

(11.146)

11.17 Other Probability DistributionsThere are many other probability distributions used with different applications. The gamma andbeta distributions are discussed in Appendix B; for a few of the others, we briefly present theirbasic properties.

1.The Cauchy distribution has the pdf

(11.147)

This distribution is symmetrical about and thus its mean is zero. However, the varianceand higher moments do not exist.

2. The geometric distribution has the pdf

(11.148)

with mean(11.149)

and variance

(11.150)

3. The negative binomial distribution or Pascal distribution has the pdf

xe x2– xd 1

2---– e x2

– C+=

12

------ re

r2

2 2---------–

d0

r 12

------ 12---2 2e

r2

2 2---------–

0

e

r2

2 2---------–

– 0 1 e 1 2–– 0.394= = = =

39.4%

k

fr r rdk

re

r2

2 2---------–

2---------------d

kr 1

2------ re

r2

2 2---------–

dk

r e

r2

2 2---------–

– k e k2 2–= = = =

fX x ax2 a2+

------------------------- a 0 x–=

x 0=

fX x pqx 1– x 1 2= =

1 p=

2 q p2=

Page 431: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 11 Common Probability Distributions and Tests

11-60 Mathematics for Business, Science, and Technology, Second Edition

Orchard Publications

(11.151)

with mean(11.152)

and variance

(11.153)

We observe that for the negative binomial distribution of (11.151) reduces to the geo-metric distribution given by (11.148).

The negative binomial distribution is similar to the binomial distribution, except that the num-ber of successes is fixed and the number of trials is variable. For example, suppose that we needto find students with GPA or higher, and we know that the probability that a studenthas this qualification is . This distribution calculates the probability that we must searchfor students, say , before we find students with GPA or higher.

We can use Excel’s NEGBINOMDIST function to compute the probability that there will be anumber of failures before we find a number of successes given a constant probability of suc-cess. The syntax for this function is

=NEGBINOMDIST(number_f,number_s,probability_s)

where

number_f = number of failures

number_s = number of successes

probability_s = known probability of success.

Therefore, if we want to find the probability that we must search unqualified before we find qualified students, and we know that the probability is , the function

=NEGBINOMDIST(30,10,0.25) returns 0.036011.

This means that the probability that we will find unqualified students before we find qualified is .

4. The Weibull distribution has the pdf

(11.154)

with mean

fX xx 1–

r 1–pqx r– x r r 1+= =

r p=

2 rq p2=

r 1=

10 3.00.25

x 30 10 3.0

f s

3010 0.25

30 103.601%

fX x x 1– e x– x 00 x 0

=

Page 432: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 11-61Orchard Publications

Other Probability Distributions

(11.155)

and variance

(11.156)

The Weibull distribution is used by reliability engineers to determine probabilities such as themean time to failure for a particular device.

We can use Excel’s WEIBULL function for the Weibull distribution. The syntax for this func-tion is

=WEIBULL(x,alpha,beta,cumulative)

where

x = the value at which to evaluate the distribution

alpha = value of the parameter as it appears in (11.154)

beta = value of the parameter as it appears in (11.154)

cumulative = true if the cdf is desired, or cumulative = false if the pdf is desired.

For example, if , , and cumulative = true, then

=WEIBULL(100,10,95,TRUE) returns ,

and if cumulative = false, then

=WEIBULL(100,10,95,FALSE) returns .

5. The Maxwell distribution has the pdf

(11.157)

with mean

(11.158)

and variance

(11.159)

6. The lognormal distribution has the pdf

1– 1 1---+=

2 2– 1 2---+ 2 1 1---+–=

x 100= 10= 95=

0.811787

0.031435

fX x2---a3 2x2e ax2 2– x 0

0 x 0=

2 2a

------=

2 1a--- 3 8---–=

Page 433: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 11 Common Probability Distributions and Tests

11-62 Mathematics for Business, Science, and Technology, Second Edition

Orchard Publications

(11.160)

with mean

(11.161)and variance

(11.162)

This distribution is used to analyze data that have been logarithmically transformed.

Excel provides the LOGNORMDIST and LOGINV functions. The first, computes the cumula-tive lognormal distribution of x where is normally distributed with parameters the meanand standard deviation. The second, computes the inverse of the lognormal cumulative distri-bution. Thus, if , then .

Excel uses the following expression for the lognormal cumulative distribution.

(11.163)

The syntax for LOGNORMDIST is

=LOGNORMDIST(x,mean,standard_dev)

where

x = the value at which we want to evaluate the distribution

mean = the mean of

standard_dev = the standard deviation of

For example,

=LOGNORMDIST(3,4.5,1.6) returns 0.0168

The syntax for LOGINV is

=LOGINV(probability,mean,standard_dev)

where

probability = the probability associated with the lognormal distribution

mean = the mean of

standard_dev = the standard deviation of

fX x 12 x

-----------------e1

2 2--------- x –

2ln–= x 0 0

e2

+2

---------------=

2 e2 2+ e

2

1–=

xln

p LOGNORMDIST x,= x LOGINV p,=

LOGNORMDIST x NORMDIST x –ln-----------------=

xln

xln

xln

xln

Page 434: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 11-63Orchard Publications

Sampling Distribution of Means

For example,

=LOGINV(0.0168,4.5,1.6) returns

7. Excel provides also the CRITBINOM function and this returns the smallest value for which thebinomial distribution is greater than, or equal to a criterion value (alpha) where .This distribution is used in quality assurance applications. For example, it can be used to deter-mine the largest number of defective parts that are allowed to go through the assembly linewithout rejecting the entire lot. Its syntax is

=CRITBINOM(trials,probability_s,alpha)

where:

trials = number of Bernoulli trials

probability_s = probability of success on each trial

alpha = criterion value

Example 11.29

Consider a plant that manufactures automobile carburetors. These are manufactured in lots of and there is probability that each carburetor is free of defects. In a lot of , what is

the number of carburetors that we can say with confidence are free of defects?

Solution:

For this example,

trials = 100

probability_s = 0.9

alpha =

Then,

=CRITBINOM(100,0.9,0.05) returns .

Therefore, in a lot , the number of carburetors that we can say with confidence are freefrom defects is .

11.18 Sampling Distribution of MeansSuppose we take a large number of random samples from the same population. Each of thesemany samples will have its own sample statistic called the sampling distribution for the sampledmean, or simply the sampled mean which is denoted as . It is shown in probability theory text-

3.005

0 1

100 90% 10095%

1 0.95– 0.05=

85

100 95%85

x

Page 435: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 11 Common Probability Distributions and Tests

11-64 Mathematics for Business, Science, and Technology, Second Edition

Orchard Publications

books that:

1. If we take a large number of samples, the sampled mean will approach the population mean. That is,

(11.164)

2. If the population is very large, or the sampling is with replacement, the standard error of thesampling distribution of means, denoted as is given by

(11.165)

where is the standard deviation of the population, and is the size of a sample.

3. If the population is of size , the sampling is without replacement, and the sample size is, then,

(11.166)

4. If the population from which samples are taken, has a probability distribution with mean ,

variance , and is not necessarily a normal distribution, then the standardized variable associated with the sampled-mean is given by

(11.167)

5. If is very large, becomes asymptotically normal, that is,

(11.168)

11.19 Z -ScoreA score represents the number of standard deviations that a value , obtained from a givenobservation, is above or below the mean. For the entire population, it is defined as

(11.169)

Example 11.30

The mean salary for engineers employed in the San Francisco Bay Area is per year andthe standard deviation is . The mean salary for engineers employed in the Austin, Texasarea is per year and the standard deviation is . An engineer who makes

x

x =

x

xn

-------=

n

Nn N

x2

2

n------ N n–

N 1–-------------=

2 zx

z x –

n-------------- x –

x------------= =

n z

P Z znlim normal distribution

z x

z x –------------=

$85 000$14 000

$65 000 $8 000 $90 000

Page 436: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 11-65Orchard Publications

Tests of Hypotheses and Levels of Significance

per year in the San Francisco Bay Area is offered a job in Austin, Texas for per year.Assuming that the overall cost of living in both locations is relative to the mean salaries, shouldthis engineer accept the job in Austin if salary is his only consideration?

Solution:

For the engineer who makes per year in the San Francisco Bay Area, the score is

If he moves to Austin, his score will be

Since , we conclude the salary in Austin, Texas is higher relative to the salary in the San Francisco Bay Area.

11.20 Tests of Hypotheses and Levels of SignificanceThis is a lengthy topic in probability theory and thus, it will not be discussed here in detail. Wewill define some of the important terminology with examples.

Suppose that the mean sales of a mail order company selling computer parts for the past year was, and the standard deviation was . This company wishes to determine whether the mean

sales per order for the current year, will be the same or different from the past year. Thus, if rep-resents the mean sales per order for the current year, the company is interested in determiningwhether for the current year or . If the company decides that the currentyear’s mean sales order will be the same as in last year, that is, if , we call this the nullhypothesis. On the other hand, if the company wishes to conduct a research to determine if

, this is called the research hypothesis or alternative hypothesis.

In general, if represents the null hypothesis, the test to determine thealternate hypothesis for is called a one-tail left test or a lower-tail test. Forexample, if an automobile tire manufacturer claims that the mean mileage for the top-of-the-linetire is , and a consumer group doubts the claim and decides to test for

, this is a one left tail test.

The test to determine the alternate hypothesis for is called a one-tail righttest or an upper-tail test. For example, a sports league may advertise that the average cost for a fam-ily of four to attend a soccer game is $100 including parking tickets, snacks and soft drinks, but asports fan thinks that this average is low, and decides to conduct a research hypothesis for

. This is a one right-tail test.

$78 000

$90 000 z

z1x1 1–

1---------------- 90 000 85 000–

14 000------------------------------------------ 0.357= = =

z

z2x2 2–

2---------------- 78 000 65 000–

8 000------------------------------------------ 1.625= = =

z2 z1 $78 000 $90 000

$125 $30

$125= $125$125=

$125

some known value=

some known value

75 000 miles=

75 000 miles

some known value

$100

Page 437: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 11 Common Probability Distributions and Tests

11-66 Mathematics for Business, Science, and Technology, Second Edition

Orchard Publications

If the research hypothesis is for the condition , regardless whether or , this test is referred to as a two-tail test. For

example, if the computer company conducts a research test for both and , wecall this a two-tail test.

A test statistic, denoted as , is a statistical measure that is used to decide whether to accept orreject the null hypothesis. If the null hypothesis is true, then by the central limit theorem*

on the average. If we take a sample of 100 orders for the current year, and weassume that the standard deviation remains constant, that is, , the standard error, asdefined in (11.165), is

If the value of the test statistic is close† to , we would not reject the null hypothesis,but if is considerably different than , we would reject the null hypothesis.

The decision we must now make, is by how much should differ from in order toreject the null hypothesis. Suppose that we decide to reject the null hypothesis if differs from

by two or more standard errors, that is, . Therefore, if or if, we should reject the null hypothesis. The values and are referred

to as the critical values.

Example 11.31

An automobile tire manufacturer claims that the mean mileage for one of the best tires is, and the standard deviation is . Suppose that the sampled

mean is normally distributed, and the critical value is chosen as two standard errors below 70,000miles. If 100 tires are road tested, and it is found that the mean mileage of the tested tires is

, should we accept or reject the manufacturer’s claim?

Solution:

Obviously, this is a one-tail (left) test. For this example, the null hypothesis is and the research hypothesis is . From (11.165), the standard error is

* This theorem states that in any sequence of n repeated trials ( ), the standardized sampled mean approaches the stan-dard normal curve as n increases.

† Of course, we have to decide on how close this value should be.

some known valuesome known value some known value

$125 $125

x

n 30

x $125= =

$30=

xn

------- $30100

------------- $3= = =

x $125=

x

x $125=

x$125= 2 x 2 $3 $6= = x $119

x $131 x1 $119= x2 $131=

70 000 miles= 8 000 miles=

x 62 000=

70 000 miles=

70 000 miles

xn

------- 8 000100

--------------- 800 miles= = =

Page 438: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 11-67Orchard Publications

Tests of Hypotheses and Levels of Significance

T h e v a l u e o f t w o s t a n d a r d e r r o r s i s e q u a l t o b e l o w or . Since the mean mileage of the tested tires

was given as , the tire manufacturer’s claim should be rejected.

Example 11.32

A sports league advertises that the average cost for a family of four to attend a soccer game, is including admission, parking, snacks and soft drinks. The standard deviation is

. Suppose that the critical value is chosen as three standard errors above , andthe mean cost in a sample of 100 families of four, was found to be . Should we accept orreject the advertising claim of this sports league?

Solution:

For this example, the null hypothesis is and the research hypothesis is . Thestandard error is

The value of three standard errors is equal to above or. Since the mean cost of the 100 families of four is given as , the

claim of this sports league should be rejected.

If a hypothesis is rejected when it should be accepted, we say that a Type I error has occurred. If ahypothesis is accepted when it should be rejected, we say that a Type II error has occurred.

The probabilities of Type I and Type II errors are denoted as follows:

In other words,

The probability is referred to as the level of significance.

Typically, we use a level of significance of or . For example, if we choose a0.05 or 5% level of significance when deciding on a test of hypothesis, this means that there areabout 5 chances in 100 that we would reject the hypothesis when it should be accepted. In otherwords, we are about 95% confident that we have made the right decision.

For the mail-order computer company, the level of significance can be expressed as

2 x 2 800 1 600 miles= =

70 000 miles= 70 000 1 600– 68 400 miles=

x 62 000 miles=

$100=

$20= $100=

x $112=

$100= $100

xn

------- $20100

------------- $2= = =

3 x 3 2 $6= = $100=

$100 $6+ $106= x $112.00=

probability of making a Type I error=

probability of making a Type II error=

P rejection of the null hypothesis when it should be accepted=

P accep cetan of the null hypothesis when it should be rejected=

0.05= 0.01=

Page 439: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 11 Common Probability Distributions and Tests

11-68 Mathematics for Business, Science, and Technology, Second Edition

Orchard Publications

(11.170)and .

To evaluate the probability P, we use the relation of (11.167), that is,

(11.171)

which, as we know, for large becomes asymptotically normal, that is, it approximates the stan-dard normal distribution.

Assuming that the standard error is , as before, and the null hypothesis is true, then from(11.171),

(11.172)

To evaluate in (11.170), we make use of the fact that the event is equivalent to theevent

that is, (11.173)

Also, the event is equivalent to the event

that is, (11.174)

Therefore, with (11.170), (11.173) and (11.174), may be expressed as

(11.175)

We will extract the values of from the standard normal distribution table using Figure 11.25.

From normal distribution tables, we find that the area to the left of is . The samevalue is found by using Excel’s NORMSDIST(z) function which produces the standard normalcumulative distribution. Thus,

=NORMSDIST(2) returns .

This is the area to the left of ; we want to find the area to the right of it. Obviously, the areato the right is and thus

(11.176)

P x 119 or x 131 P x 119 P x 131+= =

125=

z x –

n-------------- x –

x------------= =

n

x $3=

z x –

x------------ x 125–

3-----------------= =

x 119

z x 125–3

-----------------=119 125–

3------------------------ 2–=

z 2–

x 131

z x 125–3

-----------------=131 125–

3------------------------ 2=

z 2

P x 119 P x 131+ P z 2– P z 2+= =

z

z 2= 0.9772

0.9772

z 2=

1 0.9772– 0.0228=

P z 2 0.0228=

Page 440: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 11-69Orchard Publications

Tests of Hypotheses and Levels of Significance

Figure 11.25. The standard normal probability function

Next, we need to find the value for . For this, we use the fact that the normal distribu-tion is symmetric, and thus we can use the relation

(11.177)Therefore,

and by substitution into (11.175),

(11.178)

This means that when using the mean of a sample of sales, and the rejection regions are asbefore, i.e., or , we say that of the time the mailing order computer com-pany will conclude that the mean has changed when in fact it has not. Stated differently, we cansay that of the time, the company will conclude that the mean has not changed.

In the discussion above, the acceptance and rejection regions were specified and we found thelevel of significance.

Now, suppose that the level of significance is specified and we want to find the acceptance andrejection regions.

We will again consider the example for the mailing order computer company and will assume thelevel of significance

Because the hypothesis test is a two-tail test, we divide into two halves, i.e., each. Then,we need to find a value such that and .

Using the standard normal distribution table, we find that for the probability , and for , .

The same value can be found with Excel’s NORMSINV(p) function which produces the inverse of

Normalized (Standard) Normal Distribution

P(z)

1-P(z)

0 z

P z 2–

F z– 1 F z–=

P z 2– P z 2 0.0228= =

P z 2– P z 2+ 0.0228 0.0228+ 0.0456= = =

100x $119 x $131 4.56%

95.44%

0.01=

0.005a P z a 0.005= P z a– 0.005=

P z a– 0.005=

a 2.576–= P z a 0.005= a 2.576=

Page 441: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 11 Common Probability Distributions and Tests

11-70 Mathematics for Business, Science, and Technology, Second Edition

Orchard Publications

the standard normal cumulative distribution. Thus, for our example,

=NORMSINV(0.005) returns .

These values define the rejection regions and are shown in Figure 11.26.

Figure 11.26. Calculated areas for rejection region

The final step is to determine the rejection region in terms of the test statistics and . Forthis, we use relation

(11.179)

and we replace with

(11.180)

Also, we replace with

(11.181)

To find , we multiply both sides of (11.180) by 3 and add 125 to both sides. Then,

(11.182)

Likewise, to find , we multiply both sides of (11.181) by 3 and add 125 to both sides. Then,

(11.183)

If a sampling distribution of a test statistic , is approximately normally distributed with a samplesize , we expect to find in the interval to about of the time. Like-wise, we expect to find in the interval to about of the time, and inthe interval to about of the time. These intervals are referred to as con-

2.576–

Normalized (Standard) Normal Distribution

0-2.576 2.576

Area=0.005 Area=0.005

x1 x2

z x 125–3

-----------------=

z 2.576–

x1 125–

3-------------------- 2.576–

z 2.576x2 125–

3-------------------- 2.576

x1

x1 $117=

x2

x2 $133=

xn 30 x x x– x x+ 68.27%

x x 2 x– x 2 x+ 95.45%

x 3 x– x 3 x+ 99.73%

Page 442: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 11-71Orchard Publications

Tests of Hypotheses and Levels of Significance

fidence intervals for estimating , and their respective percentages are called confidence limits orconfidence levels. Recalling that is the level of significance ( or ), we find that

(11.184)

From tables of the normal distribution, we find that for a confidence level of , the value of is , and for is . These values of are denoted as , and the confidence interval can

be found from

(11.185)

Example 11.33

In a sample of taxpayers, the average federal tax was found to be with a standarddeviation of . Compute the confidence interval.

Solution:

For this example, , , and the value of corresponding to the confidence interval is . Then, from (11.185),

Therefore, we can say with confidence that the lowest tax was and the highest was.

We can verify our result with Excel’s CONFIDENCE function which returns the confidence inter-val for a population mean. Its syntax is

=CONFIDENCE(alpha,standard_dev,size)

where

alpha = level of significance, and therefore, confidence level =

standard_dev = standard deviation for the sample

size = sample size

For instance, =CONFIDENCE(0.05,4000,100) returns 784 and this is the same value we foundwith relation (11.185).

x0.01 0.05

confidence level 1 level of significance– 1 –= =

95% z1.96 99% 2.58 z zc

confidence interval x zc n-------=

100 $23,000$4,000 95%

x 23 000= 4 000= n 100= zc

95% zc 1.96=

confidence interval 23 000 1.96 4 000100

--------------- 23 000 784= =

95% $22,216$23,784

100 1 – %

Page 443: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 11 Common Probability Distributions and Tests

11-72 Mathematics for Business, Science, and Technology, Second Edition

Orchard Publications

11.21 The z, t, F, and Chi-square testsz-test

The -test is used to find the probability that a particular observation is drawn from a particularpopulation. This test generates a standard score for a value with respect to the data set or array,and returns the two-tail probability for the normal distribution. It is called -test because we usethe standard deviation as a unit (z-unit), for measuring the point where the critical region begins(e.g. standards deviations = , standard deviations = for two tail tests), and relateto the proportions of the normal curve. This test is performed for populations with large samples.

Example 11.34

The mean of a particular population of data is and the standard deviation is .Compute the probability that the observed data

were drawn from that population.

Solution:

Here, the observed data consists of eight values, and thus . The standard error is foundfrom (11.165), that is,

We use Excel’s AVERAGE(number1,number2,...) function to find the mean of the given observeddata, that is,

=AVERAGE(12,19,21,22,18,16,15,17) and this returns the sampled-mean .

Using (11.167), we find the value as

The area (probability), corresponding to this normalized z value, can be found from tables of thestandard normal distribution or with the Excel’s NORMSDIST function. Here, we seek the area tothe left of . Then, =NORMSDIST( 1.3956) returns 0.081418.

The same value is obtained with Excel’s ZTEST function whose syntax is

ZTEST(array,x,sigma)

where

array = range of data

zx

z

2 5% 2.5 1%

16= 3.04=

12 19 21 22 18 16 15 17

n 8= x

xn

------- 3.048

---------- 1.0748= = =

x 17.5=

z

z x –

x------------ 17.5 16–

1.0748---------------------- 1.3956= = =

z 1.3956–=

Page 444: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 11-73Orchard Publications

The z, t, F, and Chi-square tests

x = value to test

sigma = standard deviation of the population

For this example,

, , and . Then,.

=ZTEST({12,19,21,22,18,16,15,17},16,3.04) which returns .

This indicates that approximately only of the time we can say that the observed data camefrom a population with mean and standard deviation .

t-test

The -test is similar to the -test but it is used with populations whose samples are small (30 orless). We use this test to determine the probability that two samples are drawn from populationsthat have the same mean. Performing a -test is easy with Excel’s TTEST function whose syntax is

=TTEST(array1,array2,tails,type)

where

array1 = the first data set

array2 = the second data set

tails=1 specifies the one-tail test and tails=2 specifies the two-tail test.

If type=1, a paired* test is performed.

If type=2, a -test is performed for samples from populations with the same variance (homoscedas-tic); with this test, array1 and array2 need not have the same number of data points.

If type=3, a -test is performed for samples from populations with unequal variance (heteroscedas-tic); with this test, array1 and array2 need not have the same number of data points.

Example 11.35

Use Excel’s TTEST function to perform a two-tail, paired -test, if we are given that, and .

Solution:

We use the Excel function

=TTEST({4,5,6,9,10,2,3,5,6},{5,18,2,1,13,3,4,16,7},2,1) and this returns the value .

* A paired test is one where array1 and array2 have the same number of data points.

array 12 19 21 22 18 16 15 17= x 16= sigma 3.04=

0.081417

8.15%16= 3.04=

t z

t

t

t

tarray 1 4 5 6 9 10 2 3 5 6= array 2 5 18 2 1 13 3 4 16 7=

0.361682

Page 445: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 11 Common Probability Distributions and Tests

11-74 Mathematics for Business, Science, and Technology, Second Edition

Orchard Publications

Therefore, we can say that the probability that the data of array1 and array2 have come frompopulations that have the same mean is .

Example 11.36

Use Excel to perform a one-tail, heteroscedastic -test given that

and .

Solution:

Here, we observe that consists of data points, whereas has only datapoints. This is permissible for heteroscedastic type -tests. Then,

=TTEST({4,5,6,9,10,2,3,5,6,8},{5,18,2,1,13,3,4,16,7},1,3) returns .

This indicates that the probability that the data of and have come from thesame populations that have the same mean is .

F-test

The F-test produces the one-tail probability that the variances in two arrays of data points are notsignificantly different. This test also determines whether two samples have different variances. Forexample, given scores of tests from two different universities, we can use the F-test to determinewhether these universities have different levels of diversity, i.e., different statistics, such as meanand variance.

We can perform an F-test with the Excel’s FTEST(array1,array2) function.

With this function, array1 and array2 need not have the same number of data points.

Example 11.37

Let

represent the test scores for an electrical engineering course at University A and

the test scores for the same course at University B. Use Excel’s FTEST function to determine theprobability that the scores are not significantly different.

Solution:

Here, we observe that array1 consists of scores, whereas array2 has only scores. This is per-missible for F-tests. Using Excel’s FTEST function, we get

36.17%

t

array 1 4 5 6 9 10 2 3 5 6 8= array 2 5 18 2 1 13 3 4 16 7=

array 1 10 array 2 9t

0.214937

array 1 array 221.49%

array 1 56 67 79 85 91 75 69 71 82 59=

array 2 49 88 73 81 58 95 83 86 90=

10 9

Page 446: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 11-75Orchard Publications

The z, t, F, and Chi-square tests

=FTEST({56,67,79,85,91,75,69,71,82,59},{49,88,73,81,58,95,83,86,90}) and this returns thevalue .

This indicates that the probability that the variances in the scores of these two universities are notsignificantly different is .

The F-test is used in the Analysis of Variance (ANOVA). We will discuss it in Chapter 13.

-test

Consider the data of Table 11.3 representing the data obtained from a random sample of jobapplicants, men and women.

We call these actual frequencies.

Does this sample represent a real and reliable difference between the population proportions ofmale and female applicants?

To answer this question, we start with the hypothesis that men and women are equally likely tohave had work experience; we call this the null hypothesis. Based on the null hypothesis, we drawa similar table with expected frequencies as shown in Table 11.4 where we have used the same pro-portion as the actual frequencies; in other words, . That is, in constructingthe table for the expected frequencies, we assume that men in a sample of men have workexperience, and likewise, women in a sample of have work experience.

TABLE 11.3 Table of actual frequencies

Work Experience

Sex Yes No Total

Male 70 30 100

Female 50 50 100

Total 120 80 200

TABLE 11.4 Table of expected frequencies

Work Experience

Sex Yes No Total

Male 60 40 100

Female 60 40 100

Total 120 80 200

0.361613

36.16%

2

100 100

120 200 0.6 60%= =

60 10060 100

Page 447: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 11 Common Probability Distributions and Tests

11-76 Mathematics for Business, Science, and Technology, Second Edition

Orchard Publications

Next, we combine the actual (A) and expected (E) frequencies into a single table to see how theydiffer. This is done in Table 11.5.

Table 11.5 shows that the difference between the actual and expected frequency is or .

To decide whether this difference is large enough to be considered significant, we must calculate

the statistic, also known as the test for goodness of fit. It is computed from

(11.186)

where

If , the actual and expected frequencies agree exactly. If , they are in disagreement,

and the larger the value of , the greater the disparateness between actual and expected fre-quencies.

Using (11.186) with the data of Table 11.5, we get

Next, we must decide whether the value is large enough to be considered statistically

significant. To make this decision, we look at a distribution table where we find that a of

TABLE 11.5 Combined actual and expected frequencies

Work Experience

Gender Yes No Total

Male A 70 A 30 100

E 60 E 40 100

Female A 50 A 50 100

E 60 E 40 100

+10 10–

2 2

2 Aij Eij– 2

Eij--------------------------

j 1=

c

i 1=

r=

Aij actual frequency in the ith row jth column=

Eij ectedexp frequency in the ith row jth column=

r number of rows=

c number of columns=

2 0= 2 02

2 70 60– 2

60------------------------- 30 40– 2

40------------------------- 50 60– 2

60------------------------- 50 40– 2

40-------------------------+ + + 8.333= =

2 8.333=2 2

Page 448: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 11-77Orchard Publications

The z, t, F, and Chi-square tests

is exceed in only of occasions, and a of is exceeded in only . Therefore, wecan say that the differences are significant even at the level. In other words, the value of

should occur less than once in samples if there is no difference in work experi-ence between male and female applicants. Accordingly, we reject the null hypothesis.

We can also Excel’s CHITEST function which returns the test for independence. This is illus-trated with the following example.

Example 11.38

Table 11.6 shows the actual and expected registered democrats, republicans and independents bygender.

Perform the test for goodness of fit to find the level of significance.

Solution:

Using (11.186) with the data of Table 11.6, we get

TABLE 11.6 Table for Example 11.20.

Now, we use Excel’s CHIDIST(x,df) function

where

x = the value

df = degrees of freedom. It is found from

3.84 5% 2 7.83 0.5%0.5%

2 8.333= 500

2

123456789

1011

A B CActual

Men WomenDemocrats 61 72Republicans 24 16Neither 15 12

ExpectedMen Women

Democrats 52 65Republicans 38 21Neither 10 16

2 Aij Eij– 2

Eij--------------------------

j 1=

2

i 1=

3=

61 52– 2

52------------------------- 24 38– 2

38------------------------- 15 10– 2

10------------------------- 72 65– 2

65------------------------- 16 21– 2

21------------------------- 12 16– 2

16-------------------------+ + + + + 12.1599==

2

Page 449: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 11 Common Probability Distributions and Tests

11-78 Mathematics for Business, Science, and Technology, Second Edition

Orchard Publications

(11.187)

For this example, we found that . Also, from (11.187),

Then,

=CHIDIST(12.1599,2) returns .

The same answer is obtained with the CHITEST(actual_range,expected_range) function. Then,with reference to Table 11.6,

=CHITEST(B3:C5,B9:C11) returns also.

From a distribution table, we find that for and this value is exceeded in only. Therefore, we can say that the differences are significant even at the level. In other

words, the value of should occur less than once in samples if there is to be nodifference between the actual and expected frequencies.

11.22 Summary• The relation

is known as the binomial expansion, binomial theorem, or binomial series.

• The Binomial (Bernoulli) distribution is defined as

for and

• The binomial distribution is a pdf of the discrete type.

• The mean and the variance for the binomial distribution are:

df r 1– c 1–=

2 12.1599=

df r 1– c 1– 3 1– 2 1– 2= = =

0.002288

0.002288

2 df 2= 2 10.6=

0.5% 0.5%2 12.1599= 500

a b+ n an nan 1– b n n 1–2!

--------------------an 2– b2+ +=

+n n 1– n 2–3!

-------------------------------------an 3– b3 abn 1– bn+ + +

nkk 0=

nan k– bk=

b k n p,;nk

pk 1 p– n k– n!n k– !k!

-----------------------pk 1 p– n k–= =

k 0 1 2 n= 0 p 1

b k n p;;

2

np=

Page 450: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 11-79Orchard Publications

Summary

and

where = number of samples, = probability of success, and = probability of failure.

• The rv is said to be uniformly distributed in the interval if

• The cdf of the uniform distribution for the entire interval is

• The mean and variance of the uniform distribution are

and

• The pdf of the exponential distribution is defined as

• The mean and the variance of the exponential distribution are

and

• The normal distribution is the most widely used distribution in scientific and engineering appli-cations, demographic studies, poll results, and business applications. The pdf of the normal dis-tribution is defined as

2 npq=

n p q

X a x b

fX x1

b a–------------ a x b

0 otherwise=

0 x

PX x

0 x ax a–b a–------------ a x b

1 x b

=

2

a b+2

------------=

2 b a–12

----------------=2

fX x e x– x 00 otherwise

=

2

1=

2 1 2=

Page 451: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 11 Common Probability Distributions and Tests

11-80 Mathematics for Business, Science, and Technology, Second Edition

Orchard Publications

where and .

• The cdf of the normal distribution is

• The normal distribution is usually expressed in standardized form, where the standardized rvis referred to as the standardized rv and, in this case, is related to as

Then, the mean of the rv is zero, that is, , and the variance is one, that is, The pdf of the standardized normal distribution is then simplified to

and the corresponding cdf becomes

where is a dummy variable of integration.

• The error function or probability integral defined as

where is a dummy variable. It can also be expressed in series form as

• The complementary error function is defined as

fX x 12 X

-----------------ex –

2 2 X–=

mean= X s dard deviationtan=

PX x 12 X

----------------- ex –

2 2 X–xd

x=

ZX Z X

Z X –

X-------------=

Z 0= X2 1=

fZ z 12

----------e z2 2–=

PZ z P Z z 12

---------- e u2 2– ud–

z 12--- 1

2---------- e u2 2– ud

0

z+= = =

u

erf u

erf u 2------- e2

– d0

u=

erf u 2------- 1– nu2n 1+

n! 2n 1+----------------------------

n 0=

=

erfc u

erfc u 2------- e2

– du

1 erf u–= =

Page 452: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 11-81Orchard Publications

Summary

• The cfd of the normal distribution is often expressed in terms of the error function as

• The function is defined as

• Percentiles split the data into parts. Typical percentile values are or , or, ...... or , and or and these are denoted as , , , , or respectively.

• For continuous functions, the percentile is defined as

• For a pdf of the discrete type, we can get approximate values of percentiles, if we first arrange thesample in ascending order of magnitude; then, we compute the percentile ,

from the relation where . If turns out tobe an integer, the percentile is the average of the observations in positions and inthe sampled data set starting at the bottom (lowest value) of the distribution. If is not an inte-ger, we select the next integer which is greater than .

• The Student’s -distribution or simply t-distribution is used instead of the standard normal distri-bution when the sample size is less than 30. The t-distribution is a family of probability distribu-tions, and each separate -distribution is determined by a parameter called the degrees of free-dom. If is the sample size for , then the degrees of freedom can be computed from

• The -distribution curves, like the standard normal distribution curve, are centered at zero.Thus, the mean is zero, that is,

• The variance of each -distribution depends upon the value of df. It is found from

• The pdf of the -distribution is given in terms of the (gamma) function. The function isdiscussed in Appendix B.

PX x

PX x 12--- 1 erf x –

2 X

--------------+=

Q

Q 12

---------- e2 2– d=

100 0.05 5% 0.1010% 0.95 95% 0.99 99% p0.05 p0.10 p0.95

p0.99

jth pj

pj P X xp p x xd–

xp p100---------= ==

jth pj

j 1 2 99= i jn 100= n number of samples= ijth i i 1+

ii

t t

tn n 30

df n 1–=

t0=

2 t

2 dfdf 2–--------------= df 3

t

Page 453: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 11 Common Probability Distributions and Tests

11-82 Mathematics for Business, Science, and Technology, Second Edition

Orchard Publications

• Percentile values of the -distribution for different degrees of freedom are denoted as andcan be found in math tables. The tables give values for the number of degrees of freedom

and for and .

• The -distribution is symmetrical; therefore,

• The (chi-square) distribution, like the -distribution, is a family of probability distributions,and each separate distribution is determined by the degrees of freedom.

• The pdf of the distribution is given in terms of the (gamma) function which is discussedin Appendix B.

• The F distribution is another family of curves whose shape differs according to the degrees offreedom. The pdf of the F distribution is given in terms of the (gamma) function which isdiscussed in Appendix B.

• Percentile values of the F distribution for different degrees of freedom are denoted as andcan be found in math tables. These tables are based on the and degrees of freedom andprovide values corresponding to

• The F distribution is used extensively in the Analysis of Variance (ANOVA) which comparesthe means of several populations. ANOVA is discussed in Chapter 13.

• Chebyshev’s inequality states that

• That is, the probability of differing from its mean by more than some positive number , is

less than or equal to the ratio of the variance to the square of the number .

• The law of large numbers states that the probability of the arithmetic mean differing fromits expected value by more than the value of approaches zero as .

• The Poisson distribution is a pdf of the discrete type, and it is defined as

for where is a given positive number. The Poisson distribution provides uswith a close approximation of the binomial distribution for small values of provided that theprobability of success is small so that the probability of failure , that is, and

where .

t tp

1 2 30 40 60 120 PX x 0.60 0.75 0.90 0.95 0.975 0.99 0.995= 0.9995

t t1 p– tp–=

2 t

2

Fp

df1 df2

PX x 0.90 0.95 0.975 0.99 0.995 and 0.999=

P X –2

2------

X2

Sn n

e n

f x P X x= p x;xe–

x!-------------= = =

x 0 1 2=

xp q q 1 p–= 1

np= n number of trials=

Page 454: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 11-83Orchard Publications

Summary

• The multinomial distribution is a generalization of the binomial distribution and states that in repeated trials, the probability that event occurs times, event occurs times and soon until occurs times, where , is obtained by

We observe that for , this distribution reduces to the binomial distribution.

• The hypergeometric distribution states that

For the hypergeometric distribution, the mean and variance are

and

• The bivariate normal distribution is a generalization of the normal distribution. It applies to twocontinuous rv and given by the joint density function

(11.188)

where , , , are the means and standard deviations of the and respectively, and is the correlation coefficient between and . This distribution is also referred to as the two-

dimensional normal distribution.

• The Rayleigh distribution is a special case of the bivariate normal distribution where the meansare zero, the standard deviations are equal, and and are uncorrelated, that is,

, , and . It is defined as

nA1 k1 A2 k2

Am km k1 k2 km+ + + n=

p n!k1!k2! km!-----------------------------p1

k1p2k2 pm

km=

m 2=

P X x=

kx

N k–

n x–Nn

--------------------------------

k!x! k x– !----------------------- N k– !

n x– ! N k– n– x+------------------------------------------------------

N!n! N n– !-------------------------

----------------------------------------------------------------------------------= =

2

n kN----=

2 N n–N 1–------------- n k

N---- 1 k

N----–=

X Y

f x y 1

2 1 2 1 2–--------------------------------------e

x 1–

1--------------

22

x 1–

1--------------

y 2–

2--------------

y 2–

2--------------

2+–

2 1 2–

---------------------------------------------------------------------------------------------------------------–

=

1 2 1 2 X Y

X Y

X Y

1 2 0= = 1 2= = 0=

fr r r2

------e r2 2 2– for r 0=

Page 455: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 11 Common Probability Distributions and Tests

11-84 Mathematics for Business, Science, and Technology, Second Edition

Orchard Publications

where , and is the variance of the variables and .

• The Cauchy distribution has the pdf

This distribution is symmetrical about and thus its mean is zero. However, the varianceand higher moments do not exist.

• The geometric distribution has the pdf

with mean and variance

• The negative binomial distribution or Pascal distribution has the pdf

(11.189)

with mean and variance

• The Weibull distribution has the pdf

with mean and variance

• The Maxwell distribution has the pdf

with mean and variance

• The lognormal distribution has the pdf

r x2 y2+= 2 x y

fX x ax2 a2+

------------------------- a 0 x–=

x 0=

fX x pqx 1– x 1 2= =

1 p= 2 q p2=

fX xx 1–

r 1–pqx r– x r r 1+= =

r p= 2 rq p2=

fX x x 1– e x– x 00 x 0

=

1– 1 1---+= 2 2– 1 2---+ 2 1 1---+–=

fX x2---a3 2x2e ax2 2– x 0

0 x 0=

2 2a

------= 2 1a--- 3 8---–=

fX x 12 x

-----------------e1

2 2--------- x –

2ln–= x 0 0

Page 456: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 11-85Orchard Publications

Summary

with mean and variance

• The critbinom function returns the smallest value for which the binomial distribution is greaterthan, or equal to a criterion value (alpha) where .

• The sampling distribution for the sampled mean, or simply the sampled mean, denoted as is asample statistic taken from a large number of random samples from the same population.

• A score represents the number of standard deviations that a value , obtained from a givenobservation, is above or below the mean. For the entire population, it is defined as

• A null hypothesis is a statistical decision where we conclude that there is no difference betweenprocedures in sampling from the same population.

• An alternate hypothesis is a hypothesis which differs from a given hypothesis.

• Tests of significance are procedures that we follow to decide whether to accept or reject hypoth-eses.

• If represents the null hypothesis, the test to determine the alternatehypothesis for is called a one-tail left test or a lower-tail test.

• If represents the null hypothesis, the test to determine the alternatehypothesis for is called a one-tail right test or an upper-tail test.

• If the alternate hypothesis is for the condition , regardless whether or , this test is referred to as a two-tail test.

• A test statistic, denoted as , is a statistical measure that is used to decide whether to accept orreject the null hypothesis.

• A Type I error occurs if a hypothesis is rejected when it should be accepted.

• A Type II error occurs if a hypothesis is accepted when it should be rejected.

• The probabilities of Type I and Type II errors are denoted as follows:

• The probability is referred to as the level of significance. Typical levels of significance of or .

e2

+ 2= 2 e2 2+ e

2

1–=

0 1

x

z x

z x –------------=

some known value=

some known value

some known value=

some known value

some known valuesome known value some known value

x

probability of making a Type I error=

probability of making a Type II error=

0.05= 0.01=

Page 457: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 11 Common Probability Distributions and Tests

11-86 Mathematics for Business, Science, and Technology, Second Edition

Orchard Publications

• If a sampling distribution of a test statistic , is approximately normally distributed with a sam-ple size , we expect to find in the interval to about of thetime. Likewise, we expect to find in the interval to about of thetime, and in the interval to about of the time. These intervals arereferred to as confidence intervals for estimating , and their respective percentages are calledconfidence limits or confidence levels. Recalling that is the level of significance ( or ),we find that

• The -test is used to find the probability that a particular observation is drawn from a particu-lar population. This test generates a standard score for a value with respect to the data set orarray, and returns the two-tail probability for the normal distribution.

• The -test is similar to the -test but it is used with populations whose samples are small (30 orless). We use this test to determine the probability that two samples are drawn from popula-tions that have the same mean.

• The F-test produces the one-tail probability that the variances in two arrays of data points arenot significantly different. This test also determines whether two samples have different vari-ances. The F-test is used in the Analysis of Variance (ANOVA). It is discussed in Chapter 13.

• The statistic, also known as the test for goodness of fit, is used to decide whether the dif-ference between actual frequencies and expected frequencies is large enough to be consideredsignificant. It is computed from

where

If , the actual and expected frequencies agree exactly. If , they are in disagree-

ment, and the larger the value of , the greater the disparateness between actual andexpected frequencies.

xn 30 x x x– x x+ 68.27%

x x 2 x– x 2 x+ 95.45%

x 3 x– x 3 x+ 99.73%

x0.01 0.05

confidence level 1 level of significance– 1 –= =

zx

t z

2 2

2 Aij Eij– 2

Eij--------------------------

j 1=

c

i 1=

r=

Aij actual frequency in the ith row jth column=

Eij ectedexp frequency in the ith row jth column=

r number of rows=

c number of columns=

2 0= 2 02

Page 458: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 11-87Orchard Publications

Exercises

11.23 Exercises1. A fair die is tossed 8 times and it is considered to be a success if 2 or 3 appears. Using the bino-

mial distribution, compute:

a. the probability that a 2 or 3 occurs exactly three times.

b. the probability that a 2 or 3 never occurs.

c. the probability that a 2 or 3 occurs at least once.

2. A fair die is tossed 240 times. Using the binomial distribution, compute:

a. the expected number of sixes.

b. the standard deviation.

3. Using the Poisson distribution, compute:

a. . b. c.

4. For college dropouts, the time between dropping from college and returning back to continuetheir education for students under the age of 25 years, is normally distributed with mean

semesters and standard deviation semester. Compute the percentage ofthose who will be returning to college within two years after dropping out.

5. The average number of revolutions per minute (RPM) for a sample of small motors pro-duced by a manufacturing plant, is normally distributed with mean and stan-dard deviation . The RPM of each motor must have a value in the

range, and all motors outside this range are considered defective, and thuswill be rejected. Compute the percentage of the defective motors produced by this plant.

6. A company produces colored light bulbs in percentages of 60% red, 25% blue, and 15% green.Using the multinomial distribution, compute the probability that in a sample of 5 bulbs, 3 arered, 1 is blue, and 1 is green.

7. The table on the next page shows the actual and expected test results for mathematics, phys-ics, and chemistry by male and female students.

Perform the test for goodness of fit to find the level of significance.

p 2;1 p 3;0.5 p 2;0.7

2.5= 1.0=

5001 200 RPM=

50 RPM=

1130 RPM 1230

2

Page 459: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 11 Common Probability Distributions and Tests

11-88 Mathematics for Business, Science, and Technology, Second Edition

Orchard Publications

Actual

Male Students Female Students

Mathematics 72 76

Physics 84 81

Chemistry 79 87

Expected

Male Students Female Students

Mathematics 83 82

Physics 78 79

Chemistry 87 89

Page 460: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 11-89Orchard Publications

Solutions to Exercises

11.24 Solutions to Exercises1.

a. , , and probability of success each time the die is tossed is

b. The probability of getting or each time the die is tossed is , and with and we have

c. The probability that a or occurs at least once is andthus with the result of part (b)

2.a. Here, , and from (11.16),

b. From (11.17), or

3.

a.

b.

c.

n 8= k 3= p 2 6 1 3= =

p3 timesnk

pk 1 p– n k– 83

13---

3 23---

5 8!3! 8 3– !------------------------ 1

27------ 32

243---------= = =

8 7 63 2

--------------------- 127------ 32

243--------- 10752

39366--------------- 927

3394------------= ==

2 3 p 2 6 1 3= =

n 8= k 8=

pnever 2 or 3nk

pk 1 p– n k– 88

13---

81 p– 0 1

3---

8 16561------------= = = =

2 3 1 probability of never occuring–

p2 or 3 at least once 1 16561------------– 6560

6561------------= =

n 240= p 1 6= np 240 6 40= = =

2 npq=

np 1 p– 240 1 6 1 1 6– 40 5 6= = =

200 6 100 3 5.77= ==

p x;xe–

x!-------------=

p 2;1 12e 1–

2!------------- 1

2e------ 0.184= = =

p 3;0.5 1 2 3e 0.5–

3!---------------------------- e 0.5–

48---------- 0.013= = =

p 2;0.7 0.72e 0.7–

2!-------------------- 0.12= =

Page 461: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 11 Common Probability Distributions and Tests

11-90 Mathematics for Business, Science, and Technology, Second Edition

Orchard Publications

4.The percentage of those who will be returning within years ( months) is withmean months and standard deviation months. This is indicated by the shadedarea below.

In terms of normalized units,

Now, we refer to the spreadsheet of Figure 11.12, Page 17, where under Column E for we read . That is, there is a probability of approximately that college students willbe returning to college within two years after dropping out.

5.

Now, we refer to the spreadsheet of Figure 11.12, Page 11-17, where under Column I for we read . That is, the area between the interval is and

the area outside this interval is and thus there is a probability that approx-imately motors will be defective.

6.

Thus, the probability that in a sample of 5 bulbs, 3 are red, 1 is blue, and 1 is green is

2 24 P X 2430= 6=

24 30

Z X –------------- 24 30–6

------------------ 1–= = =

Z 1–=

15.94% 16%

Z1X1 –--------------- 1130 1200–

50------------------------------ 1.4–= = =

Z2X2 –--------------- 1250 1200–

50------------------------------ 1.4= = =

Z 1.4= 83.69% 1.0 Z 1.0– 0.83691 0.8369– 0.1631=

16.31%

p n!k1!k2! km!-----------------------------p1

k1p2k2 pm

km 5!3! 1! 1!------------------------ 0.63 0.251 0.151 120

6--------- 0.216 0.25 0.15 0.162= = ==

16.2%

Page 462: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 11-91Orchard Publications

Solutions to Exercises

7.

Now, we use Excel’s =CHIDIST(x,df) function where x = the value and df = degrees offreedom which is

Then,

=CHIDIST(3.1896,2) returns 0.203.

The same answer is obtained with the CHITEST(actual_range,expected_range) function.Then, with reference to the table above,

=CHITEST(B3:C5,B9:C11) returns 0.203 also.

From a distribution table, we find that for and this value is exceeded inonly . Therefore, we can say that the differences are significant at the

level. In other words, the value of should occur less than 2.5 times in 100sets of test scores if there is to be no difference between the actual and expected frequencies.

A B C1 Actual2 Male Students Female Students3 Mathematics 72 764 Physics 84 815 Chemistry 79 8767 Expected8 Male Students Female Students9 Mathematics 83 8210 Physics 78 7911 Chemistry 87 89

2 Aij Eij– 2

Eij--------------------------

j 1=

c

i 1=

r Aij Eij– 2

Eij--------------------------

j 1=

2

i 1=

3= =

72 83– 2

83------------------------- 84 78– 2

78------------------------- 79 87– 2

87------------------------- 76 82– 2

82------------------------- 81 79– 2

79------------------------- 87 89– 2

89-------------------------+ + + + + 3.1896==

2

df r 1– c 1– 3 1– 2 1– 2= = =

2 df 2= 2 4.61=

1 0.75– 0.25 2.50%= =

2.50% 2 3.1896=

Page 463: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 11 Common Probability Distributions and Tests

11-92 Mathematics for Business, Science, and Technology, Second Edition

Orchard Publications

NOTES

Page 464: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 12-1Orchard Publications

Chapter 12

Curve Fitting, Regression, and Correlation

his chapter introduces the concepts of curve fitting, regression, covariance, andcorrelation, as applied to probability and statistics. Several examples are presented toillustrate their use in practical applications.

12.1 Curve FittingCurve fitting is the process of finding equations to approximate straight lines and curves that bestfit given sets of data. For example, for the data of Figure 12.1, we can use the equation of astraight line, that is,

(12.1)

Figure 12.1. Straight line approximation.

For Figure 12.2, we can use the equation for the quadratic or parabolic curve of the form

(12.2)

Figure 12.2. Parabolic line approximation

T

y mx b+=

x

y

y ax2 bx c+ +=

y

x

Page 465: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 12 Curve Fitting, Regression, and Correlation

12-2 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

In finding the best line, we normally assume that the data, shown by the small circles in Figures12.1 and 12.2, represent the independent variable , and our task is to find the dependentvariable . This process is called regression.

Regression can be linear (straight line) or curved (quadratic, cubic, etc.) and it is not restricted toengineering applications. Investment corporations use regression analysis to compare a portfolio’s past performance versus index figures. Financial analysts in large corporations use regression toforecast future costs, and the Census Bureau use it for population forecasting.

Obviously, we can find more than one straight line or curve to fit a set of given data, but weinterested in finding the most suitable.

Let the distance of data point from the line be denoted as , the distance of data point from the same line as , and so on. The best fitting straight line or curve has the property that

(12.3)

and it is referred to as the least-squares curve. Thus, a straight line that satisfies (12.3) is called aleast squares line. If it is a parabola, we call it a least-squares parabola.

12.2 Linear RegressionWe perform linear regression with the method of least squares. With this method, we compute thecoefficients (slope) and (y-intercept) of the straight line equation

(12.4)

such that the sum of the squares of the errors will be minimum. We derive the values of and ,that will make the equation of the straight line to best fit the observed data, as follows:

Let and be two related variables, and let us assume that corresponding to the values, we have observed the values . Now, let us suppose that we have

plotted the values of versus the values of , and we have observed that the points approximate a straight line. We denote the straight line

equations passing through these points as

(12.5)

xy

x1 d1 x2

d2

d12 d2

2 d32+ + + minimum=

m b

y mx b+=

m b

x yx1 x2 x3 xn y1 y2 y3 yn

y xx1 y1 x2 y2 x3 y3 xn yn

y1 mx1 b+=

y2 mx2 b+=

y3 mx3 b+=

yn mxn b+=

Page 466: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 12-3Orchard Publications

Linear Regression

In (12.5), the slope and y-intercept are the same in all equations since we have assumed thatall points lie close to one straight line. However, we need to determine the values of theunknowns and from all equations; we will not obtain valid values for all points if we solvejust two equations with two unknowns.*

The error (difference) between the observed value , and the value that lies on the straight line,is . This difference could be positive or negative, depending on the position of theobserved value, and the value at the point on the straight line. Likewise, the error between theobserved value and the value that lies on the straight line is and so on. Thestraight line that we choose must be a straight line such that the distances between the observedvalues, and the corresponding values on the straight line, will be minimum. This will be achievedif we use the magnitudes (absolute values) of the distances; if we were to combine positive andnegative values, some may cancel each other and give us an erroneous sum of the distances.Accordingly, we find the sum of the squared distances between observed points and the points onthe straight line. For this reason, this method is referred to as the method of least squares.

The values of and can be found from

(12.6)

where

We can solve the equations of (12.6) simultaneously by Cramers’ rule, or with Excel usingmatrices.

With Cramer’s rule, and are computed from

(12.7)

where

* A linear system of independent equations that has more equations than unknowns is said to be overdetermined and noexact solution exists. On the contrary, a system that has more unknowns than equations is said to be underdetermined andthese systems have infinite solutions.

m b

m b n

y1

y1 mx1 b+–

y2 y2 mx2 b+–

m b

x2 m x b+ xy=

x m nb+ y=

x sum of the numbers x=

y sum of the numbers y=

xy sum of the numbers of the product xy=

x2 sum of the numbers x squared=

n number of data x=

m b

mD1------= b

D2------=

Page 467: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 12 Curve Fitting, Regression, and Correlation

12-4 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

(12.8)

Example 12.1

In a typical resistor, the resistance in (ohms), denoted as in the equations above, increaseswith an increase in temperature in , denoted as . The temperature increments and theobserved resistance values are shown In Table 12-1. Compute the straight line equation that bestfits the observed data.

Solution:

Here, we are given 11 sets of data and thus . To save considerable time, we use thespreadsheet of Figure 12.3 where we enter the given values, and we perform the computationsusing spreadsheet formulas. Accordingly, we enter the (temperature) values in Column A, and

(the measured resistance corresponding to each temperature value) in Column B. Columns C

and D show the and products. Then, we compute the sums so they can be used with (12.7)and (12.8). All work is shown on the spreadsheet of Figure 12.3. The values of and areshown in cells I20 and I24 respectively. Thus, the straight line equation that best fits the givendata is

(12.9)

We can use Excel to produce quick answers to regression problems. We will illustrate theprocedure with the following example.

Example 12.2

Repeat Example 12.1 using Excel’s Add Trendline feature.

Solution:

We first enter the given data in columns A and B as shown on the spreadsheet of Figure 12.4.To produce the plot of Figure 12.4, we perform the following steps:

1. We click on the Chart Wizard icon. The displayed chart types appear on the Standard Typestab. We click on XY (Scatter) Type. On the Chart sub-types options, we click on the top (scatter)sub-type. Then, we click on Next>Next>Next>Finish, and we observe that the plot appears

TABLE 12.1 Data for Example 12.1 Resistance versus Temperature

T ( C) x 0 10 20 30 40 50 60 70 80 90 100

R ( ) y 27.6 31.0 34.0 37 40 42.6 45.5 48.3 51.1 54 56.7

x2 xx n

= D1xy xy n

= D2x2 xyx y

=

R yT C x

n 11=

xy

x2 xym b

y mx b+ 0.288x 28.123+= =

Page 468: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 12-5Orchard Publications

Linear Regression

next to the data. We click on the Series 1 block inside the Chart box, and we press the Deletekey to delete it.

Figure 12.3. Spreadsheet for Example 12.1

2. To change the plot area from gray to white, we choose Plot Area from the taskbar below themain taskbar, we click on the small (with the hand) box, on the Patterns tab we click on thewhite box (below the selected gray box), and we click on OK. We observe now that the plotarea is white. Next, we click anywhere on the perimeter of the Chart area and observe sixsquare handles (small black squares) around it. We click on Chart on the main taskbar, and onthe Gridlines tab. Under the Value (Y) axis, we click on the Major gridlines box to deselect it.

3. We click on the Titles tab, and on the Chart title box, we type Straight line for Example 12.2, onthe Value X-axis, we type Temperature, degrees Celsius, and on the Value Y-axis, we typeResistance in Ohms. We click anywhere on the x-axis to select it, and we click on the small(with the hand) box. We click on the Scale tab, we change the maximum value from 150 to

123456789

101112131415161718192021222324252627

A B C D E F G H ISpreadsheet for Example 10.1x (0C) y( ) x2 xy

0 27.6 0 010 31.0 100 31020 34.0 400 68030 37.0 900 111040 40.0 1600 160050 42.6 2500 213060 45.5 3600 273070 48.3 4900 338180 51.1 6400 408890 54.0 8100 4860

100 56.7 10000 5670550 467.8 38500 26559

x2 x 38500 550= = 121000

x n 550 11m=D1/ = 0.288

xy x 26559 550= = 34859

y n 467.8 11b=D2/ = 28.1227

x2 xy 38500 26559= = 3402850

x y 550 467.8

Resistance versus Temperature

20.0

30.0

40.0

50.0

60.0

0 20 40 60 80 100

Temperature

Res

ista

nce

Page 469: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 12 Curve Fitting, Regression, and Correlation

12-6 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

100, and we click OK. We click anywhere on the y-axis to select it, and we click on the small(with the hand) box. We click on the Scale tab, we change the minimum value from 0 to 20, wechange the Major Unit to 10, and we click on OK.

Figure 12.4. Plot of the straight line for Example 12.2

4. To make the plot more presentable, we click anywhere on the perimeter of the Chart area, andwe observe the six handles around it. We place the cursor near the center handle of the upperside of the graph, and when the two-directional arrow appears, we move it upwards by movingthe mouse in that direction. We can also stretch (or shrink) the height of the Chart area byplacing the cursor near the center handle of the lower side of the graph and move itdownwards with the mouse. Similarly, we can stretch or shrink the width of the plot to the leftor to the right, by placing the cursor near the center handle of the left or right side of the Chartarea.

5. We click anywhere on the perimeter of the Chart area to select it, and we click on Chart abovethe main taskbar. On the pull-down menu, we click on Add Trendline. On the Type tab, weclick on the first (Linear) and we click on OK. We now observe that the points on the plothave been connected by a straight line.

We can also use Excel to compute and display the equation of the straight line. This feature willbe illustrated in Example 12.4

The Data Analysis Toolpack in Excel includes the Regression Analysis tool which performs linearregression using the least squares method. It provides a wealth of information for statisticians, andcontains several terms used in probability and statistics.

123456789

1011121314

A B C D

x (0C) y( )

0 27.610 31.020 34.030 37.040 40.050 42.660 45.570 48.380 51.190 54.0

100 56.7

Straight line for Example 10.2

20

30

40

50

60

0 20 40 60 80 100

Temperature (degrees Celsius)

Res

ista

nce

(Ohm

s)

Page 470: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 12-7Orchard Publications

Parabolic Regression

12.3 Parabolic RegressionWe find the least-squares parabola that fits a set of sample points with

(12.10)

where the coefficients are found from

(12.11)

where = number of data points.

Example 12.3

Find the least-squares parabola for the data of Table 12.2.

Solution:

We construct the spreadsheet of Figure 12.5, and from the data of Columns A and B, we computethe values shown in Columns C through G. The sum values are shown in Row 18, and from thesewe form the coefficients of the unknowns .By substitution into (12.11),

(12.12)

We solve the equations of (12.12) with matrix inversion and multiplication, as shown in Figure12.6. The procedure was presented in Chapter 3. Therefore, the least-squares parabola is

The plot for this parabola is shown in Figure 12.7.

TABLE 12.2 Data for Example 12.3

x 1.2 1.5 1.8 2.6 3.1 4.3 4.9 5.3

y 4.5 5.1 5.8 6.7 7.0 7.3 7.6 7.4

x 5.7 6.4 7.1 7.6 8.6 9.2 9.8

y 7.2 6.9 6.6 5.1 4.5 3.4 2.7

y ax2 b c+ +=

a b and c

x2 a x b nc+ + y=

x3 a x2 b x c+ + xy=

x4 a x3 b x2 c+ + x2y=

n

a b and c

530.15a 79.1b 15c+ + 87.8=

4004.50a 530.15b 79.1c+ + 437.72=

32331.49a 4004.50b 530.15c+ + 2698.37=

y 0.20x2– 1.94x 2.78+ +=

Page 471: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 12 Curve Fitting, Regression, and Correlation

12-8 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

Figure 12.5. Spreadsheet for Example 12.3

Figure 12.6. Spreadsheet for the solution of the equations of (12.12)

Example 12.4

The voltages (volts) shown in Table 12.3 were applied across the terminal of a non-linear deviceand the current ma (milliamps) values were observed and recorded. Use Excel’s Add Trendlinefeature to derive a polynomial that best approximates the given data.

Solution:

We enter the given data on the spreadsheet of Figure 12.8 where, for brevity, only a partial list ofthe given data is shown. However, to obtain the plot, we need to enter all data in Columns A andB.

123456789

101112131415161718

A B C D E F Gx y x2 x3 x4 xy x2y1.2 4.5 1.44 1.73 2.07 5.40 6.481.5 5.1 2.25 3.38 5.06 7.65 11.481.8 5.8 3.24 5.83 10.50 10.44 18.792.6 6.7 6.76 17.58 45.70 17.42 45.293.1 7.0 9.61 29.79 92.35 21.70 67.274.3 7.3 18.49 79.51 341.88 31.39 134.984.9 7.6 24.01 117.65 576.48 37.24 182.485.3 7.4 28.09 148.88 789.05 39.22 207.875.7 7.2 32.49 185.19 1055.60 41.04 233.936.4 6.9 40.96 262.14 1677.72 44.16 282.627.1 6.6 50.41 357.91 2541.17 46.86 332.717.6 5.1 57.76 438.98 3336.22 38.76 294.588.6 4.5 73.96 636.06 5470.08 38.70 332.829.2 3.4 84.64 778.69 7163.93 31.28 287.789.8 2.7 96.04 941.19 9223.68 26.46 259.31

x= y= x2= x3= x4= xy= x2y=79.1 87.8 530.15 4004.50 32331.49 437.72 2698.37

123456789

A B C D E F G HMatrix Inversion and Matrix Multiplication for Example 10.3

530.15 79.10 15.00 y= 87.80A= 4004.50 530.15 79.10 xy= 437.72

32331.49 4004.50 530.15 x2y= 2698.37

0.032 -0.016 0.002 a= -0.20A-1= -0.385 0.181 -0.016 b= 1.94

0.979 -0.385 0.032 c= 2.78

Page 472: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 12-9Orchard Publications

Parabolic Regression

Figure 12.7. Parabola for Example 12.3

Following the steps of Example 12.2, we create the plot shown next to the data. Here, the smoothcurve is chosen from the Add trendline feature, but we click on the polynomial order 3 on the Addtrendline Type tab. On the Options tab, we click on Display equation on chart, we click on Display R

squared value on chart, and on OK. The quantity is a measure of the goodness of fit for astraight line or, as in this example, for parabolic regression. This is the Pearson correlationcoefficient and it is discussed in Section 12.5. The correlation coefficient can vary from 0 to 1.

When , there is no relationship between the dependent and independent variables.

When , there is a nearly perfect linear relationship between these variables. Thus, theresult of Example 12.4 indicates that there is a strong linear relationship between the variables and , that is, a nearly perfect fit between the cubic polynomial and the experimental data.

TABLE 12.3 Data for Example 12.4

Experimental Data

Volts 0.00 0.25 0.50 0.75 1.00 1.25 1.50 1.75 2.00 2.25 2.50

ma 0.00 0.01 0.03 0.05 0.08 0.11 0.14 0.18 0.23 0.28 0.34

Volts 2.75 3.00 3.25 3.50 3.75 4.00 4.25 4.50 4.75 5.00

ma 0.42 0.50 0.60 0.72 0.85 1.00 1.18 1.39 1.63 1.91

123456789

1011121314151617

C D E F G H I

y = 0.20x2+1.94x+2.78

012345678

0 1 2 3 4 5 6 7 8 9 10

x

y

R2

r

R2 0 y x

R2 1x

y

Page 473: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 12 Curve Fitting, Regression, and Correlation

12-10 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

Figure 12.8. Plot for the data of Example 12.4

12.4 CovarianceIn probability and statistics, the covariance is a statistical measure of the variance of two randomvariables that are observed or measured in the same mean time period. This measure is equal tothe product of the deviations of corresponding values of the two variables for their respectivemeans.

Let us review the basic statistical averages from Chapter 10.

1.The expected value of a discrete rv that has possible values withprobabilities respectively, is defined as

(12.13)

and if have equal probability of occurrence, then

(12.14)

The expected value is referred to as the mean or average of and it is denoted as .

2. For a continuous rv the expected value is defined as

(12.15)

123456789

1011121314

A B C D

Volts Amps

0.00 0.000.25 0.010.50 0.030.75 0.051.00 0.081.25 0.111.50 0.141.75 0.182.00 0.232.25 0.282.50 0.34

y = 0.0182x3 - 0.0403x2 + 0.1275x - 0.0177R2 = 0.9997

0.000.250.500.751.001.251.501.752.00

0 1 2 3 4 5

E x X x1 x2 xn

P1 P2 Pn

E x x1P1 x2P2 xnPn+ + + xiPii 1=

n= =

x1 x2 xn

E xx1 x2 xn+ + +

n----------------------------------------= =

x1 x2 xn

X E x

E x xf x xd–

=

Page 474: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 12-11Orchard Publications

Covariance

where is the probability density function (pdf) of some distribution.

3. The variance ( ) of is defined as

(12.16)

and the standard deviation is defined as the positive square root of the variance, that is,

(12.17)

The covariance of two random variables and is defined as

(12.18)

If and are independent random variables, then

(12.19)

and if they are completely dependent ,

(12.20)

In general,(12.21)

Excel provides the COVAR(array1,array2) function which returns the average of the products ofpaired deviations. This function uses the relation

(12.22)

Example 12.5

The test scores shown in A2:A11 of the spreadsheet of Figure 12.9 are those achieved by collegestudents enrolled in Section A of a particular course, and B2:B11 are those achieved by differentcollege students enrolled in Section B of the same course, at the same college. Compute thecovariance for these scores using (12.22), and then, verify your answer with the ExcelCOVAR(array1,array2) function.

Solution:

The computations are shown on the spreadsheet of Figure 12.9, where the covariance was foundto be . This value represents the average of the products of deviations of correspondingvalues in the scores of the two sections.

f x

Var X

Var X X2 E x – 2 x – 2f x xd

–= = =

X

X Var X=

Cov X Y X Y

Cov X Y XY E x X– y Y–= =

X Y X Y

Cov X Y XY 0= =

X Y=

Cov X Y XY X Y= =

XY X Y

Cov X Y 1n--- xi x– yi y–

i 1=

n

=

55.81

Page 475: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 12 Curve Fitting, Regression, and Correlation

12-12 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

Figure 12.9. Spreadsheet for Example 12.5

We get the same value with the Excel the formula =COVAR(A2:A11,B2:B11)

12.5 Correlation Coefficient

The population correlation coefficient is a measure of the dependence of the random variables and . It is defined as

(12.23)

and it exists in the interval(12.24)

In other words, the correlation coefficient is a measure of the interdependence of two randomvariables whose values vary from to . These values indicate perfect negative correlation at

, no correlation at zero, and perfect positive correlation at . For instance, the age of an usedcar and its value would indicate a highly negative correlation, whereas the level of education andsalary of an individual would indicate a highly positive correlation. On the other hand, the sales ofgolf balls and cinema attendances would indicate a zero correlation.

Excel provides the =CORREL(array1,array2) function to compute the population correlationcoefficient and uses relation (12.23). For example,=CORREL({59,63,64,70,74,78,79,82,86,92},{70,69,76,79,79,80,86,77,84,90}) returns .

1

23456789

101112

1314

A B C D E Fx y x- x y- y (x- x)(y- y)59 70 -15.70 -8.70 136.5963 69 -11.70 -9.70 113.4964 76 -10.70 -2.70 28.8970 79 -4.70 0.30 -1.4174 76 -0.70 -2.70 1.8978 80 3.30 1.30 4.2979 86 4.30 7.30 31.3982 77 7.30 -1.70 -12.4186 84 11.30 5.30 59.8992 90 17.30 11.30 195.49

x y (x- x)(y- y)= 558.1074.70 78.70 Cov(X,Y)= 55.81

XY

XY

X Y-------------- cov X Y

X Y------------------------= =

1 1–

1– +11– +1

0.877

Page 476: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 12-13Orchard Publications

Correlation Coefficient

Another correlation coefficient is the linear correlation coefficient or Pearson correlation coefficient,and it is denoted as . It indicates the linear relationship between two data sets. In other words, itmeasures the closeness with which the pairs of the data fit a straight line.Excel provides the =PEARSON(array1,array2) function to compute the Pearson correlationcoefficient . It uses the relation

(12.25)

For example,=PEARSON({59,63,64,70,74,78,79,82,86,92},{70,69,76,79,79,80,86,77,84,90}) returns .We observe that this is the same value obtained with the CORREL function.

A third type is the rank correlation coefficient. Here, the data may be ranked in order ofimportance, size, etc., and thus it said to use non-parametric* statistical methods. The rankcorrelation coefficient is computed by Spearman’s formula

(12.26)

where: = differences between ranks of corresponding data in arrays and = number of pairs in arrays and

Excel provides the function =RANK(number,ref,order)wherenumber = the number whose rank we want to findref = an array numbers or a reference to a list of numbers.order = a number which specifies how to rank a number; if 0 or omitted, it ranks a number as ifref were a list sorted in descending order. If order = a non-zero value, it ranks a number as if refwere a list sorted in ascending order.

Also, the =RANK(number,ref,order) function assigns the same rank to duplicate numbers.However, the presence of duplicate numbers affects the ranks of subsequent numbers. Forinstance, if in a list of integers, the number 15 appears twice and has a rank of 8, then 16 would beassigned a rank of 10, that is, no number would have a rank of 9.

Example 12.6

The test scores shown in A2:A11 of the spreadsheet of Figure 12.10 are those achieved by collegestudents enrolled in Section A of a particular course, and in B2:B11, are those achieved by

* A quantity, such as a mean, that is calculated from data and describes a population, is said to have been derived by para-metric statistical methods.

r

r

r n xy x y–

n x2 x 2– n y2 y 2–------------------------------------------------------------------------------=

0.877

rrank 1 6 d 2

n n 1–--------------------–=

d x yn x y

Page 477: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 12 Curve Fitting, Regression, and Correlation

12-14 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

different college students enrolled in Section B of the same course, at the same college. Computethe rank correlation coefficient using (12.26).

Figure 12.10. Spreadsheet for Example 12.6Solution:

The scores are the same as those of Example 12.5. These scores are listed in A2:A11 andB2:B11.Then, the following entries were made:

C2: =RANK(A2,$A$2:$A$11,1)D2: =RANK(B2,$B$2:$B$11,1)

These were copied to C3:D11. The values of , , and were then computed, and was found from (12.26).

In practice, we can construct a correlation matrix to relate two or more items which maycomplement each other. For instance, the sales manager of a computer store may want to find outwhich products complement each other most. The procedure is illustrated with the followingexample.

Example 12.7

The sales manager of a computer store wants to do a sales promotion of a computer system thatdoes not include the monitor, printer, scanner, and an external drive. He has gathered sales datafor the past year, and wants to lower the price of the computer system while at the same time,raising the prices for the monitor, printer, scanner, and the external drive. How can he determinethe correlation among these five items, so he can price them appropriately?

Solution:

We first enter the data in Rows 1 through 4, and in 11 through 14, as shown on the spreadsheet ofFigure 12.11. We also enter the data shown in A5:B9 and in B15:G26.

123456789

101112

13

A B C D E Fx y Rank x Rank y d d2

59 70 1 2 -1 163 69 2 1 1 164 76 3 3 0 070 79 4 6 -2 474 76 5 3 2 478 80 6 7 -1 179 86 7 9 -2 482 77 8 5 3 986 84 9 8 1 192 90 10 10 0 0

d2= 25rrank= 0.8485

d d2 d 2

rrank 0.8485=

Page 478: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 12-15Orchard Publications

Correlation Coefficient

We use Excel’s CORREL(array1,array2) function which returns the correlation coefficientbetween two data sets. We could also use the PEARSON(array1,array2) function and get thesame answers. Thus, in C5:C9 we type the following entries:

=CORREL($C$15:$C$26, C15:C26)=CORREL($D$15:$D$26, C15:C26)=CORREL($E$15:$E$26, C15:C26)=CORREL($F$15:$F$26, C15:C26)=CORREL($G$15:$G$26, C15:C26)

respectively. Then, we highlight C5:C9, we click on Copy, we highlight D5:G5, and we click onPaste. We observe that the correlation coefficients among these 5 sets appear in C5:G9. Thenegative values indicate that the sales of some of the items vary inversely, for example as the salesof printers go up, the sales of scanners go down and vice versa.

Page 479: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 12 Curve Fitting, Regression, and Correlation

12-16 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

Figure 12.11. Spreadsheet for Example 12.7

123456789

1011121314151617181920212223242526

A B C D E F GCorrelation Matrix of Sales Data

System Monitor Printer Scanner Ext. Drive

1 2 3 4 5

System 1 1.0000 0.9749 0.2739 -0.4990 0.7339

Monitor 2 0.9749 1.0000 0.1585 -0.3738 0.7789

Printer 3 0.2739 0.1585 1.0000 -0.6657 0.3830

Scanner 4 -0.4990 -0.3738 -0.6657 1.0000 -0.3517

Ext. Drive 5 0.7339 0.7789 0.3830 -0.3517 1.0000

Historical sales data

Mo/Yr System Monitor Printer Scanner Ext. Drive

1 2 3 4 5

Jan-00 256 242 16 14 12

Feb-00 249 253 14 17 11

Mar-00 254 243 16 19 15

Apr-00 250 256 12 22 14

May-00 252 244 13 17 10

Jun-00 261 227 14 15 9

Jul-00 268 228 16 14 11

Aug-00 257 242 16 14 16

Sep-00 249 246 15 18 13

Oct-00 259 253 15 13 17

Nov-00 362 335 17 12 18

Dec-00 457 445 15 13 21

Page 480: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 12-17Orchard Publications

Summary

12.6 Summary• Curve fitting is the process of finding equations to approximate straight lines and curves that

best fit given sets of data.

• Regression is the process of finding the dependent variable from some data of theindependent variable . Regression can be linear (straight line) or curved (quadratic, cubic,etc.)

• The best fitting straight line or curve has the property that andit is referred to as the least-squares curve. A straight line that satisfies this property is called aleast squares line. If it is a parabola, we call it a least-squares parabola.

• We perform linear regression with the method of least squares. With this method, we computethe coefficients (slope) and (y-intercept) of the straight line equation suchthat the sum of the squares of the errors will be minimum. The values of and can be foundfrom the relations

where,

,

The values of and are computed from

where

• We find the least-squares parabola that fits a set of sample points with wherethe coefficients are found from

where = number of data points.

yx

d12 d2

2 d32+ + + minimum=

m b y mx b+=m b

x2 m x b+ xy=

x m nb+ y=

x sum of the numbers x= y sum of the numbers y=

xy sum of the numbers of the product xy= x2 sum of the numbers x squared=

n number of data x=

m b

mD1------= b

D2------=

x2 xx n

= D1xy xy n

= D2x2 xyx y

=

y ax2 b c+ +=

a b and c

x2 a x b nc+ + y=

x3 a x2 b x c+ + xy=

x4 a x3 b x2 c+ + x2y=

n

Page 481: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 12 Curve Fitting, Regression, and Correlation

12-18 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

• The covariance is a statistical measure of the variance of two random variables and that are observed or measured in the same mean time period. This measure is equal tothe product of the deviations of corresponding values of the two variables for their respectivemeans. In other words,

If and are independent random variables, then

and if they are completely dependent ,

In general,

• The population correlation coefficient is a measure of the dependence of the random variables and . It is defined as

and it exists in the interval

In other words, the correlation coefficient is a measure of the interdependence of two randomvariables whose values vary from to . These values indicate perfect negative correlationat , no correlation at zero, and perfect positive correlation at .

• The linear correlation coefficient or Pearson correlation coefficient, denoted as , indicates thelinear relationship between two data sets. In other words, it measures the closeness with whichthe pairs of the data fit a straight line. It uses the relation

• The rank correlation coefficient is used when it is desired to rank the data in order of importance.The rank correlation coefficient is computed by Spearman’s formula

where = differences between ranks of corresponding data in arrays and , and =number of pairs in arrays and .

Cov X Y XY

Cov X Y XY E x X– y Y–= =

X Y X Y

Cov X Y XY 0= =

X Y=

Cov X Y XY X Y= =

XY X Y

X Y

XY

X Y-------------- cov X Y

X Y------------------------= =

1 1–

1– +11– +1

r

r n xy x y–

n x2 x 2– n y2 y 2–------------------------------------------------------------------------------=

rrank 1 6 d 2

n n 1–--------------------–=

d x y nx y

Page 482: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 12-19Orchard Publications

Exercises

12.7 Exercises1. Consider a system of equations derived from experimental data whose general form is

The values of unknowns x and y can be found from

where

Using these relations, find the values of and that best fit the following equations:

2. Measurements made on an electronics device, yielded the following sets of values:

Use the procedure of Example 12.1 to compute the straight line equation that best fits thegiven data.

3. Repeat Exercise 2 using Excel’s Trendline feature.

4. A sales manager wishes to forecast sales for the next three years, for a company that has beenin business for the past 15 years. The sales during these years are shown below.

millivolts 100 120 140 160 180 200

milliamps 0.45 0.55 0.60 0.70 0.80 0.85

a1x b1y+ c1=

a2x b2y+ c2=

a3x b3y+ c3=

anx bny+ c4=

xD1------= y

D2------=

a2 ab

ab b2= D1

ac ab

bc b2= D2

a2 acab bc

=

x y

2x y+ 1–=

x 3y– 4–=

x 4y+ 3=

3x 2y– 6–=

x– 2y+ 3=

x 3y+ 2=

Page 483: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 12 Curve Fitting, Regression, and Correlation

12-20 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

Using Excel’s Trendline feature, choose an appropriate polynomial to smooth the given data.Then, using the polynomial found, compute the sales for the next three years. You may roundthe sales to the nearest thousand.

Year Sales1 $9,149,5482 13,048,7453 19,147,6874 28,873,1275 39,163,7846 54,545,3697 72,456,7828 89,547,2169 112,642,574

10 130,456,32111 148,678,98312 176,453,83713 207,547,63214 206,147,35215 204,456,987

Page 484: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 12-21Orchard Publications

Solutions to Exercises

12.8 Solutions to Exercises1. We construct the spreadsheet below by entering the given values and computing the values

from the formulas given.

Thus, and

123456789101112131415161718192021222324

A B C D E F G H I JSpreadsheet for Exercise 12.1

a b c a2 ab b2 ac bc

2 1 -1 4 2 1 -2 -11 -3 -4 1 -3 9 -4 121 4 3 1 4 16 3 123 -2 -6 9 -6 4 -18 12

-1 2 3 1 -2 4 -3 61 3 2 1 3 9 2 6

7 5 -3 17 -2 43 -22 47

a2 ab 17 -2= = 727

ab b2 -2 43x=D1/ = -1.172

ac ab -22 -2D1 = = -852

bc b2 47 43y=D2/ = 1.039

a2 ac 17 -22D2 = = 755

ab bc -2 47

x 1.172–= y 1.039=

Page 485: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 12 Curve Fitting, Regression, and Correlation

12-22 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

2. We construct the spreadsheet below by entering the given values and computing the valuesfrom the formulas given.

Thus,

1234567891011121314151617181920212223242526

A B C D E F G H ISpreadsheet for Exercise 12.2

x (mV) y(mA) x2 xy

100 0.45 10000 45120 0.55 14400 66140 0.60 19600 84160 0.70 25600 112180 0.80 32400 144200 0.85 40000 170900 3.95 142000 621

x2 x 142000 900= = 42000

x n 900 6m=D1/ = 0.004

xy x 621 900= = 171

y n 4.0 6b=D2/ = 0.04762

x2 xy 142000 621= = 2000

x y 900 4.0

Milliamps versus Millivolts

0.40

0.60

0.80

1.00

100 120 140 160 180 200

MillivoltsM

illia

mps

y mx b+ 0.004x 0.0476+= =

Page 486: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition 12-23Orchard Publications

Solutions to Exercises

3. Following the procedure of Example 12.2, we get the trendline shown below.

1234567891011121314151617181920212223242526

A B C D E F G H ITrendline for Exercise 12.3

x (mV) y(mA) x2 xy

100 0.45 10000 45120 0.55 14400 66140 0.60 19600 84160 0.70 25600 112180 0.80 32400 144200 0.85 40000 170900 3.95 142000 621

x2 x 142000 900= = 42000

x n 900 6m=D1/ = 0.004

xy x 621 900= = 171

y n 4.0 6b=D2/ = 0.04762

x2 xy 142000 621= = 2000

x y 900 4.0

Milliamps versus Millivolts

0.40

0.60

0.80

1.00

100 120 140 160 180 200

Millivolts

Mill

iam

ps

Page 487: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 12 Curve Fitting, Regression, and Correlation

12-24 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

4. Following the procedure of Example 12.4, we choose Polynomial 4 and we get the trendlineshown below.

The sales for the next 3 years are:

These results indicate that the trendline sets more weight on the last four sales, i.e., years 12,13, 14, and 15, and hence the jump on the year 16 and declines the years 17 and 18.

1 91495482 130487453 191476874 288731275 391637846 545453697 724567828 895472169 112642574

10 13045632111 14867898312 17645383713 20754763214 20614735215 204456987

y = -17797x4 + 436354x3 - 2E+06x2 + 1E+07x -2E+06

R2 = 0.9966

8000000

58000000

108000000

158000000

208000000

258000000

0 5 10 15 20

y16 17797x4– 436354x3 2 106x2– 107x 2 106–+ + x 16=266961792= =

y17 17797x4– 436354x3 2 106x2– 107x 2 106–+ + x 17=247383965= =

y18 17797x4– 436354x3 2 106x2– 107x 2 106–+ + x 18=206558656= =

Page 488: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Introduction to Mathematics for Business, Science, and Technology, Second Edition 13-1Orchard Publications

Chapter 13

Analysis of Variance (ANOVA)

his chapter introduces the Analysis of Variance, briefly known as ANOVA. Both one-wayand two-way ANOVA are discussed, and are illustrated with practical examples.

13.1 IntroductionThe analysis of variance, henceforth referred to as ANOVA, is the analysis of the variation in theoutcomes of an experiment to assess the contribution of each variable to the total variation.ANOVA provides answers to questions such as “In a manufacturing plant, is the day shift reallyproducing units with fewer defects than the swing and graveyard shifts?” Or, “Is one age groupmore productive than others in a department store?” ANOVA makes use of the F distributionwhich we discussed in Chapter 11. It allows us to compare several samples with a single test. It wasdeveloped by the British mathematician R. A. Fisher.

We use ANOVA in situations where we have a number of observed values, and these are dividedamong three or more groups. We want to know whether all these values belong to the same popu-lation, regardless of group, or we want to find out if the observations in at least one of the groupscome from a different population. This determination is made by comparing the variation of val-ues within groups and the variation of values between groups. The variation within groups is com-puted from the variation within groups of samples, whereas the variation between groups is com-puted from the variation among different groups of samples.

The F ratio is the variance between groups divided by the variance within groups, that is,

(13.1)

Once the F ratio is found, we compare it with a value obtained from an F distribution table, todetermine whether the samples are, or are not statistically different. The procedure will be illus-trated with examples.

We will discuss only one- and two-way ANOVA although three-, four-way ANOVA and so on,are also possible.

13.2 One-way ANOVAWe will illustrate one-way ANOVA with the following example.

T

F ratio Variance between groupsVariance within groups

---------------------------------------------------------------------=

Page 489: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 13 Analysis of Variance (ANOVA)

13-2 Introduction to Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

Example 13.1

Suppose that the same test was given to five different groups of students at five different universi-ties denoted as A, B, C, D, and E. Their scores are shown in Table 13.1.

Determine whether or not the statistical averages are significant at the level of confidence.

Solution:

We observe that the groups consist of unequal number of students. For instance, we see that inUniversity B, there is a group of seven students, but the group at University D has only five stu-dents. This is not a problem with one-way ANOVA, that is, the sample sizes need not be equal forall groups of samples.

From Table 13.1 we might get tempted to conclude that the group of students at University Eachieved the highest scores. However, it is possible that observed differences between the meanscores of these groups are not statistically different. To find out, we will perform a one-wayANOVA. The results will reveal whether the differences among the average scores of the groupsof students are significant. If the differences of the averages are not statistically significant, we willconclude that the performance of all groups of students is about the same. However, if we findthat the differences of the averages are statistically significant, we will conclude that the perfor-mance of all five groups of students is not the same. Then, we need to find which group of stu-dents performed best.

The given data and the computations are shown on the spreadsheet of Figure 13.1. For this exam-ple, we want to find out with certainty that there are, or are not significant differencesamong the groups of students.

In the spreadsheet of Figure 13.1, Rows 1 through 11 contain the given data, and range H5:H11shows the sum of the squares.

Formulas for the cells that contain results of computations are given below.

TABLE 13.1 Scores achieved by students at five universities

A B C D E

92 91 87 93 92

94 93 88 94 91

91 92 87 90 94

93 89 90 89 93

94 90 89 91 95

92 89 91 94

91

1%

99%

Page 490: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Introduction to Mathematics for Business, Science, and Technology, Second Edition 13-3Orchard Publications

One-way ANOVA

Figure 13.1. Spreadsheet for one-way ANOVA of Example 13.1

H5: =B5^2+C5^2+D5^2+E5^2+F5^2 and it is copied to H6:H11

B14: =SUM(B4:B13) and it is copied to C14:H14

The COUNT function counts the number of cells that contain numbers in a range. It does notcount blank cells, or cells that contain labels. It is very useful when a spreadsheet contains longranges of numbers, labels, and blank cells. For this example,

B16: =COUNT(B5:B12) and it is copied to C16:F16

123456789

10111213141516171819202122232425262728293031323334353637383940

A B C D E F G HOne-way ANOVA for the scores of five different groups of students

GRAND SUM OFA B C D E TOTALS SQUARES

Scores 92 91 87 93 92 4142794 93 88 94 91 4234691 92 87 90 94 4125093 89 90 89 93 4124094 90 89 91 95 4216392 89 91 94 33502

91 8281

Totals 556 635 532 457 559 2739 250209

No. of samples 6 7 6 5 6 30

Averages 92.67 90.71 88.67 91.40 93.17 91.30

No. of Groups 5

ANOVA Table

Sum of Deg. OfSquares Freedom Variance F-ratio

BetweenGroups 76.17 4 19.04 7.66

WithinGroups 62.13 25 2.49

Totals 138.30 29

F-table Lookup num. 4 denom. 25 4.18at 1% (0.01)

CONCLUSION: Averages are significantly different at 1% level of confidence

Probability that averages are not significantly different is 0.04%

Page 491: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 13 Analysis of Variance (ANOVA)

13-4 Introduction to Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

G16: =SUM(B16:F16)

The averages are shown in B18:G18.

B18: =B14/B16 and it is copied to C18:G18

C20: =COUNT(B5:F5). This counts the number of groups. For this example, it is 5.

The sum of squares between groups is computed from

(13.2)

where:

= sum of each group. For this example, it is range B14:F14.

= number of samples in group. For this example, it is range B16:F16.

= the total number of samples in all groups. For this example, it is cell G16.

We enter the formula of (13.2) in B28.

B28: =B14^2/B16+C14^2/C16+D14^2/D16+E14^2/E16+F14^2/F16-G14^2/G16

The degrees of freedom between groups is the number of groups minus one, that is,

(13.3)

For this example, the number of groups is shown in C20, and in C28.

C28: =C20-1

The variance between groups is obtained from

(13.4)

is shown in D28.

D28: =B28/C28

The sum of squares within groups is computed from

(13.5)

ssbg

ssbgx2

ni-----

x2

n------------------–=

x

ni ith

n

dfbg

dfbg number of groups 1– 5 1– 4= = =

dfbg

bg2

bg2 Sum of Squares Between Groups

Degrees of Freedom Between Groups-------------------------------------------------------------------------------------------------------

ssbgdfbg---------= =

bg2

sswg

sswg x2x

2

n------------------– ssbg–=

Page 492: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Introduction to Mathematics for Business, Science, and Technology, Second Edition 13-5Orchard Publications

One-way ANOVA

where:

= the value of each sample in all groups. For this example, represents the values in rangeA5:F11.

= number of samples in all groups. For this example, it is the number of non-zero entries inrange A5:F11.

= sum of squares between groups as defined in (13.2). For this example, it is cell B28.

is shown in B31.

B31: =H14 G14^2/G16 B28

The degrees of freedom within groups is the total number of samples in all groups minus thenumber of groups, that is,

(13.6)

appears in C31.

C31: =G16-C20

The variance within groups is obtained from

(13.7)

is shown in D31.

D31: =B31/C31

The F ratio is obtained from

(13.8)

The F ratio is shown in E28.

E28: =D28/D31.

B33 shows the sum of the squares of the between groups and within groups, and C33 shows thesum of the degrees of freedom.

B33: =B28+B31 and it is copied to C33. These values are not required in subsequent calculations.

x x

n

ssbg

sswg

dfwg n

dfwg n number of groups– 30 5– 25= = =

dfwg

wg2

wg2 Sum of Squares Within Groups

Degrees of Freedom Within Groups---------------------------------------------------------------------------------------------------

sswgdfwg----------= =

wg2

F ratio Variance Between GroupsVariance Within Groups

-------------------------------------------------------------------------- bg2

wg2

---------= =

Page 493: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 13 Analysis of Variance (ANOVA)

13-6 Introduction to Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

Cell E35 shows the F distribution value. We can obtain this value from an F-distribution table.This value must correspond to the degree of freedom values of and

for level of confidence. The table shows the value of . For convenience,we can use Excel’s FINV function which was discussed in Section 11.9. Thus,

E35: =FINV(0.01,C28,C31)

and this returns . This is the same value that we find in an F-distribution table.

Therefore, with an , and , we can say with probability that there is no significant difference between the scores of the groups of students.Stated in other words, we conclude with probability that there are significant differencesamong the scores of the groups of students.

The entry in A38 makes a comparison of the values of E28 and E35 and displays the appropriatemessage.

A38:="CONCLUSION: Averages are "&IF(E28>E35,"","not ")&"significantly different at 1% levelof confidence."

To find out what the probability is that the scores are not significantly different, we use Excels’FDIST function. We use the formula

G40: =FDIST(7.66,4,25) where 7.66 is the F ratio, 4 is the degrees of freedom for between groups,and 25 is the degrees of freedom for within groups. This returns or

Since we have determined that the results of the ANOVA indicate variation in test scores, wemay want to find out whether there is a significant difference between the test scores in groups Aand E, since these indicate a very close resemblance. Accordingly, we erase the test scores forgroups B, C and D. Doing this, we find that the degrees of freedom between groups is 1, and thedegrees of freedom within groups is . The F ratio for the two groups is and from an F-dis-tribution table, or with the FINV function, we find the value . Since is less than ,we can say with certainty that, statistically, there is no difference between the test scores ofstudent groups A and E.

Figure 13.2 shows the revised spreadsheet that compares groups A and E. This was obtained fromthe spreadsheet of Figure 13.1, where we erased the contents of C5:E12, we entered zeros inC14:E14, we changed the contents of B28 to =B14^2/B16+F14^2/F16 G14^2/G16, and wechanged the value in E35 to .

The Microsoft Excel package contains the Data Analysis Toolpack that provides three ANOVAanalysis tools, the Single Factor Analysis Tool, the Two-Factor with Replication Analysis Tool, andthe Two-Factor without Replication Analysis Tool. The first applies to one-way ANOVA and theothers to two-way ANOVA.

df1 dfbg 4= =

df2 dfwg 25= = 1% 4.18

4.18

F ratio 4.18 df1 dfbg 4= = df2 dfwg 25= = 1%

99%

0.0004 0.04%

10 0.4110.04 0.41 10.04

99%

10.04

Page 494: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Introduction to Mathematics for Business, Science, and Technology, Second Edition 13-7Orchard Publications

One-way ANOVA

Figure 13.2. Revised spreadsheet for one-way ANOVA.

The Single Factor Analysis Tool (one-way ANOVA) computes and displays the averages, vari-ances, degrees of freedom, the F ratio, and the F value shown on tables. Excel denotes the F valueas F critical.

To use the Single Factor Analysis Toolpack* we perform the following steps:

1. We invoke the file that has the spreadsheet of Figure 13.1. We give this file another name, we

* We should make sure that the Data Analysis Toolpack has been installed; if not, we must click on Help to get instructionson how to install it.

123456789

1011121314151617181920212223242526272829303132333435363738

A B C D E F G HOne-way ANOVA for the scores five different groups of students

GRAND SUM OFA B C D E TOTALS SQUARES

Scores 92 92 1692894 91 1711791 94 1711793 93 1729894 95 1786192 94 17300

0

Totals 556 0 0 0 559 1115 103621

No. of samples 6 6 12

Averages 92.67 93.17 92.92

No. of Groups 2

ANOVA Table

Sum of Deg. OfSquares Freedom Variance F-ratio

BetweenGroups 0.75 1 0.75 0.41

WithinGroups 18.17 10 1.82

Totals 18.92 11

F-table Lookup num. 1 denom. 10 10.04at 1% (0.01)

CONCLUSION: Averages are not significantly different

Page 495: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 13 Analysis of Variance (ANOVA)

13-8 Introduction to Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

click on Tools>Data Analysis>Anova: Single Factor>OK.

2. For the Input Range, we type B5:F11, we change the value of Alpha to , and for the Out-put Range, we type I1. Then, Excel displays the data shown in Figure 13.3.

Figure 13.3. One-way ANOVA using Excel’s Single Factor analysis.

For simplicity, the values have been rounded to two decimal places. We observe that these valuesare the same as the corresponding values on the spreadsheet of Figure 13.1. The P-value indicatesthat with certainty, we can say that the averages are not significantly different, or we canstate with certainty, that the averages are significantly different.

13.3 Two-way ANOVAIn one-way ANOVA, there is only one variable to consider. Thus, in Example 1 only the averagescores of different groups of students were considered. In two-way ANOVA we consider two vari-ables. A two-way ANOVA can be two-factor without replication, or a two-factor with replication. Wewill present an example for each.

13.4 Two-factor without Replication ANOVAThis method performs a two-way ANOVA that does not include more than one sampling pergroup. With this method, we must have the same number of samples within each group. We willillustrate this method with the following example.

Example 13.2

The test scores for five groups of students in three universities are shown in Table 13.2.

0.01

123456789

101112131415161718

I J K L M N OAnova: Single Factor

SUMMARYGroups Count Sum Average Variance

Column 1 6 556 92.67 1.47Column 2 7 635 90.71 2.24Column 3 6 532 88.67 2.67Column 4 5 457 91.40 4.30Column 5 6 559 93.17 2.17

ANOVASource of Variation SS df MS F P-value F crit

Between Groups 76.17 4 19.04 7.66 0.0004 4.18Within Groups 62.13 25 2.49

Total 138.3 29

0.04%99.96%

Page 496: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Introduction to Mathematics for Business, Science, and Technology, Second Edition 13-9Orchard Publications

Two-factor without Replication ANOVA

Perform a test at the level of significance to determine whether

a. there is a significant difference in the averages of scores at each university

b. there is a significant difference in the averages of scores in each group

Solution:

Table 13.2 shows only one sample (test score) per group in each of the three universities. Here,we consider the groups of students as one factor, and the universities as the other factor.

As before, we will use a spreadsheet for the computations. This is shown in Figure 13.4. The for-mulas can be found in probability and statistics textbooks.

We enter the given scores in range B4:F6. We compute the row sums and row means with theSUM and AVERAGE functions; we enter these in G4:H6. Using the same functions, we enter thecolumn sums in B8:F8, and the column means in B11:F11.

Using the SUM function, in G9 we enter the grand sum of the column sums B8:F8. Using theAVERAGE function, in G12 we enter the grand mean; this is the mean of the column means. Wedenote the number of rows as , and the number of columns as . We use the COUNT functionto compute the number of rows (universities), and the number of columns (groups). Thus, in B14we type =COUNT(B4:B6), and in B18 we type =COUNT(B4:F4).

The variation between rows, denoted as , is defined as

(13.9)

where:

= number of columns. For this example, it is the number of columns in B through F, that is, 5.It appears in B18.

= number of rows. For this example, it is the number of Rows 4 through 6, that is, 3. It appearsin B14.

TABLE 13.2 Test scores for five groups of students in three universities.

Student Scores in Each Group

Group 1 Group 2 Group 3 Group 4 Group 5

University A 92 91 87 93 95

University B 84 89 81 90 87

University C 88 92 85 89 86

0.01

r c

vr

vr c xi x– 2

i 1=

r=

c

r

Page 497: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 13 Analysis of Variance (ANOVA)

13-10 Introduction to Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

Figure 13.4. Two-way ANOVA without replication.

= the mean of the row. For this example varies from 1 to 3, that is, H4 through H6.

= grand mean. For this example, it is the value in G12.

123456789

1011121314151617181920212223242526272829303132333435363738394041424344454647

A B C D E F G HANOVA: Two-factor without replication

Groups of Students Row Row1 2 3 4 5 Sum Means

University A 92 91 87 93 95 458 91.6University B 84 89 81 90 87 431 86.2University C 88 92 85 89 86 440 88.0

Column Sums 264 272 253 272 268Grand Sum (Sum of Column Sums) 1329

Column Means 88.00 90.67 84.33 90.67 89.33Grand Mean (Mean of Column means) 88.60

Number of rows r = 3Variation of Row Means from Mean of all Columns(H4, H5, and H6 minus G12 squared) vr = 75.60

Number of columns c = 5Variation of Column Means from Mean of all Columns(B11, C11, D11, E11, and F11 minus G12 squared) vc = 82.93

Total variation(Each value of B4 through F6 minus G12 squared) vt = 195.6

Error variation, ve ve = vt vr vc ve 37.07

Degrees of freedom for rows dfr = r 1 dfr = 2Degrees of freedom for columns dfc = c 1 dfc = 4Degrees of freedom for error dfev = dfr * dfc dfev = 8Deg. of freedom for total variation dfr + dfc + dfev = dftv = 14

Mean square for vr msvr = vr/(r 1) msvr = 37.80Mean square for vc msvc = vc/(c 1) msvc = 20.73Mean square for ve msve = ve/[(r 1)*(c 1)] msve = 4.63F ratio for vr = msvr / msve msvr/msve F ratio = 8.16F ratio for vc = msvc / msve msvc/msve F ratio = 4.47

Mean F From F tablesVariations Summary df Square ratio or with FINV

vr = 75.60 2 37.80 8.16 8.65vc = 82.93 4 20.73 4.47 7.01ve = 37.07 8 4.63

vt = vr+vc+ve = 195.60

CONCLUSION 1: At 0.01 level of significance, the averages are not significantly different among universitiesCONCLUSION 2: At 0.01 level of significance, the averages are not significantly different among groups

xi ith i

x

Page 498: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Introduction to Mathematics for Business, Science, and Technology, Second Edition 13-11Orchard Publications

Two-factor without Replication ANOVA

The variation of (13.9) appears in B16, that is,

B16: =B18*((H4 $G$12)^2+(H5 $G$12)^2+(H6 $G$12)^2)

The variation between columns, denoted as , is defined as

(13.10)

where:

= number of rows

= number of columns

= the mean of the column. For this example varies from 1 to 5, that is, B11 through F11.

= grand mean. For this example, it is the value in G12.

The variation of (13.10) appears in B20, that is,

B20: =B14*((B11 $G$12)^2+(C11 $G$12)^2+(D11 $G$12)^2

+(E11 $G$12)^2+(F11 $G$12)^2)

The total variation, denoted as , is defined as

(13.11)

where

= the value in row and column for the entire range of given samples. For this example,it represents the values in B4:F6.

= grand mean. For this example, it is the value in G12.

The variation of (13.11) appears in B23.

B23: =(B4 $G$12)^2+(C4 $G$12)^2+(D4-$G$12)^2+(E4 $G$12)^2+(F4 $G$12)^2+(B5$G$12)^2+(C5 $G$12)^2+(D5 $G$12)^2+(E5 $G$12)^2+(F5 $G$12)^2+(B6$G$12)^2+(C6 $G$12)^2+(D6 $G$12)^2+(E6-$G$12)^2+(F6 $G$12)^2

The variation due to error, or random variation is defined as

(13.12)

The variation of (13.12) appears in B26.

vr

vc

vc r xj x– 2

j 1=

c=

r

c

xj jth j

x

vc

vt

vt xij x– 2

i j

=

xij ith jth

x

vt

ve

ve vt vr vc––=

ve

Page 499: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 13 Analysis of Variance (ANOVA)

13-12 Introduction to Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

B26: =B23 B16 B20

The formulas for the degrees of freedom for rows and for columns are also written on thespreadsheet. These are:

(13.13)

B28: =B14 1(13.14)

B29: =B18 1

The formulas of the degrees of freedom for error variation and total variation appear on thespreadsheet also. These are:

(13.15)

B30: =B28*B29(13.16)

B31: =SUM(B28:B30)

The formulas for the mean squares of , , and , denoted as , , and respec-tively, appear in B33:B35. These are:

(13.17)

B33: =B16/(B14-1)

(13.18)

B34: =B20/(B18-1)

(13.19)

B35: =B26/((B14-1)*(B18-1))

For a two-way ANOVA without replication, we must consider two F ratios; the ratio due to vari-ation between rows, denoted as , and the ratio due to variation between columns,denoted as . These are:

(13.20)

B36: =B33/B35

(13.21)

B37: =B34/B35

dfr dfc

dfr r 1–=

dfc c 1–=

dfev dftv

dfev dfr dfc=

dftv dfr dfr dfev+ +=

vr vc ve msvr msvc msve

msvrvr

r 1–----------------=

msvcvc

c 1–----------------=

msveve

r 1– c 1–---------------------------------=

F ratiovr

F ratiovc

F ratiovrmsvrmsve------------=

F ratiovcmsvcmsve------------=

Page 500: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Introduction to Mathematics for Business, Science, and Technology, Second Edition 13-13Orchard Publications

Two-factor without Replication ANOVA

For convenience, we summarize the degrees of freedom, mean square, and F ratio values inB41:E43.

The final step is to look-up the appropriate F values in an F-distribution table, or compute thesewith the FINV function. We choose the latter. Thus,

F41: =FINV(0.01,2,8) = 8.65

F42: =FINV(0.01,4,8) = 7.01

These values are greater than those obtained by computations; therefore, with level of signif-icance, we can state that the averages are not significantly different, or stated differently, we cansay with certainty, that the averages are significantly different.

Let us check our results with Excel’s Two-factor without replication analysis Toolpack.

We refer to the spreadsheet of Figure 13.5 and we type all labels (words) and values shown inRows 1 through 4. Then, we click on Tools>Data Analysis>Anova: Two-factor Without Replica-tion>OK. On the Anova: Two-Factor Without Replication box we enter the following:

Figure 13.5. Two-way ANOVA without replication with Excel’s Data Analysis.

Input Range: A1:F4. We click on the Labels small box to place a check mark, we change Alpha to

1%

99%

1234567891011121314151617181920212223242526

A B C D E F GGroup1 Group 2 Group 3 Group 4 Group 5

University A 92 91 87 93 95University B 84 89 81 90 87University C 88 92 85 89 86

Anova: Two-Factor Without Replication

SUMMARY Count Sum Average VarianceUniversity A 5 458 91.6 8.8University B 5 431 86.2 13.7University C 5 440 88 7.5

Group1 3 264 88 16Group 2 3 272 90.67 2.33Group 3 3 253 84.33 9.33Group 4 3 272 90.67 4.33Group 5 3 268 89.33 24.33

ANOVASource of Variation SS df MS F P-value F crit

Rows 75.6 2 37.8 8.16 0.01 8.65Columns 82.93 4 20.73 4.47 0.03 7.01Error 37.07 8 4.63

Total 195.6 14

Page 501: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 13 Analysis of Variance (ANOVA)

13-14 Introduction to Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

, we click on Output Range, we type A6 and click on OK. Excel then displays the answersshown in Rows 6 through 26. We observe that these values are the same as before.

13.5 Two-factor with Replication ANOVAThis method is an extension of the one-way ANOVA to include two or more samples for eachgroup of data. In general, let and be two factors. Also, let denote the number of levels ofFactor A and denote the number of levels of Factor B. In a two-factor with replication ANOVA,each level of Factor A is combined with each level of Factor B to form a total of treatments.We will illustrate this method with the following example.

Example 13.3

Suppose that the same test was given to male and female students at five different universitiesdenoted as A, B, C, D, and E, and their scores are shown in Table 13.3. Determine whether

a. averages among university students are significantly different at the level of confidence

b. averages between male and female students are significantly different at the significancelevel

c. there is an interaction between male and female student scores at the significance level

Solution:

As stated earlier, unlike the one-way ANOVA where we can use groups with unequal number ofsamples, with two-way ANOVA we must have the same number of samples within each group.

Table 13.4 shows an alternate method of displaying the information of Table 13.3.

Either the universities or the students’ gender can be chosen as Factor A or Factor B. Suppose wechoose the universities to be Factor A, and the students’ gender as Factor B. Then, A has five lev-els and B has 2 levels. Therefore, , , and there are treatments.

In two-way, three-way ANOVA etc. with replication, we must also consider the interactionbetween conditions. For instance, in Table 13.4, we see that students performance on testsdepends not only on a particular group, but also on the gender* of the students.

We enter the given scores on the spreadsheet of Figure 13.6.

* Of course, this is an example. To suggest that male students make higher grades than female students, or vice versa, isabsurd.

0.01

A B ab

ab

0.01

0.01

0.01

a 5= b 2= ab 5 2 10==

Page 502: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Introduction to Mathematics for Business, Science, and Technology, Second Edition 13-15Orchard Publications

Two-factor with Replication ANOVA

Rows 1 through 22 contain the given scores and the means. The means were computed with theAVERAGE function. We enter the values that define the dimension of the data in D26:D28. Forthis example, Factor A has five levels (universities) and thus . Factor B has two levels(male and female students), and therefore, . We have used the letter to denote the num-ber of scores per group. Then, .

TABLE 13.3 Scores achieved by male and female students at five universities

A B C D E

MaleStudents

Test 1 92 91 87 93 95

Test 2 94 93 88 94 94

Test 3 91 92 87 90 94

Test 4 93 89 90 89 93

FemaleStudents

Test 1 94 90 86 91 93

Test 2 92 89 87 91 91

Test 3 90 91 86 89 92

Test 4 89 89 86 90 92

TABLE 13.4 Alternate method of displaying the scores shown in Table 13.3

Factor AUniversity

Factor BGender

Replicates

Test 1 Test 2 Test 3 Test 4

A Male 92 94 91 93

Female 94 92 90 89

B Male 91 93 91 89

Female 90 89 91 89

C Male 87 88 87 90

Female 86 87 86 86

D Male 93 94 90 89

Female 91 91 89 90

E Male 95 94 94 93

Female 93 91 92 92

a 5=

b 2= rr 4=

Page 503: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 13 Analysis of Variance (ANOVA)

13-16 Introduction to Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

The variation due to interaction is defined as

(13.22)

Recalling that Factor A denotes the universities, and Factor B the gender of the students, in(13.22),

subscript varies from 1 to 2 for rows (levels of Factor B).

subscript varies from 1 to 5 for columns (levels of Factor A).

denotes the mean of each level of Factor A (universities) and each level of Factor B. This is

shown in C10:G10 (male students) and C17:G17 (female students).

denotes the mean of each level of Factor A (universities) and both levels of Factor B (com-

bined means of male and female students). This is shown in C20:G20.

denotes the mean of all levels of Factor A and the first level of Factor B. For this example, it

is the value in H10 (for male students) and H17 (for female students).

denotes the grand mean. For this example is the value in B22.

Accordingly, we enter (13.22) in C32 as

C32: =(C10 C20 $H$10+$B$22)^2 and we copy it to D32:G32.

Also,

C33: =(C17 C19 $H$17+$B$22)^2 and we copy it to D33:G33.

Next, we define the variation between columns, , as

(13.23)

where:

subscript varies from 1 to 4 for number of scores per group.

subscript varies from 1 to 5 for columns (levels of Factor A).

= number of scores per group. For this example, .

= sample value of score in each group of scores in column. For this example, they are

the values in C5:C8 ... G5:G8 (male students), and C12:C15 ... G12:G15 (female students).

vi

vi xAjBixAjB

– xA Bi– x+ 2=

i

j

xAjBi

xAjB

xA Bi

x

vc

vc xkAj2

k 1=

rrxAj

2–=

k

j

r r 4=

xkAjkth jth

Page 504: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Introduction to Mathematics for Business, Science, and Technology, Second Edition 13-17Orchard Publications

Two-factor with Replication ANOVA

Figure 13.6. Spreadsheet for two-way ANOVA with replication.

= mean of sampled values in column. For this example, it appears in C10:G10 (male stu-

dents) and C17:G17 (female students)

Then, we enter (13.23) in C37 as

C37: =C5^2+C6^2+C7^2+C8^2 $D$28*C10^2

and we copy it to D37:G37.

Also,

1234567891011121314151617181920212223242526272829303132333435363738

A B C D E F G HTwo-way ANOVA for scores of five different groups of male and female students

A B C D E OverallMeans

Male Students 92 91 87 93 9594 93 88 94 9491 92 87 90 9493 89 90 89 93

Means 92.50 91.25 88.00 91.50 94.00 91.45

Female Students 94 90 86 91 9392 89 87 91 9190 91 86 89 9289 89 86 90 92

Means 91.25 89.75 86.25 90.25 92.00 89.90

Combined Male &Female Means 91.88 90.50 87.13 90.88 93.00

Grand Mean 90.68

Dimensions of Data Table

b = number of row groups (gender) 2a = number of groups (columns) 5r = number of scores in each group 4

Variation due to interaction

Male Students 0.0225 0.0006 0.0100 0.0225 0.0506Female Students 0.0225 0.0006 0.0100 0.0225 0.0506

Variation between columns

Male Students 5.0000 8.7500 6.0000 17.0000 2.0000Female Students 14.7500 2.7500 0.7500 2.7500 2.0000

xAjjth

Page 505: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 13 Analysis of Variance (ANOVA)

13-18 Introduction to Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

C38: =C12^2+C13^2+C14^2+C15^2 $D$28*C17^2

and we copy it to D38:G38.

The remaining part of the spreadsheet appears in Figure 13.7.

The sum of squares for Factor A is given by

(13.24)

where:

= row groups. For this example , i.e., male and female students. The value of appearsin D26.

Figure 13.7. Remaining part of the spreadsheet of Figure 13.6

ssA

ssA br xjB2

j 1=

aabrx2–=

b b 2= b

4142434445464748495051525354555657585960616263646566676869707172737475

A B C D EComputations

Sum of Deg. Ofsquares freedom Variance F ratio

Factor A 156.15 4 39.04 18.97

Factor B 24.02 1 24.02 11.67

Interaction 0.85 4 0.21 0.10

Error 61.75 30 2.06

Total 242.77 39

Significance tests

Alpha 0.01F values

Factor A

F-table Lookup num. 4 denom. 30 or with FINV 4.02CONCLUSION: Averages are significantlydifferent at the 0.01 level of confidence

Factor B

F-table Lookup num. 1 denom. 30 or with FINV 7.56CONCLUSION: Averages are significantlydifferent at the 0.01 level of confidence

Interaction

F-table Lookup num. 4 denom. 30 or with FINV 4.02CONCLUSION: There is no significant interactionat the 0.01 level of confidence

Page 506: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Introduction to Mathematics for Business, Science, and Technology, Second Edition 13-19Orchard Publications

Two-factor with Replication ANOVA

= number of rows that contain sampled values. For this example, , i.e., number of scoresper gender. The value appears in D28.

The subscript varies from 1 to 5 for columns (levels of Factor A) where and it appears inD27.

denotes the mean of the level of Factor A and the combined levels of Factor B (both gen-

ders). The values appear in C20:G20.

denotes the grand mean. It appears in B22.

For this example, (13.24) appears in B45 as

B45:

=D26*D28*(C20^2+D20^2+E20^2+F20^2+G20^2) D26*D27*D28*B22^2.

The degrees of freedom for Factor A is defined as

(13.25)

Then,

C45: =D27-1

The variance for Factor A is defined as

(13.26)

Then,

D45: =B45/C45

The sum of squares for Factor B is defined as

(13.27)

where

= the mean of the means of each gender. They are shown in H10 and H17. The other vari-

ables are as defined in (13.24).

Then,

B47: =D27*D28*(H10^2+H17^2) D26*D27*D28*B22^2

r r 4=

r

j a 5=

xjB2 jth

x

dfA

dfA a 1–=

A2

A2 ssA

dfA-------=

ssB

ssB ar xA Bi2

i 1=

babrx2–=

xA Bi2

Page 507: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 13 Analysis of Variance (ANOVA)

13-20 Introduction to Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

The degrees of freedom for Factor B is defined as

(13.28)

Then,

C47: =D26 1

The variance for Factor B is defined as

(13.29)

Then,

D47: =B47/C47

The sum of squares for interaction is defined as

(13.30)

where the right side of (13.30) is as defined in (13.22). Then,

B49: =D28*SUM(C32:G33)

The degrees of freedom for interaction is defined as

(13.31)

Then,

C49: =(D27 1)*(D26 1)

The variance for interaction is defined as

(13.32)

Then,

D49: =B49/C49

The sum of squares for error is obtained by summing the formula of (13.23) which representsthe variation between columns, that is,

(13.33)

Then,

dfB

dfB b 1–=

B2

B2 ssB

dfB-------=

ssI

ssI r vi

r xAjBixAjB

– xA Bi– x+ 2= =

dfI

dfI a 1– b 1–=

I2

I2 ssI

dfI------=

ssE

ssE vc xkAj2

k 1=

rrxAj

2–==

Page 508: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Introduction to Mathematics for Business, Science, and Technology, Second Edition 13-21Orchard Publications

Two-factor with Replication ANOVA

B51: =SUM(C37:G38)

The degrees of freedom for error is defined as

(13.34)

Then,

C51: =D27*$D26*(D28 1)

The variance for error is defined as

(13.35)

Then,

D51: =B51/C51

The totals for the sum of squares and degrees of freedom are

B53: =SUM(B45:B51)

C53: =SUM(C45:C51)

In a Two-Factor with replication ANOVA, we consider three F ratios. We denote these as for Factor A, for Factor B, and for Interaction. They are defined as:

(13.36)

(13.37)

(13.38)

Then,

E45: =D45/D51

E47: =D47/D51

E49: =D49/D51

Finally, we make the following entries:

B57: 0.01 (value of alpha; can be changed to 0.05, 0.10, and so on.)

dfE

dfE ab r 1–=

E2

E2 ssE

dfE-------=

F ratioFA F ratioFB F ratioI

F ratioFAVariance for Factor A

Variance for Error---------------------------------------------------------------- A

2

E2

------= =

F ratioFBVariance for Factor B

Variance for Error---------------------------------------------------------------- A

2

E2

------= =

F ratioIVariance for Interaction

Variance for Error---------------------------------------------------------------------- I

2

E2

------= =

Page 509: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 13 Analysis of Variance (ANOVA)

13-22 Introduction to Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

A61: =CONCATENATE("From F table with df1 = "&C45,", df2 = "&C51," or with FINV")

A62: ="CONCLUSION: Averages are "&IF(E45>E61,"","not ")&"significantly"

A63: =CONCATENATE("different at the "&B57," level of confidence")

A67: =CONCATENATE("From F table with df1 = "&C47,", df2 = "&C51," or with FINV")

A68: ="CONCLUSION: Averages are "&IF(E47>E67,"","not ")&"significantly"

A69: =CONCATENATE("different at the "&B57," level of confidence")

A73: =CONCATENATE("From F table with df1 = "&C49,", df2 = "&C51," or with FINV")

A74: ="CONCLUSION: There is "&IF(E49>E73,"a","no ")&" significant interaction"

A75: =CONCATENATE("at the "&B57," level of confidence")

With the FINV function we obtain the values shown in E61, E67, and E72.

E61: =FINV(B57,C45,C51)

E67: =FINV(B57,C47,C51)

E73: =FINV(B57,C49,C51)

Figure 13.8 shows the so-called interaction plot. The upper line indicates that the male students’scores are slightly higher consistently. The fact that the lines are nearly parallel indicates thatthere is no interaction between male and female student scores. If the lines crossed or diverged,we would say that definitely there is some interaction.

Figure 13.8. Interaction plot for two-way ANOVA with replication.

123456789

1011121314151617181920

I J K L M N

Interaction PlotMeans for Male and Female Students

80

84

88

92

96

1 2 3 4 5

Groups

Sco

res

Page 510: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Introduction to Mathematics for Business, Science, and Technology, Second Edition 13-23Orchard Publications

Two-factor with Replication ANOVA

The plot of Figure 13.8 can be produced with Excel’s Chard Wizard as follows:

We click on Chart Wizard icon on the main taskbar, we click on the Line chart type, and on theChart Sub-type, we click on the left chart of the second row. We click Next and on the Data Rangetab. In the Data range box we type C10:G10,C17:G17, and in Series in we click on Rows. We clickon Next, and on the Titles tab make the entries:

Chart title: Interaction Plot

Category (X) axis: Groups

Value (Y) axis: Scores

With the Chart selected (square handles are visible), on the block below the main taskbar weselect Plot Area, we click on small (with hand) box next to it, and we click on the white box tochange the plot from gray to white. We click on OK, we select Value Axis, we click on small boxnext to it, we click on the Scale tab, and we enter the following:

Minimum: 80

Maximum: 96

Major Unit: 4

We click on OK, we select Category Axis, we click on small box next to it, and we type 1 in eachof the three boxes. We click on OK to return to Chart.

We will check the results of Example 13.3 with Excel’s Data Analysis toolpack.

We first arrange the rows and columns as shown in A79:F87 of the spreadsheet of Figure 13.9 andwe perform the following steps:

Tools>Data Analysis>Anova: Two-Factor With Replication>OK, Input Range: A78:F87, Rows persample: 4, Alpha: 0.01, we click on Output Range and there we type A89. Excel then displays thedata shown in A89:G118 where the values have been rounded to two decimal places. We observethat they are the same as before.

Page 511: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 13 Analysis of Variance (ANOVA)

13-24 Introduction to Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

Figure 13.9. Two-way ANOVA with replication using Excel’s Data Analysis tool.

798081828384858687888990919293949596979899

100101102103104105106107108109110111112113114115116117118

A B C D E F GUniv A Univ B Univ C Univ D Univ E

Male Students 92 91 87 93 9594 93 88 94 9491 92 87 90 9493 89 90 89 93

Female Students 94 90 86 91 9392 89 87 91 9190 91 86 89 9289 89 86 90 92

Anova: Two-Factor With Replication

SUMMARY Univ A Univ B Univ C Univ D Univ E TotalMale Students

Count 4 4 4 4 4 20Sum 370 365 352 366 376 1829Average 92.5 91.25 88 91.5 94 91.45Variance 1.67 2.92 2 5.67 0.67 6.16

Female StudentsCount 4 4 4 4 4 20Sum 365 359 345 361 368 1798Average 91.25 89.75 86.25 90.25 92 89.9Variance 4.92 0.92 0.25 0.92 0.67 5.36

TotalCount 8 8 8 8 8Sum 735 724 697 727 744Average 91.88 90.50 87.13 90.88 93.00Variance 3.27 2.29 1.84 3.27 1.71

ANOVASource of Variation SS df MS F P-value F critSample 24.03 1 24.03 11.67 0.00 7.56Columns 156.15 4 39.04 18.97 0.00 4.02Interaction 0.85 4 0.21 0.10 0.98 4.02Within 61.75 30 2.06

Total 242.78 39

Page 512: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Introduction to Mathematics for Business, Science, and Technology, Second Edition 13-25Orchard Publications

Summary

13.6 Summary• We use ANOVA in situations where we have a number of observed values, and these are

divided among three or more groups. We want to know whether all these values belong to thesame population, regardless of group, or we want to find out if the observations in at least oneof the groups come from a different population. This determination is made by comparing thevariation of values within groups and the variation of values between groups. The variationwithin groups is computed from the variation within groups of samples, whereas the variationbetween groups is computed from the variation among different groups of samples.

• We use one-way ANOVA when observations are obtained for A independent groups of sam-ples where the number of observations in each group is B.

• For one-way ANOVA the sum of squares between groups is computed from

where = sum of each group, = number of samples in group, and = the total num-ber of samples in all groups.

• For one-way ANOVA the degrees of freedom between groups is the number of groups minusone, that is,

• For one-way ANOVA the variance between groups is obtained from

• For one-way ANOVA The sum of squares within groups is computed from

where = the value of each sample in all groups, = number of samples in all groups, and = sum of squares between groups.

• For one-way ANOVA the degrees of freedom within groups is the total number of samples in all groups minus the number of groups, that is,

ssbg

ssbgx2

ni-----

x2

n------------------–=

x ni ith n

dfbg

dfbg number of groups 1–=

bg2

bg2 Sum of Squares Between Groups

Degrees of Freedom Between Groups-------------------------------------------------------------------------------------------------------

ssbgdfbg---------= =

sswg

sswg x2x

2

n------------------– ssbg–=

x nssbg

dfwg

n

Page 513: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 13 Analysis of Variance (ANOVA)

13-26 Introduction to Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

• For one-way ANOVA the variance within groups is obtained from

• For one-way ANOVA the F ratio is obtained from

Once the F ratio is found, we compare it with a value obtained from an F distribution table, todetermine whether the samples are, or are not statistically different.

• Excel’s Data Analysis Toolpack provides three ANOVA analysis tools, the Single Factor AnalysisTool, the Two-Factor with Replication Analysis Tool, and the Two-Factor without ReplicationAnalysis Tool. The first applies to one-way ANOVA and the others to two-way ANOVA.

• In two-way ANOVA we consider two variables. A two-way ANOVA can be two-factor withoutreplication, or a two-factor with replication.

• Two-factor without replication ANOVA performs a two-way ANOVA that does not includemore than one sampling per group. With this method, we must have the same number of sam-ples within each group.

• For two-factor without replication ANOVA the variation between rows, denoted as , isdefined as

where = number of columns, = number of rows, = the mean of the row, and =grand mean.

• For two-factor without replication ANOVA the variation between columns, denoted as , isdefined as

where = number of rows, = number of columns, = the mean of the column, and = grand mean.

dfwg n number of groups–=

wg2

wg2 Sum of Squares Within Groups

Degrees of Freedom Within Groups---------------------------------------------------------------------------------------------------

sswgdfwg----------= =

F ratio Variance Between GroupsVariance Within Groups

-------------------------------------------------------------------------- bg2

wg2

---------= =

vr

vr c xi x– 2

i 1=

r=

c r xi ith x

vc

vc r xj x– 2

j 1=

c=

r c xj jth x

Page 514: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Introduction to Mathematics for Business, Science, and Technology, Second Edition 13-27Orchard Publications

Summary

• For two-factor without replication ANOVA the total variation, denoted as , is defined as

where = the value in row and column for the entire range of given samples, and = grand mean.

• For two-factor without replication ANOVA the variation due to error, or random variation isdefined as

• For two-factor without replication ANOVA the degrees of freedom for rows and for col-umns are

and

• For two-factor without replication ANOVA the degrees of freedom for error variation andtotal variation are

and

For two-factor without replication ANOVA the formulas for the mean squares of , , and, denoted as , , and respectively are

• For a two-way ANOVA without replication, we must consider two F ratios; the ratio due tovariation between rows, denoted as , and the ratio due to variation between columns,denoted as . These are:

vt

vt xij x– 2

i j

=

xij ith jth x

ve

ve vt vr vc––=

dfr

dfc

dfr r 1–=

dfc c 1–=

dfev

dftv

dfev dfr dfc=

dftv dfr dfr dfev+ +=

vr vc

ve msvr msvc msve

msvrvr

r 1–----------------=

msvcvc

c 1–----------------=

msveve

r 1– c 1–---------------------------------=

F ratiovr

F ratiovc

Page 515: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 13 Analysis of Variance (ANOVA)

13-28 Introduction to Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

• The two-factor with replication ANOVA is an extension of the one-way ANOVA to includetwo or more samples for each group of data. In general, let and be two factors. Also, let denote the number of levels of Factor A and denote the number of levels of Factor B. In a two-factor with replication ANOVA, each level of Factor A is combined with each level of FactorB to form a total of treatments.

• In two-way, three-way ANOVA etc. with replication, we must also consider the interactionbetween conditions. The variation due to interaction is defined as

where subscript varies from 1 to for rows (levels of Factor B), subscript varies from 1 to for columns (levels of Factor A), denotes the mean of each level of Factor A,

denotes the mean of each level of Factor A and both levels of Factor B, denotes the

mean of all levels of Factor A and the first level of Factor B, and denotes the grand mean.

• For two-factor with replication ANOVA the variation between columns, , is defined as

where the subscript varies from 1 to for rows, subscript varies from 1 to for columns, = number of scores per group, = sample value of score in each group of scores in

column, and = mean of sampled values in column.

• For two-factor with replication ANOVA the sum of squares for Factor A is given by

where = row groups, = number of rows that contain sampled values, the subscript varies

from 1 to (levels of Factor A), denotes the mean of the level of Factor A and the

combined levels of Factor B, and denotes the grand mean.

F ratiovrmsvrmsve------------=

F ratiovcmsvcmsve------------=

A B ab

ab

vi

vi xAjBixAjB

– xA Bi– x+ 2=

i m jn xAjBi

xAjB

xA Bi

x

vc

vc xkAj2

k 1=

rrxAj

2–=

k m j n rxkAj

kth jth

xAjjth

ssA

ssA br xjB2

j 1=

aabrx2–=

b r j

m xjB2 jth

x

Page 516: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Introduction to Mathematics for Business, Science, and Technology, Second Edition 13-29Orchard Publications

Exercises

13.7 Exercises1. The data shown on Table 13.5 below, represent the mileage (miles per gallon) for automobiles

manufactured by five different companies A through E, and these were obtained by differentdrivers in each company. Using one-way ANOVA, perform a test at the 0.05 significance level,to determine whether there is a difference in the mileage for each of the companies. UseExcel’s Data Analysis to verify your answers.

2. The data shown on Table 13.6 below, represent the automobiles assembled in an assembly lineof an automobile manufacturer by three different shifts. Using two-way ANOVA without repli-cation, perform a test at the 0.05 significance level to determine whether there is a differencein the productivity of each shift. Use Excel’s Data Analysis to verify your answers.

3. The annual salaries (in thousands) of male and female employees of four different companies,all of which have department stores in five different cities, are shown on Table 13.7 below. Usea two-way ANOVA with replication, to perform a test at the 0.05 level of significance to deter-mine if there is a significant difference in salaries between

a. gender

b. cities

TABLE 13.5

Company A Company B Company C Company D Company E

32 30 25 33 32

34 32 26 34 31

31 31 29 30 34

33 28 31 29 33

34 29 30 31 35

32 28 28 34

30

TABLE 13.6

Automobiles assembled during days of the week

Monday Tuesday Wednesday Thursday Friday

Day Shift 32 31 27 33 35

Swing Shift 24 29 21 30 27

Graveyard Shift 28 32 25 29 26

Page 517: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 13 Analysis of Variance (ANOVA)

13-30 Introduction to Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

Use Excel’s Data Analysis to verify your answers.

TABLE 13.7

City A City B City C City D City E

MaleEmployees

Company 1 52 51 47 53 55

Company 2 50 49 45 54 52

Company 3 48 50 47 51 52

Company 4 53 51 50 49 51

FemaleEmployees

Company 1 51 50 48 52 56

Company 2 49 48 44 53 51

Company 3 48 49 48 50 51

Company 4 52 54 49 48 50

Page 518: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Introduction to Mathematics for Business, Science, and Technology, Second Edition 13-31Orchard Publications

Solutions to Exercises

13.8 Solutions to Exercises1. We follow the procedure of Example 13.1 and we obtain the spreadsheet below.

With Excel’s Data Analysis Toolpack we get the following data:

123456789

10111213141516171819202122232425262728293031323334353637383940

A B C D E F G HANOVA - DataAutomobile GRAND SUM OFMileage A B C D E TOTALS SQUARES

Computations 32 30 25 33 32 4662Miles per gallon 34 32 26 34 31 4973

31 31 29 30 34 481933 28 31 29 33 476434 29 30 31 35 508332 28 28 34 3748

30 900

Totals 196 208 169 157 199 929 28949

Observations 6 7 6 5 6 30

Averages 32.67 29.71 28.17 31.40 33.17 30.97

No. of Groups 5

ANOVA Table

Sum of Deg. OfSquares Freedom Variance F-ratio

BetweenGroups 105.34 4 26.33 8.71

WithinGroups 75.63 25 3.03

Totals 180.97 29

F-table Lookup num. 4 denom. 25 4.18at 1% (0.01)

CONCLUSION: Averages are significantly different

Probability that averages are not significantly different is 0.02%

Page 519: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 13 Analysis of Variance (ANOVA)

13-32 Introduction to Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

123456789

1011121314151617

I J K L M N OAnova: Single Factor

SUMMARYGroups Count Sum Average Variance

Column 1 6 196 32.66667 1.466667Column 2 7 208 29.71429 2.238095Column 3 6 169 28.16667 5.366667Column 4 5 157 31.4 4.3Column 5 6 199 33.16667 2.166667

ANOVASource of Variation SS df MS F P-value F crit

Between Groups 105.3381 4 26.33452 8.705217 0.000152 4.177423Within Groups 75.62857 25 3.025143

Total 180.9667 29

Page 520: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Introduction to Mathematics for Business, Science, and Technology, Second Edition 13-33Orchard Publications

Solutions to Exercises

2. We follow the procedure of Example 13.2 and we obtain the spreadsheet below.

With Excel’s Data Analysis Toolpack we get the following data:

123456789

1011121314151617181920212223242526272829303132333435363738394041424344454647

A B C D E F G HANOVA: Two-factor without replication

Groups of Students Row RowMon Tue Wed Thu Fri Sum Means

Day Shift 32 31 27 33 35 158 31.6Swing Shift 24 29 21 30 27 131 26.2Graveyard Shift 28 32 25 29 26 140 28.0

Column Sums 84 92 73 92 88Grand Sum (Sum of Column Sums) 429

Column Means 28.00 30.67 24.33 30.67 29.33Grand Mean (Mean of Column means) 28.60

Number of rows r = 3Variation of Row Means from Mean of all Columns(H4, H5, and H6 minus G12 squared) vr = 75.60

Number of columns c = 5Variation of Column Means from Mean of all Columns(B11, C11, D11, E11, and F11 minus G12 squared) vc = 82.93

Total variation(Each value of B4 through F6 minus G12 squared) vt = 195.6

Error variation, ve ve = vt vr vc ve 37.07

Degrees of freedom for rows dfr = r 1 dfr = 2Degrees of freedom for columns dfc = c 1 dfc = 4Degrees of freedom for error dfev = dfr * dfc dfev = 8Deg. of freedom for total variation dfr + dfc + dfev = dftv = 14

Mean square for vr msvr = vr/(r 1) msvr = 37.80Mean square for vc msvc = vc/(c 1) msvc = 20.73Mean square for ve msve = ve/[(r 1)*(c 1)] msve = 4.63F ratio for vr = msvr / msve msvr/msve F ratio = 8.16F ratio for vc = msvc / msve msvc/msve F ratio = 4.47

Mean F From F tablesVariations Summary df Square ratio or with FINV

vr = 75.60 2 37.80 8.16 8.65vc = 82.93 4 20.73 4.47 7.01ve = 37.07 8 4.63

vt = vr+vc+ve = 195.60

CONCLUSION 1: At 0.01 level of significance, the averages are not significantly different among shiftsCONCLUSION 2: At 0.01 level of significance, the averages are not significantly different among days

Page 521: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 13 Analysis of Variance (ANOVA)

13-34 Introduction to Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

3. We follow the procedure of Example 13.3 and we obtain the spreadsheet shown on Page 35and continued on Page 36.

123456789

101112131415161718192021

J K L M N O PAnova: Two-Factor Without Replication

SUMMARY Count Sum Average VarianceRow 1 5 158 31.6 8.8Row 2 5 131 26.2 13.7Row 3 5 140 28 7.5

Column 1 3 84 28 16Column 2 3 92 30.66667 2.333333Column 3 3 73 24.33333 9.333333Column 4 3 92 30.66667 4.333333Column 5 3 88 29.33333 24.33333

ANOVASource of Variation SS df MS F P-value F critRows 75.6 2 37.8 8.158273 0.011715 8.649067Columns 82.93333 4 20.73333 4.47482 0.03427 7.006065Error 37.06667 8 4.633333

Total 195.6 14

Page 522: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Introduction to Mathematics for Business, Science, and Technology, Second Edition 13-35Orchard Publications

Solutions to Exercises

123456789

1011121314151617181920212223242526272829303132333435363738394041424344454647484950515253

A B C D E F G HTwo-way ANOVA with replication - Salaries (in thousands) for maleand female employees in 4 different companies and 5 different cities

A B C D E OverallMeans

Male Employees 52 51 47 53 5550 49 45 54 5248 50 47 51 5253 51 50 49 51

Means 50.75 50.25 47.25 51.75 52.50 50.5

Female Employees 51 50 48 52 5649 48 44 53 5148 49 48 50 5152 54 49 48 50

Means 50.00 50.25 47.25 50.75 52.00 50.05

Combined Male &Female Means 50.38 50.25 47.25 51.25 52.25

Grand Mean 50.28

Dimensions of Data Table

b = number of row groups (gender) 2a = number of groups (columns) 5r = number of scores in each group 4

Variation due to interaction

Male Students 0.0225 0.0506 0.0506 0.07562 0.0006Female Students 0.0225 0.0506 0.0506 0.07562 0.0006

Variation between columns

Male Students 14.7500 2.7500 12.7500 14.7500 9.0000Female Students 10.0000 20.7500 14.7500 14.7500 22.0000

ComputationsSum of Deg. Ofsquares freedom Variance F ratio

Factor A 112.1 4 28.03 6.17

Factor B 2.02 1 2.02 0.45

Interaction 1.6 4 0.40 0.09

Error 136.25 30 4.54

Total 251.98 39

Page 523: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 13 Analysis of Variance (ANOVA)

13-36 Introduction to Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

The interaction plot is shown below

5556575859606162636465666768697071727374757677

A B C D ESignificance tests

Alpha 0.01F values

Factor A

From F table with df1 = 4, df2 = 30 or with FINV 4.02CONCLUSION: Averages are significantlydifferent at the 0.01 level of confidence

Factor B

From F table with df1 = 1, df2 = 30 or with FINV 7.56CONCLUSION: Averages are not significantlydifferent at the 0.01 level of confidence

Interaction

From F table with df1 = 4, df2 = 30 or with FINV 4.02CONCLUSION: There is no significant interactionat the 0.01 level of confidence

Interaction PlotMeans for Male and Female

Employees

46

50

54

1 2 3 4 5

Cities

Sala

ries

Page 524: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Introduction to Mathematics for Business, Science, and Technology, Second Edition 13-37Orchard Publications

Solutions to Exercises

With Excel’s Data Analysis Toolpack we get the following data:

8990919293949596979899100101102103104105106107108109110111112113114115116117118

A B C D E F GAnova: Two-Factor With Replication

SUMMARY City A City B City C City D City E TotalMale Employees

Count 4 4 4 4 4 20Sum 203 201 189 207 210 1010Average 50.75 50.25 47.25 51.75 52.5 50.5Variance 4.91667 0.91667 4.25 4.916667 3 6.26316

Female EmployeesCount 4 4 4 4 4 20Sum 200 201 189 203 208 1001Average 50 50.25 47.25 50.75 52 50.05Variance 3.33333 6.91667 4.916667 4.916667 7.33333 6.89211

TotalCount 8 8 8 8 8Sum 403 402 378 410 418Average 50.375 50.25 47.25 51.25 52.25Variance 3.69643 3.35714 3.928571 4.5 4.5

ANOVASource of Variation SS df MS F P-value F critSample 2.025 1 2.025 0.445872 0.50941 7.56245Columns 112.1 4 28.025 6.170642 0.00095 4.01786Interaction 1.6 4 0.4 0.088073 0.98549 4.01786Within 136.25 30 4.541667

Total 251.975 39

Page 525: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Chapter 13 Analysis of Variance (ANOVA)

13-38 Introduction to Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

NOTES

Page 526: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition A-1Orchard Publications

Appendix AIntroduction to MATLAB®

his appendix serves as an introduction to the basic MATLAB commands and functions,procedures for naming and saving the user generated files, comment lines, access to MAT-LAB’s Editor/Debugger, finding the roots of a polynomial, and making plots. Several exam-

ples are provided with detailed explanations.

A.1 MATLAB® and Simulink®MATLAB ® and Simulink ® are products of The MathWorks, Inc. These are two outstandingsoftware packages for scientific and engineering computations and are used in educational institu-tions and in industries including automotive, aerospace, electronics, telecommunications, andenvironmental applications. MATLAB enables us to solve many advanced numerical problemsfast and efficiently. Simulink is a block diagram tool used for modeling and simulating dynamicsystems such as controls, signal processing, and communications. In this appendix we will discussMATLAB only.

A.2 Command WindowTo distinguish the screen displays from the user commands, important terms, and MATLABfunctions, we will use the following conventions:

Click: Click the left button of the mouseCourier Font: Screen displays Helvetica Font: User inputs at MATLAB’s command window prompt >> or EDU>>*

Helvetica Bold: MATLAB functions

Times Bold Italic: Important terms and facts, notes and file names

When we first start MATLAB, we see the toolbar on top of the command screen and the promptEDU>>. This prompt is displayed also after execution of a command; MATLAB now waits for anew command from the user. It is highly recommended that we use the Editor/Debugger to writeour program, save it, and return to the command screen to execute the program as explainedbelow.

To use the Editor/Debugger:

1. From the File menu on the toolbar, we choose New and click on M-File. This takes us to the

* EDU>> is the MATLAB prompt in the Student Version

T

Page 527: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Appendix A Introduction to MATLAB®

A-2 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

Editor Window where we can type our code (list of statements) for a new file, or open a previ-ously saved file. We must save our program with a file name which starts with a letter. Impor-tant! MATLAB is case sensitive, that is, it distinguishes between upper- and lower-case let-ters. Thus, t and T are two different letters in MATLAB language. The files that we create aresaved with the file name we use and the extension .m; for example, myfile01.m. It is a goodpractice to save the code in a file name that is descriptive of our code content. For instance, ifthe code performs some matrix operations, we ought to name and save that file asmatrices01.m or any other similar name. We should also use a floppy disk to backup our files.

2. Once the code is written and saved as an m-file, we may exit the Editor/Debugger window byclicking on Exit Editor/Debugger of the File menu. MATLAB then returns to the commandwindow.

3. To execute a program, we type the file name without the .m extension at the >> prompt; then,we press <enter> and observe the execution and the values obtained from it. If we have savedour file in drive a or any other drive, we must make sure that it is added it to the desired direc-tory in MATLAB’s search path. The MATLAB User’s Guide provides more information.

Henceforth, it will be understood that each input command is typed after the >> prompt and fol-lowed by the <enter> key.

The command help matlab\iofun will display input/output information. To get help with otherMATLAB topics, we can type help followed by any topic from the displayed menu. For example,to get information on graphics, we type help matlab\graphics. The MATLAB User’s Guide con-tains numerous help topics.

To appreciate MATLAB’s capabilities, we type demo and we see the MATLAB Demos menu. Wecan do this periodically to become familiar with them. Whenever we want to return to the com-mand window, we click on the Close button.

When we are done and want to leave MATLAB, we type quit or exit. But if we want to clear allprevious values, variables, and equations without exiting, we should use the command clear. Thiscommand erases everything; it is like exiting MATLAB and starting it again. The command clcclears the screen but MATLAB still remembers all values, variables and equations that we havealready used. In other words, if we want to clear all previously entered commands, leaving onlythe >> prompt on the upper left of the screen, we use the clc command.

All text after the % (percent) symbol is interpreted as a comment line by MATLAB, and thus it isignored during the execution of a program. A comment can be typed on the same line as the func-tion or command or as a separate line. For instance,

conv(p,q) % performs multiplication of polynomials p and q.% The next statement performs partial fraction expansion of p(x) / q(x)

are both correct.

Page 528: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition A-3Orchard Publications

Roots of Polynomials

One of the most powerful features of MATLAB is the ability to do computations involving com-plex numbers. We can use either , or to denote the imaginary part of a complex number, suchas 3-4i or 3-4j. For example, the statement

z=3-4j

displays z = 3.0000-4.0000i

In the above example, a multiplication (*) sign between 4 and was not necessary because thecomplex number consists of numerical constants. However, if the imaginary part is a function, orvariable such as , we must use the multiplication sign, that is, we must type cos(x)*j orj*cos(x) for the imaginary part of the complex number.

A.3 Roots of Polynomials

In MATLAB, a polynomial is expressed as a row vector of the form .These are the coefficients of the polynomial in descending order. We must include terms whosecoefficients are zero.

We find the roots of any polynomial with the roots(p) function; p is a row vector containing thepolynomial coefficients in descending order.

Example A.1

Find the roots of the polynomial

Solution:

The roots are found with the following two statements where we have denoted the polynomial asp1, and the roots as roots_ p1.

p1=[1 10 35 50 24]% Specify and display the coefficients of p1(x)

p1 =

1 -10 35 -50 24

roots_ p1=roots(p1) % Find the roots of p1(x)

roots_p1 =

4.0000

3.0000

2.0000

1.0000

i j

j

xcos

an an 1– a2 a1 a0

p1 x x4

10x3– 35x

250x– 24+ +=

Page 529: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Appendix A Introduction to MATLAB®

A-4 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

We observe that MATLAB displays the polynomial coefficients as a row vector, and the roots as acolumn vector.

Example A.2

Find the roots of the polynomial

Solution:

There is no cube term; therefore, we must enter zero as its coefficient. The roots are found withthe statements below, where we have defined the polynomial as p2, and the roots of this polyno-mial as roots_ p2. The result indicates that this polynomial has three real roots, and two complexroots. Of course, complex roots always occur in complex conjugate* pairs.

p2=[1 7 0 16 25 52]

p2 =

1 -7 0 16 25 52

roots_ p2=roots(p2)

roots_ p2 =

6.5014

2.7428

-1.5711

-0.3366+ 1.3202i

-0.3366- 1.3202i

A.4 Polynomial Construction from Known RootsWe can compute the coefficients of a polynomial, from a given set of roots, with the poly(r) func-tion where r is a row vector containing the roots.

Example A.3

It is known that the roots of a polynomial are . Compute the coefficients of thispolynomial.

* By definition, the conjugate of a complex number is

p2 x x5

7x4– 16x

225x+ + 52+=

A a jb+= A a jb–=

1 2 3 and 4

Page 530: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition A-5Orchard Publications

Polynomial Construction from Known Roots

Solution:

We first define a row vector, say , with the given roots as elements of this vector; then, we findthe coefficients with the poly(r) function as shown below.

r3=[1 2 3 4] % Specify the roots of the polynomial

r3 =

1 2 3 4

poly_r3=poly(r3) % Find the polynomial coefficients

poly_r3 =

1 -10 35 -50 24

We observe that these are the coefficients of the polynomial of Example A.1.

Example A.4

It is known that the roots of a polynomial are Find the coefficientsof this polynomial.

Solution:

We form a row vector, say , with the given roots, and we find the polynomial coefficients withthe poly(r) function as shown below.

r4=[ 1 2 3 4+5j 4 5j ]

r4 =

Columns 1 through 4

-1.0000 -2.0000 -3.0000 -4.0000+ 5.0000i

Column 5

-4.0000- 5.0000i

poly_r4=poly(r4)

poly_r4 =

1 14 100 340 499 246

Therefore, the polynomial is

r3

p1 x

1 2 3 4 j5 and 4 j5–+–––

r4

p4 x x5

14x4

100x3

340x2

499x 246+ + + + +=

Page 531: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Appendix A Introduction to MATLAB®

A-6 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

A.5 Evaluation of a Polynomial at Specified Values

The polyval(p,x) function evaluates a polynomial at some specified value of the indepen-dent variable .

Example A.5

Evaluate the polynomial

(A.1)at .

Solution:

p5=[1 3 0 5 4 3 2]; % These are the coefficients

% The semicolon (;) after the right bracket suppresses the display of the row vector

% that contains the coefficients of p5.

%

val_minus3=polyval(p5, -3) % Evaluate p5 at x= 3; no semicolon is used here

% because we want the answer to be displayed

val_minus3 =

1280

Other MATLAB functions used with polynomials are the following:

conv(a,b) multiplies two polynomials a and b

[q,r]=deconv(c,d) divides polynomial c by polynomial d and displays the quotient q andremainder r.

polyder(p) produces the coefficients of the derivative of a polynomial p.

Example A.6

Let

and

Compute the product using the conv(a,b) function.

p xx

p5 x x6 3x5– 5x3 4x2– 3x 2+ + +=x 3–=

p1 x5 3x4– 5x2 7x 9+ + +=

p2 2x6 8x4– 4x2 10x 12+ + +=

p1 p2

Page 532: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition A-7Orchard Publications

Evaluation of a Polynomial at Specified Values

Solution:

p1=[1 3 0 5 7 9];% The coefficients of p1

p2=[2 0 8 0 4 10 12];% The coefficients of p2

p1p2=conv(p1,p2) % Multiply p1 by p2 to compute coefficients of the product p1p2

p1p2 =

2 -6 -8 34 18 -24 -74 -88 78 166 174 108

Therefore,

Example A.7

Let

and

Compute the quotient using the [q,r]=deconv(c,d) function.

Solution:

% It is permissible to write two or more statements in one line separated by semicolons

p3=[1 0 3 0 5 7 9]; p4=[2 8 0 0 4 10 12]; [q,r]=deconv(p3,p4)

q =

0.5000

r =

0 4 -3 0 3 2 3

Therefore,

Example A.8

Let

p1 p2 2x11 6x10 8x9–– 34x8 18x7 24x6–+ +=

74x5 88x4 78x3 166x2 174x 108+ + + +––

p3 x7 3x5– 5x3 7x 9+ + +=

p4 2x6 8x5– 4x2 10x 12+ + +=

p3 p4

q 0.5= r 4x5 3x4– 3x2 2x 3+ + +=

p5 2x6 8x4– 4x2 10x 12+ + +=

Page 533: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Appendix A Introduction to MATLAB®

A-8 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

Compute the derivative using the polyder(p) function.

Solution:

p5=[2 0 8 0 4 10 12]; % The coefficients of p5

der_p5=polyder(p5) % Compute the coefficients of the derivative of p5

der_p5 =

12 0 -32 0 8 10

Therefore,

A.6 Rational PolynomialsRational Polynomials are those which can be expressed in ratio form, that is, as

(A.2)

where some of the terms in the numerator and/or denominator may be zero. We can find the rootsof the numerator and denominator with the roots(p) function as before.

As noted in the comment line of Example A.7, we can write MATLAB statements in one line, ifwe separate them by commas or semicolons. Commas will display the results whereas semicolonswill suppress the display.

Example A.9

Let

Express the numerator and denominator in factored form, using the roots(p) function.

Solution:

num=[1 3 0 5 7 9]; den=[1 0 4 0 2 5 6];% Do not display num and den coefficients

roots_num=roots(num), roots_den=roots(den) % Display num and den roots

roots_num =

ddx------p5

ddx------p5 12x5 32x3– 4x2 8x 10+ + +=

R x Num xDen x-------------------

bnxn bn 1– xn 1– bn 2– xn 2– b1x b0+ + + + +

amxm am 1– xm 1– am 2– xm 2– a1x a0+ + + + +-------------------------------------------------------------------------------------------------------------------= =

R xpnumpden----------- x5 3x4– 5x2 7x 9+ + +

x6 4x4– 2x2 5x 6+ + +--------------------------------------------------------= =

Page 534: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition A-9Orchard Publications

Rational Polynomials

2.4186+ 1.0712i 2.4186- 1.0712i -1.1633

-0.3370+ 0.9961i -0.3370- 0.9961i

roots_den =

1.6760+0.4922i 1.6760-0.4922i -1.9304

-0.2108+0.9870i -0.2108-0.9870i -1.0000

As expected, the complex roots occur in complex conjugate pairs.

For the numerator, we have the factored form

and for the denominator, we have

We can also express the numerator and denominator of this rational function as a combination oflinear and quadratic factors. We recall that, in a quadratic equation of the form whose roots are and , the negative sum of the roots is equal to the coefficient of the term, that is, , while the product of the roots is equal to the constant term , thatis, . Accordingly, we form the coefficient by addition of the complex conjugate rootsand this is done by inspection; then we multiply the complex conjugate roots to obtain the con-stant term using MATLAB as follows:

(2.4186 + 1.0712i)*(2.4186 1.0712i)

ans = 6.9971

( 0.3370+ 0.9961i)*( 0.3370 0.9961i)

ans = 1.1058

(1.6760+ 0.4922i)*(1.6760 0.4922i)

ans = 3.0512

( 0.2108+ 0.9870i)*( 0.2108 0.9870i)

ans = 1.0186

Thus,

pnum x 2.4186– j1.0712– x 2.4186– j1.0712+ x 1.1633+=

x 0.3370 j0.9961–+ x 0.3370 j0.9961+ +

pden x 1.6760– j0.4922– x 1.6760– j0.4922+ x 1.9304+=

x 0.2108 j– 0.9870+ x 0.2108 j0.9870+ + x 1.0000+

x2 bx c+ + 0=

x1 x2 b x

x1 x2+– b= c

x1 x2 c= b

c

R xpnumpden----------- x2 4.8372x– 6.9971+ x2 0.6740x 1.1058+ + x 1.1633+

x2 3.3520x– 3.0512+ x2 0.4216x 1.0186+ + x 1.0000+ x 1.9304+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------= =

Page 535: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Appendix A Introduction to MATLAB®

A-10 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

We can check this result with MATLAB’s Symbolic Math Toolbox which is a collection of tools(functions) used in solving symbolic expressions. They are discussed in detail in MATLAB’s UsersManual. For the present, our interest is in using the collect(s) function that is used to multiplytwo or more symbolic expressions to obtain the result in polynomial form. We must rememberthat the conv(p,q) function is used with numeric expressions only, that is, polynomial coeffi-cients.

Before using a symbolic expression, we must create one or more symbolic variables such as x, y, t,and so on. For our example, we use the following code:

syms x % Define a symbolic variable and use collect(s) to express numerator in polynomial form

collect((x^2 4.8372*x+6.9971)*(x^2+0.6740*x+1.1058)*(x+1.1633))

ans =

x^5-29999/10000*x^4-1323/3125000*x^3+7813277909/1562500000*x^2+1750276323053/250000000000*x+4500454743147/500000000000

and if we simplify this, we find that is the same as the numerator of the given rational expressionin polynomial form. We can use the same procedure to verify the denominator.

A.7 Using MATLAB to Make PlotsQuite often, we want to plot a set of ordered pairs. This is a very easy task with the MATLABplot(x,y) command that plots versus . Here, is the horizontal axis (abscissa) and is the ver-tical axis (ordinate).

Example A.10

Consider the electric circuit of Figure A.1, where the radian frequency (radians/second) of theapplied voltage was varied from 300 to 3000 in steps of 100 radians/second, while the amplitudewas held constant. The ammeter readings were then recorded for each frequency. The magnitudeof the impedance was computed as and the data were tabulated on Table A.1.

Figure A.1. Electric circuit for Example A.10

Plot the magnitude of the impedance, that is, versus radian frequency .

y x x y

Z Z V A=

A

V

R

L

C

Z

Page 536: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition A-11Orchard Publications

Using MATLAB to Make Plots

Solution:

We cannot type (omega) in the MATLAB command window, so we will use the English letterw instead.

If a statement, or a row vector is too long to fit in one line, it can be continued to the next line bytyping three or more periods, then pressing <enter> to start a new line, and continue to enterdata. This is illustrated below for the data of w and z. Also, as mentioned before, we use the semi-colon (;) to suppress the display of numbers that we do not care to see on the screen.

The data are entered as follows:

w=[300 400 500 600 700 800 900 1000 1100 1200 1300 1400 1500 1600 1700 1800 1900....

2000 2100 2200 2300 2400 2500 2600 2700 2800 2900 3000];

%

z=[39.339 52.789 71.104 97.665 140.437 222.182 436.056....

1014.938 469.830 266.032 187.052 145.751 120.353 103.111....

90.603 81.088 73.588 67.513 62.481 58.240 54.611 51.468....

48.717 46.286 44.122 42.182 40.432 38.845];

Of course, if we want to see the values of w or z or both, we simply type w or z, and we press

TABLE A.1 Table for Example A.10

(rads/s) |Z| Ohms (rads/s) |Z| Ohms300 39.339 1700 90.603400 52.589 1800 81.088500 71.184 1900 73.588600 97.665 2000 67.513700 140.437 2100 62.481800 222.182 2200 58.240900 436.056 2300 54.611

1000 1014.938 2400 51.4281100 469.83 2500 48.7171200 266.032 2600 46.2861300 187.052 2700 44.1221400 145.751 2800 42.1821500 120.353 2900 40.4321600 103.111 3000 38.845

Page 537: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Appendix A Introduction to MATLAB®

A-12 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

<enter>. To plot ( -axis) versus ( -axis), we use the plot(x,y) command. For this example,we use plot(w,z). When this command is executed, MATLAB displays the plot on MATLAB’sgraph screen. This plot is shown in Figure A.2.

Figure A.2. Plot of impedance versus frequency for Example A.10

This plot is referred to as the amplitude frequency response of the circuit.

To return to the command window, we press any key, or from the Window pull-down menu, weselect MATLAB Command Window. To see the graph again, we click on the Window pull-downmenu, and we select Figure.

We can make the above, or any plot, more presentable with the following commands:

grid on: This command adds grid lines to the plot. The grid off command removes the grid. Thecommand grid toggles them, that is, changes from off to on or vice versa. The default* is off.

box off: This command removes the box (the solid lines which enclose the plot), and box onrestores the box. The command box toggles them. The default is on.

title(‘string’): This command adds a line of the text string (label) at the top of the plot.

* A default is a particular value for a variable that is assigned automatically by an operating system and remains in effectunless canceled or overridden by the operator.

z y w x

0 500 1000 1500 2000 25000

200

400

600

800

1000

1200

z

Page 538: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition A-13Orchard Publications

Using MATLAB to Make Plots

xlabel(‘string’) and ylabel(‘string’) are used to label the - and -axis respectively.

The amplitude frequency response is usually represented with the -axis in a logarithmic scale.We can use the semilogx(x,y) command that is similar to the plot(x,y) command, except thatthe -axis is represented as a log scale, and the -axis as a linear scale. Likewise, the semil-ogy(x,y) command is similar to the plot(x,y) command, except that the -axis is represented as alog scale, and the -axis as a linear scale. The loglog(x,y) command uses logarithmic scales forboth axes.

Throughout this text it will be understood that log is the common (base 10) logarithm, and ln isthe natural (base e) logarithm. We must remember, however, the function log(x) in MATLAB isthe natural logarithm, whereas the common logarithm is expressed as log10(x), and the logarithmto the base as log2(x).

Let us now redraw the plot with the above options by adding the following statements:

semilogx(w,z); grid; % Replaces the plot(w,z) command

title('Magnitude of Impedance vs. Radian Frequency');

xlabel('w in rads/sec'); ylabel('|Z| in Ohms')

After execution of these commands, our plot is as shown in Figure A.3.

If the -axis represents power, voltage or current, the -axis of the frequency response is moreoften shown in a logarithmic scale, and the -axis in dB (decibels). The decibel unit is defined inChapter 1.

To display the voltage in a dB scale on the y-axis, we add the relation dB=20*log10(v), and wereplace the semilogx(w,z) command with semilogx(w,dB).

The command gtext(‘string’)* switches to the current Figure Window, and displays a cross-hairthat can be moved around with the mouse. For instance, we can use the command gtext(‘Imped-ance |Z| versus Frequency’), and this will place a cross-hair in the Figure window. Then, usingthe mouse, we can move the cross-hair to the position where we want our label to begin, and wepress <enter>.

The command text(x,y,’string’) is similar to gtext(‘string’). It places a label on a plot in some spe-cific location specified by x and y, and string is the label which we want to place at that location.We will illustrate its use with the following example that plots a 3-phase sinusoidal waveform.

The first line of the code below has the form

* With MATLAB Versions 6 and higher we can add text, lines and arrows directly into the graph using the tools provided onthe Figure Window.

x y

x

x yy

x

2

y xy

v

Page 539: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Appendix A Introduction to MATLAB®

A-14 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

Figure A.3. Modified frequency response plot of Figure A.2.

linspace(first_value, last_value, number_of_values)

This function specifies the number of data points but not the increments between data points. Analternate function is

x=first: increment: last

and this specifies the increments between points but not the number of data points.

The code for the 3-phase plot is as follows:

x=linspace(0, 2*pi, 60);% pi is a built-in function in MATLAB;

% we could have used x=0:0.02*pi:2*pi or x = (0: 0.02: 2)*pi instead;

y=sin(x); u=sin(x+2*pi/3); v=sin(x+4*pi/3);

plot(x,y,x,u,x,v);% The x-axis must be specified for each function

grid on, box on,% turn grid and axes box on

text(0.75, 0.65, 'sin(x)'); text(2.85, 0.65, 'sin(x+2*pi/3)'); text(4.95, 0.65, 'sin(x+4*pi/3)')

These three waveforms are shown on the same plot of Figure A.4.

102

103

104

0

200

400

600

800

1000

1200

Page 540: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition A-15Orchard Publications

Using MATLAB to Make Plots

Figure A.4. Three-phase waveforms

In our previous examples, we did not specify line styles, markers, and colors for our plots. How-ever, MATLAB allows us to specify various line types, plot symbols, and colors. These, or a com-bination of these, can be added with the plot(x,y,s) command, where s is a character string con-taining one or more characters shown on the three columns of Table A.2. MATLAB has nodefault color; it starts with blue and cycles through the first seven colors listed in Table A.2 foreach additional line in the plot. Also, there is no default marker; no markers are drawn unlessthey are selected. The default line is the solid line.

For example, plot(x,y,'m*:') plots a magenta dotted line with a star at each data point, andplot(x,y,'rs') plots a red square at each data point, but does not draw any line because no line wasselected. If we want to connect the data points with a solid line, we must type plot(x,y,'rs '). Foradditional information we can type help plot in MATLAB’s command screen.

The plots we have discussed thus far are two-dimensional, that is, they are drawn on two axes.MATLAB has also a three-dimensional (three-axes) capability and this is discussed next.

The plot3(x,y,z) command plots a line in 3-space through the points whose coordinates are theelements of , , and , where , , and are three vectors of the same length.

0 1 2 3 4 5 6 7-1

-0.8

-0.6

-0.4

-0.2

0

0.2

0.4

0.6

0.8

1

sin(x) sin(x+2*pi/3) sin(x+4*pi/3)

x y z x y z

Page 541: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Appendix A Introduction to MATLAB®

A-16 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

The general format is plot3(x1,y1,z1,s1,x2,y2,z2,s2,x3,y3,z3,s3,...) where xn, yn and zn are vectorsor matrices, and sn are strings specifying color, marker symbol, or line style. These strings are thesame as those of the two-dimensional plots.

Example A.11

Plot the function

(A.3)Solution:

We arbitrarily choose the interval (length) shown on the code below.

x= -10: 0.5: 10; % Length of vector x

y= x; % Length of vector y must be same as x

z= 2.*x.^3+x+3.*y.^2 1;% Vector z is function of both x and y*

plot3(x,y,z); grid

The three-dimensional plot is shown in Figure A.5.

TABLE A.2 Styles, colors, and markets used in MATLAB

Symbol Color Symbol Marker Symbol Line Styleb blue point solid line

g green o circle dotted line

r red x x-mark dash-dot line

c cyan + plus dashed line

m magenta * stary yellow s squarek black d diamondw white triangle down

triangle up

triangle left

triangle right

p pentagramh hexagram

* This statement uses the so called dot multiplication, dot division, and dot exponentiation where the multiplication, division,and exponential operators are preceded by a dot. These operations will be explained in Section A.8.

z 2x3– x 3y2 1–+ +=

Page 542: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition A-17Orchard Publications

Using MATLAB to Make Plots

Figure A.5. Three dimensional plot for Example A.11

In a two-dimensional plot, we can set the limits of the - and -axes with the axis([xmin xmaxymin ymax]) command. Likewise, in a three-dimensional plot we can set the limits of all threeaxes with the axis([xmin xmax ymin ymax zmin zmax]) command. It must be placed after theplot(x,y) or plot3(x,y,z) commands, or on the same line without first executing the plot com-mand. This must be done for each plot. The three-dimensional text(x,y,z,’string’) command willplace string beginning at the co-ordinate ( , , ) on the plot.

For three-dimensional plots, grid on and box off are the default states.

We can also use the mesh(x,y,z) command with two vector arguments. These must be defined as and where . In this case, the vertices of the mesh

lines are the triples . We observe that x corresponds to the columns of , and ycorresponds to the rows.

To produce a mesh plot of a function of two variables, say , we must first generate the and matrices that consist of repeated rows and columns over the range of the variables and. We can generate the matrices and with the [X,Y]=meshgrid(x,y) function that creates

the matrix whose rows are copies of the vector x, and the matrix whose columns are copies ofthe vector y.

-10

-5

0

5

10

-10

-5

0

5

10-2000

-1000

0

1000

2000

3000

x y

x y z

length x n= length y m= m n size Z=

x j y i Z i j Z

z f x y=

X Y xy X Y

X Y

Page 543: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Appendix A Introduction to MATLAB®

A-18 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

Example A.12

The volume of a right circular cone of radius and height is given by

(A.4)

Plot the volume of the cone as and vary on the intervals and meters.

Solution:

The volume of the cone is a function of both the radius and the height , that is,

The three-dimensional plot is created with the following MATLAB code where, as in the previ-ous example, in the second line we have used the dot multiplication, dot division, and dot expo-nentiation. This will be explained in Section A.8.

[R,H]=meshgrid(0: 4, 0: 6);% Creates R and H matrices from vectors r and h

V=(pi .* R .^ 2 .* H) ./ 3; mesh(R, H, V)

xlabel('x-axis, radius r (meters)'); ylabel('y-axis, altitude h (meters)');

zlabel('z-axis, volume (cubic meters)'); title('Volume of Right Circular Cone'); box on

The three-dimensional plot of Figure A.6, shows how the volume of the cone increases as theradius and height are increased.

Figure A.6. Volume of a right circular cone.

V r h

V 13--- r2h=

r h 0 r 4 0 h 6

r h

V f r h=

01

23

4

0

2

4

60

20

40

60

80

100

120

x-axis, radius r (meters)

Volume of Right Circular Cone

y-axis, altitude h (meters)

z-ax

is,

volu

me

(cub

ic m

eter

s)

Page 544: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition A-19Orchard Publications

Subplots

This, and the plot of Figure A.5, are rudimentary; MATLAB can generate very sophisticatedthree-dimensional plots. The MATLAB User’s manual contains more examples.

A.8 SubplotsMATLAB can display up to four windows of different plots on the Figure window using the com-mand subplot(m,n,p). This command divides the window into an matrix of plotting areasand chooses the area to be active. No spaces or commas are required between the three inte-gers , and . The possible combinations are shown in Figure A.7.

We will illustrate the use of the subplot(m,n,p) command following the discussion on multiplica-tion, division and exponentiation that follows.

Figure A.7. Possible subplot arrangements in MATLAB

A.9 Multiplication, Division and ExponentiationMATLAB recognizes two types of multiplication, division, and exponentiation. These are thematrix multiplication, division, and exponentiation, and the element-by-element multiplication,division, and exponentiation. They are explained in the following paragraphs.

In Section A.2, the arrays , such a those that contained the coefficients of polynomi-als, consisted of one row and multiple columns, and thus are called row vectors. If an array hasone column and multiple rows, it is called a column vector. We recall that the elements of a rowvector are separated by spaces. To distinguish between row and column vectors, the elements of acolumn vector must be separated by semicolons. An easier way to construct a column vector, is towrite it first as a row vector, and then transpose it into a column vector. MATLAB uses the singlequotation character ( ) to transpose a vector. Thus, a column vector can be written either as b=[1; 3; 6; 11] or as b=[ 1 3 6 11]'. MATLAB produces the same display with either format asshown below.

b=[ 1; 3; 6; 11]

b =

m npth

m n p

111Full Screen Default

211 212

221 222 223 224

121 122

221 222 212

211223 224

221223

122 121 222224

a b c

Page 545: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Appendix A Introduction to MATLAB®

A-20 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

-1

3

6

11

b=[ 1 3 6 11]'

b =

-1

3

6

11

We will now define Matrix Multiplication and Element-by-Element multiplication.

1. Matrix Multiplication (multiplication of row by column vectors)

Let

and

be two vectors. We observe that is defined as a row vector whereas is defined as a columnvector, as indicated by the transpose operator ( ). Here, multiplication of the row vector bythe column vector , is performed with the matrix multiplication operator (*). Then,

(A.5)

For example, if

and

the matrix multiplication produces the single value , that is,

and this is verified with MATLAB as

A=[1 2 3 4 5]; B=[ 2 6 3 8 7]';A*B

A a1 a2 a3 an=

B b1 b2 b3 bn '=

A BA

B

A*B a1b1 a2b2 a3b3 anbn+ + + + gle valuesin= =

A 1 2 3 4 5=

B 2– 6 3– 8 7 '=

A*B 68

A B 1 2– 2 6 3 3– 4 8 5 7++++ 68= =

Page 546: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition A-21Orchard Publications

Multiplication, Division and Exponentiation

ans =

68

Now, let us suppose that both and are row vectors, and we attempt to perform a row-by-row multiplication with the following MATLAB statements.

A=[1 2 3 4 5]; B=[ 2 6 3 8 7];A*B

When these statements are executed, MATLAB displays the following message:

??? Error using ==> *

Inner matrix dimensions must agree.

Here, because we have used the matrix multiplication operator (*) in A*B, MATLAB expectsvector to be a column vector, not a row vector. It recognizes that is a row vector, andwarns us that we cannot perform this multiplication using the matrix multiplication operator(*). Accordingly, we must perform this type of multiplication with a different operator. Thisoperator is defined below.

2. Element-by-Element Multiplication (multiplication of a row vector by another row vector)

Let

and

be two row vectors. Here, multiplication of the row vector by the row vector is performedwith the dot multiplication operator (.*). There is no space between the dot and the multipli-cation symbol. Thus,

(A.6)

This product is another row vector with the same number of elements, as the elements of and .

As an example, let

and

Dot multiplication of these two row vectors produce the following result.

Check with MATLAB:

A B

B B

C c1 c2 c3 cn=

D d1 d2 d3 dn=

C D

C. D c1d1 c2d2 c3d3 cndn=

CD

C 1 2 3 4 5=

D 2– 6 3– 8 7=

C. D 1 2– 2 6 3 3– 4 8 5 7 2– 12 9– 32 35= =

Page 547: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Appendix A Introduction to MATLAB®

A-22 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

C=[1 2 3 4 5]; % Vectors C and D must haveD=[ 2 6 3 8 7]; % same number of elementsC.*D % We observe that this is a dot multiplication

ans = -2 12 -9 32 35

Similarly, the division (/) and exponentiation (^) operators, are used for matrix division andexponentiation, whereas dot division (./) and dot exponentiation (.^) are used for element-by-element division and exponentiation.

We must remember that no space is allowed between the dot (.) and the multiplication, divi-sion, and exponentiation operators.

Note: A dot (.) is never required with the plus (+) and minus ( ) operators.

Example A.13

Write the MATLAB code that produces a simple plot for the waveform defined as

(A.7)

in the seconds interval.

Solution:

The MATLAB code for this example is as follows:

t=0: 0.01: 5 % Define t-axis in 0.01 increments

y=3 .* exp( 4 .* t) .* cos(5 .* t) 2 .* exp( 3 .* t) .* sin(2 .* t) + t .^2 ./ (t+1);

plot(t,y); grid; xlabel('t'); ylabel('y=f(t)'); title('Plot for Example A.13')

Figure A.8 shows the plot for this example.

Had we, in this example, defined the time interval starting with a negative value equal to or lessthan , say as MATLAB would have displayed the following message:

Warning: Divide by zero.

This is because the last term (the rational fraction) of the given expression, is divided by zerowhen . To avoid division by zero, we use the special MATLAB function eps, which is a

number approximately equal to . It will be used with the next example.

The command axis([xmin xmax ymin ymax]) scales the current plot to the values specified bythe arguments xmin, xmax, ymin and ymax. There are no commas between these four argu-ments. This command must be placed after the plot command and must be repeated for each plot.

y f t 3e 4t– 5tcos 2e 3t– 2tsin– t2

t 1+-----------+= =

0 t 5

1– 3 t 3–

t 1–=

2.2 10 16–

Page 548: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition A-23Orchard Publications

Multiplication, Division and Exponentiation

Figure A.8. Plot for Example A.13

The following example illustrates the use of the dot multiplication, division, and exponentiation,the eps number, the axis([xmin xmax ymin ymax]) command, and also MATLAB’s capabilityof displaying up to four windows of different plots.

Example A.14

Plot the functions

in the interval using 100 data points. Use the subplot command to display these func-tions on four windows on the same graph.

Solution:

The MATLAB code to produce the four subplots is as follows:

x=linspace(0,2*pi,100); % Interval with 100 data pointsy=(sin(x).^ 2); z=(cos(x).^ 2); w=y.* z; v=y./ (z+eps); % add eps to avoid division by zero

subplot(221); % upper left of four subplots

plot(x,y); axis([0 2*pi 0 1]);title('y=(sinx)^2');

subplot(222); % upper right of four subplotsplot(x,z); axis([0 2*pi 0 1]);

0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5-1

0

1

2

3

4

5

t

y=f(t

)

Plot for Example A.13

y x2sin z x2cos w x2sin x2cos v x2sin x2cos= = = =

0 x 2

Page 549: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Appendix A Introduction to MATLAB®

A-24 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

title('z=(cosx)^2');

subplot(223); % lower left of four subplotsplot(x,w); axis([0 2*pi 0 0.3]);title('w=(sinx)^2*(cosx)^2');

subplot(224); % lower right of four subplotsplot(x,v); axis([0 2*pi 0 400]);title('v=(sinx)^2/(cosx)^2');

These subplots are shown in Figure A.9.

Figure A.9. Subplots for the functions of Example A.14

The next example illustrates MATLAB’s capabilities with imaginary numbers. We will introducethe real(z) and imag(z) functions that display the real and imaginary parts of the complex quan-tity z = x + iy, the abs(z), and the angle(z) functions that compute the absolute value (magni-tude) and phase angle of the complex quantity z = x + iy = r We will also use thepolar(theta,r) function that produces a plot in polar coordinates, where r is the magnitude, thetais the angle in radians, and the round(n) function that rounds a number to its nearest integer.

Example A.15

Consider the electric circuit of Figure A.10.

With the given values of resistance, inductance, and capacitance, the impedance as a func-tion of the radian frequency can be computed from the following expression:

0 2 4 60

0.2

0.4

0.6

0.8

1y=(sinx)2

0 2 4 60

0.2

0.4

0.6

0.8

1z=(cosx)2

0 2 4 60

0.05

0.1

0.15

0.2

0.25

w=(sinx)2*(cosx)2

0 2 4 60

100

200

300

400v=(sinx)2/(cosx)2

Zab

Page 550: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition A-25Orchard Publications

Multiplication, Division and Exponentiation

Figure A.10. Electric circuit for Example A.15

(A.8)

a. Plot (the real part of the impedance ) versus frequency .

b. Plot (the imaginary part of the impedance ) versus frequency .

c. Plot the impedance versus frequency in polar coordinates.

Solution:

The MATLAB code below computes the real and imaginary parts of that is, for simplicity,denoted as , and plots these as two separate graphs (parts a & b). It also produces a polar plot(part c).

w=0: 1: 2000; % Define interval with one radian intervalz=(10+(10 .^ 4 j .* 10 .^ 6 ./ (w+eps)) ./ (10 + j .* (0.1 .* w 10.^5./ (w+eps))));%% The first five statements (next two lines) compute and plot Re{z}real_part=real(z); plot(w,real_part); grid;xlabel('radian frequency w'); ylabel('Real part of Z');%% The next five statements (next two lines) compute and plot Im{z}imag_part=imag(z); plot(w,imag_part); grid;xlabel('radian frequency w'); ylabel('Imaginary part of Z');% The last six statements (next six lines) below produce the polar plot of zmag=abs(z); % Computes |Z|rndz=round(abs(z)); % Rounds |Z| to read polar plot easiertheta=angle(z); % Computes the phase angle of impedance Zpolar(theta,rndz); % Angle is the first argumentgrid;ylabel('Polar Plot of Z');

The real, imaginary, and polar plots are shown in Figures A.11, A.12, and A.13 respectively.

a

b

10

10

0.1 H

10 FZab

Zab Z 10 104 j 106–

10 j 0.1 105–+--------------------------------------------------------+= =

Re Z Z

Im Z Z

Z

Zab

z

Page 551: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Appendix A Introduction to MATLAB®

A-26 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

Figure A.11. Plot for the real part of the impedance in Example A.15

Figure A.12. Plot for the imaginary part of the impedance in Example A.15

Example A.15 clearly illustrates how powerful, fast, accurate, and flexible MATLAB is.

A.10 Script and Function FilesMATLAB recognizes two types of files: script files and function files. Both types are referred to asm-files since both require the .m extension.

0 200 400 600 800 1000 1200 1400 1600 1800 20000

200

400

600

800

1000

1200

radian frequency w

Rea

l pa

rt of

Z

0 200 400 600 800 1000 1200 1400 1600 1800 2000-600

-400

-200

0

200

400

600

radian frequency w

Imag

ina

ry p

art

of Z

Page 552: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition A-27Orchard Publications

Script and Function Files

Figure A.13. Polar plot of the impedance in Example A.15

A script file consists of two or more built-in functions such as those we have discussed thus far.Thus, the code for each of the examples we discussed earlier, make up a script file. Generally, ascript file is one which was generated and saved as an m-file with an editor such as the MAT-LAB’s Editor/Debugger.

A function file is a user-defined function using MATLAB. We use function files for repetitivetasks. The first line of a function file must contain the word function, followed by the output argu-ment, the equal sign ( = ), and the input argument enclosed in parentheses. The function nameand file name must be the same, but the file name must have the extension .m. For example, thefunction file consisting of the two lines below

function y = myfunction(x)

y=x.^ 3 + cos(3.* x)

is a function file and must be saved as myfunction.m

For the next example, we will use the following MATLAB functions.

fzero(f,x) tries to find a zero of a function of one variable, where f is a string containing the nameof a real-valued function of a single real variable. MATLAB searches for a value near a pointwhere the function f changes sign, and returns that value, or returns NaN if the search fails.

Important: We must remember that we use roots(p) to find the roots of polynomials only, such asthose in Examples A.1 and A.2.

fmin(f,x1,x2) minimizes a function of one variable. It attempts to return a value of x where is

Pol

ar P

lot

of Z 203

406

609

812

1015

30

210

60

240

90

270

120

300

150

330

180 0

f x

Page 553: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Appendix A Introduction to MATLAB®

A-28 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

minimum in the interval . The string f contains the name of the function to be mini-mized.

Note: MATLAB does not have a function to maximize a function of one variable, that is, there isno fmax(f,x1,x2) function in MATLAB; but since a maximum of is equal to a minimum of

, we can use fmin(f,x1,x2) to find both minimum and maximum values of a function.

fplot(fcn,lims) plots the function specified by the string fcn between the x-axis limits specified bylims = [xmin xmax]. Using lims = [xmin xmax ymin ymax] also controls the y-axis limits. Thestring fcn must be the name of an m-file function or a string with variable .

Note: NaN (Not-a-Number) is not a function; it is MATLAB’s response to an undefined expres-sion such as , or inability to produce a result as described on the next paragraph. Wecan avoid division by zero using the eps number, that we mentioned earlier.

Example A.16

Find the zeros, maxima and minima of the function

Solution:

We first plot this function to observe the approximate zeros, maxima, and minima using the fol-lowing code.

x= 1.5: 0.01: 1.5;y=1./ ((x 0.1).^ 2 + 0.01) 1./ ((x 1.2).^ 2 + 0.04) 10;plot(x,y); grid

The plot is shown in Figure A.14.

The roots (zeros) of this function appear to be in the neighborhood of and . Themaximum occurs at approximately where, approximately, , and the minimumoccurs at approximately where, approximately, .

Next, we define and save f(x) as the funczero01.m function m-file with the following code:

function y=funczero01(x)

% Finding the zeros of the function shown below

y=1/((x 0.1)^2+0.01) 1/((x 1.2)^2+0.04) 10;

Now, we can use the fplot(fcn,lims) command to plot as follows.

fplot('funczero01', [ 1.5 1.5]); grid

x1 x x2

f xf x–

x

0 0

f x 1x 0.1– 2 0.01+

---------------------------------------- 1x 1.2– 2 0.04+

---------------------------------------- 10–+=

x 0.2–= x 0.3=

x 0.1= ymax 90=

x 1.2= ymin 34–=

f x

Page 554: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition A-29Orchard Publications

Script and Function Files

Figure A.14. Plot for Example A.16 using the plot command

This plot is shown in Figure A.15. As expected, this plot is identical to the plot of Figure A.14that was obtained with the plot(x,y) command.

Figure A.15. Plot for Example A.16 using the fplot command

We will use the fzero(f,x) function to compute the roots of in (A.20) more precisely. Thecode below must be saved with a file name, and then invoked with that file name.

x1= fzero('funczero01', 0.2);

x2= fzero('funczero01', 0.3);

fprintf('The roots (zeros) of this function are r1= %3.4f', x1);

-1.5 -1 -0.5 0 0.5 1 1.5-40

-20

0

20

40

60

80

100

-1.5 -1 -0.5 0 0.5 1 1.5-40

-20

0

20

40

60

80

100

f x

Page 555: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Appendix A Introduction to MATLAB®

A-30 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

fprintf(' and r2= %3.4f \n', x2)

MATLAB displays the following:

The roots (zeros) of this function are r1= -0.1919 and r2= 0.3788

Whenever we use the fmin(f,x1,x2) function, we must remember that this function searches for aminimum and it may display the values of local minima* , if any, before displaying the functionminimum. It is, therefore, advisable to plot the function with either the plot(x,y) or thefplot(fcn,lims) command to find the smallest possible interval within which the function mini-mum lies. For this example, we specify the range rather than the interval

The minimum of is found with the fmin(f,x1,x2) function as follows:

min_val=fmin('funczero01', 0, 1.5)

min_val = 1.2012

This is the value of x at which is minimum. To find the value of corresponding to thisvalue of , we substitute it into , that is,

x=1.2012; y=1 / ((x 0.1) ^ 2 + 0.01) 1 / ((x 1.2) ^ 2 + 0.04) 10

y = -34.1812

To find the maximum value, we must first define a new function m-file that will produce We define it as follows:

function y=minusfunczero01(x)

% It is used to find maximum value from f(x)

y= (1/((x 0.1)^2+0.01) 1/((x 1.2)^2+0.04) 10);

We have placed the minus ( ) sign in front of the right side of the last expression above, so thatthe maximum value will be displayed. Of course, this is equivalent to the negative of thefunczero01 function.

Now, we execute the following code to get the value of x where the maximum occurs.

max_val=fmin('minusfunczero01', 0,1)

max_val = 0.0999

x=0.0999; % Using this value find the corresponding value of y

* Local maxima or local minima, are the maximum or minimum values of a function within a restricted range of values in theindependent variable. When the entire range is considered, the maxima and minima are considered be to the maximum andminimum values in the entire range in which the function is defined.

0 x 1.51.5 x 1.5–

f x

y f x= yx f x

f x–

y f x=

Page 556: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition A-31Orchard Publications

Display Formats

y=1 / ((x 0.1) ^ 2 + 0.01) 1 / ((x 1.2) ^ 2 + 0.04) 10

y = 89.2000

A.11 Display FormatsMATLAB displays the results on the screen in integer format without decimals if the result is aninteger number, or in short floating point format with four decimals if it a fractional number. Theformat displayed has nothing to do with the accuracy in the computations. MATLAB performs allcomputations with accuracy up to 16 decimal places.

The output format can changed with the format command. The available formats can be dis-played with the help format command as follows:

help format

FORMAT Set output format.

All computations in MATLAB are done in double precision.

FORMAT may be used to switch between different output display formats as follows:

FORMAT Default. Same as SHORT.

FORMAT SHORT Scaled fixed point format with 5 digits.

FORMAT LONG Scaled fixed point format with 15 digits.

FORMAT SHORT E Floating point format with 5 digits.

FORMAT LONG E Floating point format with 15 digits.

FORMAT SHORT G Best of fixed or floating point format with 5 digits.

FORMAT LONG G Best of fixed or floating point format with 15 digits.

FORMAT HEX Hexadecimal format.

FORMAT + The symbols +, - and blank are printed for positive, negative and zero elements.

Imaginary parts are ignored.

FORMAT BANK Fixed format for dollars and cents.

FORMAT RAT Approximation by ratio of small integers.

Spacing:

FORMAT COMPACT Suppress extra line-feeds.

FORMAT LOOSE Puts the extra line-feeds back in.

Page 557: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Appendix A Introduction to MATLAB®

A-32 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

Some examples with different format displays age given below.

format short 33.3335 Four decimal digits (default)

format long 33.33333333333334 16 digits

format short e 3.3333e+01 Four decimal digits plus exponent

format short g 33.333 Better of format short or format format short e

format bank 33.33 two decimal digits

format + only + or or zero are printed

format rat 100/3 rational approximation

The disp(X) command displays the array X without printing the array name. If X is a string, thetext is displayed.

The fprintf(format,array) command displays and prints both text and arrays. It uses specifiers toindicate where and in which format the values would be displayed and printed. Thus, if %f is used,the values will be displayed and printed in fixed decimal format, and if %e is used, the values willbe displayed and printed in scientific notation format. With these commands only the real part ofeach parameter is processed.

Page 558: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition B-1Orchard Publications

Appendix B The Gamma and Beta Functions and Distributions

his appendix serves as an introduction to the gamma and beta functions. These are specialfunctions that find wide applications in science and engineering. They are also used in prob-ability and in the computation of certain integrals.

B.1 The Gamma Function

The gamma function, denoted as , is also known as generalized factorial function. It is defined as

(B.1)

and this improper* integral converges (approaches a limit) for all .

We will derive the basic properties of the gamma function and its relation to the well known fac-torial function

(B.2)

We will evaluate the integral of (B.1) by performing integration by parts using the relation

(B.3)

Letting

(B.4)we get

(B.5)

Then, with (B.3), we write (B.1) as

* Improper integrals are two types and these are:

a. where the limits of integration a or b or both are infinite

b. where f(x) becomes infinite at a value x between the lower and upper limits of integration inclusive.

Tn

n xn 1– e x– xd0

=

n 0

f x xda

b

f x xda

b

n! n n 1– n 2– 3 2 1=

u vd uv v ud–=

u e x– and dv xn 1–==

du e x–– dx and v xn

n-----==

Page 559: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Appendix B The Gamma and Beta Functions and Distributions

B-2 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

(B.6)

With the condition that , the first term on the right side of (B.6) vanishes at the lower limit,that is, for . It also vanishes at the upper limit as . This can be proved with L’ Hôpi-tal’s rule* by differentiating both numerator and denominator times, where . Then,

(B.7)

Therefore, (B.6) reduces to

(B.8)

and with (B.1) we have

(B.9)

By comparing the two integrals of (B.9), we see that

(B.10)

or

(B.11)

* Often, the ratio of two functions, such as , for some value of x, say a, results in the indeterminate form

. To work around this problem, we consider the limit , and we wish to find this limit, if it exists.

L’Hôpital’s rule states that if , and if the limit as x approaches a exists, then,

n xne x–

n------------

x 0=

1n--- xne x– xd

0+=

n 0x 0= x

m m n

f xg x----------

f ag a----------- 0

0---= f x

g x----------

x alim

f a g a 0= =d

dx------f x d

dx------g x

f xg x----------

x alim d

dx------f x d

dx------g x

x alim=

xne x–

n------------

xlim xn

nex--------

xlim xm

m

d

d xn

xm

m

d

d nex------------------

xlim xm 1–

m 1–

d

d nxn 1–

xm 1–

m 1–

d

d nex

-----------------------------------xlim= = = =

n n 1– n 2– n m– 1+ xn m–

nex------------------------------------------------------------------------------------

xlim=

n 1– n 2– n m– 1+

xm n– ex

--------------------------------------------------------------------xlim 0==

n 1n--- xne x– xd

0=

n xn 1– e x– xd0

1n--- xne x– xd

0= =

n n 1+n

---------------------=

n n n 1+=

Page 560: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition B-3Orchard Publications

The Gamma Function

It is convenient to use (B.10) for , and (B.11) for .

From (B.10), we see that becomes infinite as .

For , (B.1) yields

(B.12)

Thus, we have derived the important relation,

(B.13)

From the recurring relation of (B.11), we obtain

(B.14)

and in general

(B.15)

The formula of (B.15) is a very useful relation; it establishes the relationship between the function and the factorial .

We must remember that, whereas the factorial is defined only for zero (recall that ) andpositive integer values, the gamma function exists (is continuous) everywhere except at and neg-ative integer numbers, that is, , and so on. For instance, when , we can find

in terms of , but if we substitute the numbers and so on in (B.11), weget values which are not consistent with the definition of the function, as defined in thatrelation.

Stated in other words, the function is defined for all positive integers and positive fractional values,and for all negative fractional, but not negative integer values.

We can use the MATLAB gamma(n) function to plot versus . This is done with the codebelow that produces the plot shown in Figure B.1.

n= 4: 0.05: 4; g=gamma(n); plot(n,g); axis([ 4 4 6 6]); grid;title('The Gamma Function'); xlabel('n'); ylabel('Gamma(n)')

Figure B.1 shows the plot of the function versus .

n 0 n 0

n n 0

n 1=

1 e x– xd0

e x–0– 1= = =

1 1=

2 1 1 1= =

3 2 2 2 1 2!= = =

4 3 3 3 2 3!= = =

n 1+ n! for n 1 2 3= =

nn!

n! 0! 1=

01 2 3––– n 0.5–=

0.5– 0.5 0 1 2 3–––

n

n

n n

n n

Page 561: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Appendix B The Gamma and Beta Functions and Distributions

B-4 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

Figure B.1. Plot of the gamma function

Numerical values of for , can be found in math tables, but we can use (B.10) or(B.11) to compute values outside this range. Of course, we can use MATLAB to find any validvalues of .

Example B.1

Compute:a. b. c.

Solution:

a. From (B.11),

Then,

and from math tables,

Therefore,

b. From (B.10),

-4 -3 -2 -1 0 1 2 3 4-6

-4

-2

0

2

4

6

The Gamma Function

Gam

ma

n

n

n 1 n 2

n

3.6 0.5 0.5–

n 1+ n n=

3.6 2.6 2.6 2.6 1.6 1.6= =

1.6 0.8953=

3.6 2.6 1.6 0.8953 3.717= =

n n 1+n

---------------------=

Page 562: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition B-5Orchard Publications

The Gamma Function

Then,

and from math tables,

Therefore,

c. From (B.10),

Then,

and using the result of (b),

We can verify these answers with MATLAB as follows:

a=gamma(3.6), b=gamma(0.5), c=gamma( 0.5)

a = 3.7170b = 1.7725c = -3.5449

Excel does not have a function which evaluates directly. It does, however, have the GAM-MALN(x) function. Therefore, we can use the =EXP(GAMMALN(n)) function to evaluate atsome positive value of . But because it first computes the natural log, it does not produce ananswer if is negative as shown in Figure B.2.

Figure B.2. Using Excel to find .

0.5 0.5 1+0.5

------------------------- 1.50.5

----------------= =

1.5 0.8862=

0.5 2 0.8862 1.772= =

n n 1+n

---------------------=

0.5– 0.5– 1+0.5–

------------------------------ 0.50.5–

---------------- 2 0.5–= = =

0.5– 2– 0.5= 2– 1.772 3.544–= =

nn

nn

123456789

A B CExample B.1 using Excel

exp(gammaln(n))=n gammaln(n) gamma(n)

3.6 1.3129 3.7170

0.5 0.5724 1.7725

-0.5 #NUM! #NUM!

n

Page 563: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Appendix B The Gamma and Beta Functions and Distributions

B-6 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

Example B.2

Prove that when is a positive integer, the relation

(B.16)

is true.

Proof:

From (B.11),(B.17)

Then,(B.18)

Next, replacing with on the left side of (B.18), we get

(B.19)

Substitution of (B.19) into (B.18) yields

(B.20)

By repeated substitutions, we get

(B.21)

and since , we have(B.22)

or (B.23)

Example B.3

Use the definition of the function to compute the exact value of

Solution:

From (B.1),

(B.24)

Then,

(B.25)

Letting

n

n n 1– !=

n 1+ n n=

n n 1– n 1–=

n n 1–

n 1– n 2– n 2–=

n n 1– n 2– n 2–=

n

n n 1– n 2– n 3– 1 1=

1 1=

n n 1– n 2– n 3– 1=

n n 1– !=

n 1 2

n xn 1– e x– xd0

=

12--- x0.5 1– e x– xd

0x 0.5– e x– xd

0= =

x y2=

Page 564: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition B-7Orchard Publications

The Gamma Function

we get

or

By substitution of the last three relations into (B.25), we get

(B.26)

Next, we define as a function of both and , that is, we let

(B.27)

(B.28)

Multiplication of (B.27) by (B.28) yields

(B.29)

Now, we convert (B.29) to polar coordinates by making the substitution

(B.30)

and by recalling that:

1. the total area of a region is found by either one of the double integrals

(B.31)

2. from differential calculus

(B.32)

Then,

(B.33)

We observe that as ,

dxdy------ 2y=

dx 2ydy=

12--- y2 0.5– e y2

– 2ydy0

2 y 1– ye y2– dy

02 e y2

– dy0

= = =

1 2 x y

12--- 2 e x2

– dx0

=

12--- 2 e y2

– dy0

=

12---

24 e x2

– dx e y2– dy

004 e x2 y2

+– xd yd00

= =

2 x2 y2+=

A xd yd r rd d= =

ddu------eu2

eu2 ddu------u2 2ueu2

= =

e2

– d1

2 12---– e

2–=

x and y

Page 565: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Appendix B The Gamma and Beta Functions and Distributions

B-8 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

(B.34)

Substitution of (B.30), (B.33) and (B.34) into (B.29) yields

and thus, we have obtained the exact value

(B.35)

Example B.4

Compute:a. b. c.

Solution:

Using the relations

we get:

a. for ,

b. for ,

c. for ,

Other interesting relations involving the function are:

(B.36)

(B.37)

and 2---

12---

22– e

2–

0=d

0

22– 0 1– d

0

22 d

0

22 0

2= = = = =

12--- =

0.5– 1.5– 2.5–

n n 1+n

---------------------- and 0.5 ==

n 0.5–=

0.5– 0.50.5–

-----------------0.5–

---------- 2–= = =

n 1.5–=

1.5– 1.5– 1+1.5–

------------------------------- 0.5–1.5–

-------------------- 2–1.5–

-------------- 43---= = = =

n 2.5–=

2.5– 2.5– 1+2.5–

------------------------------- 1.5–2.5–

-------------------- 4 32.5–

---------------------- 815------–= = = =

n

n 1 n–nsin

--------------=

for 0 n 1

22n 1– n 2n=

for any n negative integer

Page 566: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition B-9Orchard Publications

The Gamma Function

(B.38)

Relation (B.38) is referred to as Stirling’s asymptotic series for the function. If is a positiveinteger, the factorial can be approximated as

(B.39)

Example B.5

Use (B.36) to prove that

Proof:

or

Therefore,

Example B.6

Compute the product

Solution:

Using (B.36), we get

or

n 1+ n!=

2 nnne n– 1 112n--------- 1

288n2-------------- 139

51840n3-------------------- 571

2488320n4--------------------------––+ + +=

n nn!

n! 2 nnne n–

12--- =

12--- 1 1

2---–

12--- 1

2---

2---sin

-----------= =

12---

2=

12--- =

13--- 2

3---

13--- 1 1

3---–

3sin----------------------=

13--- 2

3---

3 2-------------- 2

3------- 2 3

3-------------= = =

Page 567: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Appendix B The Gamma and Beta Functions and Distributions

B-10 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

Example B.7

Use (B.37) to find

Solution:

or

or

Example B.8

Use (B.39) to compute

Solution:

We can use MATLAB or Excel as a calculator to evaluate this expression. With MATLAB wetype and execute the expression

sqrt(2*pi*50)*50^50*exp( 50)

ans = 3.0363e+064

This is an approximation. To find the exact value, we use the relation and theMATLAB gamma(n) function. Then,

gamma(50+1)

ans = 3.0414e+064

We can check this answer with the Excel FACT(n) function, that is, =FACT(50) and Excel dis-plays 3.04141E+64

The function is very useful in integrating some improper integrals. Some examples follow.

32---

23 1– 32--- 3

2--- 1

2---+ 2 3

2---=

22 32--- 2 3=

32--- 3

4 2------------------- 2!

4 1------------

2------= = =

50!

50! 2 50 5050

e 50–

n 1+ n!=

n

Page 568: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition B-11Orchard Publications

The Gamma Function

Example B.9

Using the definition of the function, evaluate the integrals

a. b.

Solution:

By definition,

Then,

a.

b.Let ; then, , and by substitution,

Example B.10

A negatively charged particle is meters apart from the positively charged side of an electricfield. It is initially at rest, and then moves towards the positively charged side with a forceinversely proportional to its distance from it. Assuming that the particle moves towards the centerof the positively charged side, considered to be the center of attraction , derive an expression forthe time required the negatively charged particle to reach in terms of the distance and itsmass .

Solution:

Let the center of attraction be the point zero on the -axis, as indicated in Figure B.3.

Figure B.3. Sketch for Example B.10By Newton’s law,

n

x4e x– xd0

x5e 2x– xd0

xn 1– e x– xd0

n=

x4e x– xd0

5 4! 24= = =

2x y= dx dy 2=

x5e 2x– xd0

y2---

5e y– yd

2-----

0

126----- y5e y– yd

0

664

----------- 5!64------ 120

64--------- 15

8------= = = = = =

00

m

0 x

movement of particlex0

Page 569: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Appendix B The Gamma and Beta Functions and Distributions

B-12 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

(B.40)

where

= mass of particle = distance (varies with time) = positive constant of proportionality and thesign indicates that the distance decreases as time increases.

At , the particle is assumed to be located on the -axis at point , and moves towardsthe origin at . Let the velocity of the particle be . Then,

(B.41)

and

(B.42)

Substitution of (B.42) into (B.40) yields

(B.43)

or

(B.44)

Integrating both sides of (B.44), we get

(B.45)

where represents the constants of integration of both sides, and it is evaluated from the initialcondition that when . Then,

(B.46)

and by substitution into (B.45),

(B.47)

Solving for and taking the square root of both sides we get

mdx2

dt2-------- k

x--–=

mxk

x t

t 0= x x =

x 0= v

dxdt------ v=

dx2

dt2-------- dv

dt------ dv

dx------dx

dt------ vdv

dx------= = =

mvdvdx------ k

x--–=

mvdv kx-- dx–=

mv2

2--------- k xln C+–=

Cv 0= x =

C kln=

mv2

2--------- k ln k xln– k

x---ln= =

v2

Page 570: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition B-13Orchard Publications

The Gamma Function

(B.48)

Since decreases as increases, we choose the negative sign, that is,

(B.49)

Solving (B.49) for we get

(B.50)

We are interested in the time required for the particle to reach the origin . We denote this timeas ; it is found from the relation (B.51) below, noting that the integration on the right side iswith respect to the distance where at , , and at . Then,

(B.51)

To simplify (B.51), we let

(B.52)

or

(B.53)Also, since

the lower and upper limits of integration in (B.51), are being replaced with and respectively.Therefore, we express (B.51) as

Finally, using the definition of the function, we have

(B.54)

Example B.11

Evaluate the integrals

(B.55)

v dxdt------ 2k

m------

x---ln= =

x t

dxdt------ 2k

m------

x---ln–=

dt

dt m2k------–

dxxln

------------------------=

0T

x t 0= x = t= x 0=

T d0

t m2k------– dx

xln------------------------

0= =

y x--- then e yln

x---= =

x e y– and dx e y– dy–= =

x---ln

xlim 0 and x

---lnx 0lim ==

0

T m2k------– e y– dy–

y---------------------

0

m2k------ y 1 2– e y– dy

0= =

n

T 12--- m

2k------ m

2k------ m

2k-------= = =

ncos d0

2 and nsin d

0

2

Page 571: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Appendix B The Gamma and Beta Functions and Distributions

B-14 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

Solution:

From the definition of the function,

(B.56)

Also,

(B.57)

For and , multiplication of (B.56) by (B.57) yields

(B.58)

where and are dummy variables of integration. Next, letting and , we get and . Then, with these substitutions, relation (B.58) it written as

(B.59)

Next, we convert (B.59) to polar coordinates by letting and Then,

(B.60)

To simplify (B.60), we let ; then, and thus relation (B.60) is written as

(B.61)

Rearranging (B.61) we get

(B.62)

n

n xn 1– e x– xd0

=

m xm 1– e x– xd0

=

m 0 n 0

m n um 1– e u– ud0

vn 1– e v– vd0

=

u v u x2= v y2=

du 2xdx= dv 2ydy=

m n x2 m 1–

2xe x2– xd

0y2 n 1–

2ye y2– yd

04 x2m 2– xe x2

– xd0

y2n 2– ye y2– yd

0= =

4 x2m 1– y2n 1– e x2 y2+– xd yd

00=

x cos= y sin=

m n 4 cos 2m 1– sin2n 1–

e2

– d d00

2=

2 2m 1–cos 2n 1–sin d 2m 2n 2–+ e2

–2 d

00

2=

2 w= dw 2 d=

m n 2 2m 1–cos 2n 1–sin d wm n 1–+ ew–

wd00

2=

2 2m 1–cos 2n 1–sin m n+d0

2=

2m 1–cos 2n 1–sin d0

2 m n2 m n+-------------------------=

Page 572: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition B-15Orchard Publications

The Gamma Distribution

and this expression can be simplified by replacing with , that is, , and with , that is, . Then, we get the special case of (B.62) as

(B.63)

If, in (B.62), we replace with and with m, we get the integral of the func-tion as

(B.64)

We observe that (B.63) and (B.64) are equal since and can be interchanged. Therefore,

(B.65)

The relations of (B.65) are known as Wallis’s formulas.

B.2 The Gamma DistributionOne of the most common probability distributions is the gamma distribution which is defined as

(B.66)

A detailed discussion of this probability distribution is beyond the scope of this book; it will sufficeto say that it is used in reliability and queuing theory. When is a positive integer, it is referred toas Erlang distribution. Figure B.4 shows the probability density function (pdf) of the gamma distri-bution for and .

We can evaluate the gamma distribution with the Excel GAMMADIST function whose syntax is

=GAMMADIST(x,alpha,beta,cumulative)

where:

2m 1– n m n 1+ 2=

2n 1– 0 n 1 2=

ncos d0

2n 1+

2------------ 1

2---

2 n 1+2

------------ 12---+

-------------------------------------------

n 1+2

------------

n2--- 1+

-------------------------2

-------= =

2m 1– 0 2n 1–nsin

msin d0

212--- m 1+

2-------------

2 12--- m 1+

2-------------+

---------------------------------------------

m 1+2

-------------

m2---- 1+

---------------------------2

-------= =

m n

ncos d0

2 nsin d0

2n 1+

2------------

n2--- 1+

-----------------------2

------- n 1–= =

f x n xn 1– e x–

n n-------------------------= x 0 n 0

n

n 3= 2=

Page 573: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Appendix B The Gamma and Beta Functions and Distributions

B-16 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

Figure B.4. The pdf for the gamma distribution.

x = value at which the distribution is to be evaluated

alpha = the parameter in (B.66)

beta = the parameter in (B.66)

cumulative = a TRUE / FALSE logical value; if TRUE, GAMMADIST returns the cumulative dis-tribution function (cdf), and if FALSE, it returns the probability density function (pdf).

Example B.12

Use Excel’s =GAMMADIST function to evaluate , that is, the pdf of the gamma distribution if:

a.

b.

Solution:

Since we are interested in the probability density function (pdf) values, we specify the FALSEcondition. Then,

a. =GAMMADIST(4,3,2,FALSE) returns 0.1353

b. =GAMMADIST(7,3,2,FALSE) returns 0.0925

We observe that these values are consistent with the plot of Figure B.4.

x n (n) ^n f(x)0.0 3.0 2.0 2.0 8.0 0.00000.2 0.00230.4 0.00820.6 0.01670.8 0.02681.0 0.03791.2 0.04941.4 0.06081.6 0.07191.8 0.08232.0 0.09202.2 0.10072.4 0.1084

Probability Density Functionof the gamma distribution

for n = 3 and = 2

0.000.050.100.150.20

0 2 4 6 8 10 12

x

f(x)

n

f x

x 4 n 3 and 2= = =

x 7 n 3 and 2= = =

Page 574: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition B-17Orchard Publications

The Beta Function

B.3 The Beta Function

The beta function, denoted as , is defined as

(B.67)

where and .

Example B.13

Prove that

(B.68)Proof:

Let ; then, . We observe that as , and as . There-fore,

and thus (B.68) is proved.

Example B.14

Prove that

(B.69)

Proof:

We let ; then, We observe that as , and as ,. Then,

(B.70)

B m n

B m n xm 1– 1 x– n 1– xd0

1=

m 0 n 0

B m n B n m=

x 1 y–= dx dy–= x 0 y 1 x 1 y 0

B m n xm 1– 1 x– n 1– xd0

11 y– m 1– 1 1 y–– n 1– yd

1

0–= =

1 y– m 1– yn 1– yd0

1yn 1– 1 y– m 1– yd

0

1B n m= ==

B m n 2 2m 1–cos 2n 1–sin d0

2=

x 2sin= dx 2 dcossin= x 0 0 x 12

B m n xm 1– 1 x– n 1– xd0

12 2sin 2cos

m 1–dcossinn 1–

0

2= =

2 2m 1–sin 2m 1–cos d0

2=

Page 575: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Appendix B The Gamma and Beta Functions and Distributions

B-18 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

Example B.15

Prove that

(B.71)

Proof:

The proof is evident from (B.62) and (B.70).

The function is also useful in evaluating certain integrals as illustrated by the followingexamples.

Example B.16

Evaluate the integral

(B.72)

Solution:

By definition

and thus for this example,

Using (B.71) we get

(B.73)

We can also use the MATLAB beta(m,n) function. For this example,

format rat; % display answer in rational formatz=beta(5,4)

z = 1/280

Excel does not provide a function that computes the function directly. However, we canuse (B.71) for its computation as shown in Figure B.5.

B m n m nm n+

-------------------------=

B m n

x4 1 x– 3 xd0

1

B m n xm 1– 1 x– n 1– xd0

1=

x4 1 x– 3 xd0

1B 5 4=

B 5 4 5 49

------------------------ 4!3!8!

---------- 24 640320--------------- 144

40320--------------- 1

280---------= = = = =

B m n

Page 576: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition B-19Orchard Publications

The Beta Function

Figure B.5. Computation of the beta function with Excel.

Example B.17

Evaluate the integral

(B.74)

Solution:

Let ; then , and . We observe that as , , and as ,. Then, (B.74) becomes

(B.75)

where

(B.76)

Then, from (B.74), (B.75) and (B.76) we get

(B.77)

Example B.16 using Excel

(m) (n) (m+n) Beta(m,n)=exp(gammaln(m)) exp(gammaln(n)) exp(gammaln(m+n)) (m) x (n) / (m+n)

m= 524.00 6.00 40320.00 1/280

n= 4

x2

2 x–--------------- xd

0

2

x 2v= x2 4v2= dx 2dv= x 0 v 0 x 2v 1

4v2

2 2v–-------------------2 vd

0

1 82

------- v2

1 v–--------------- vd

0

14 2 v2 1 v–

1 2–vd

0

1==

4 2 B 3 12--- 4 2 3 1 2

7 2-------------------------------==

3 2!=

12--- =

72--- 7

2--- 1– 7

2--- 1–

52--- 5

2--- 5

2--- 5

2--- 1– 5

2--- 1–= = =

52--- 3

2--- 3

2--- 1– 3

2--- 1–

158

------ 12--- 15

8------= ==

x2

2 x–--------------- xd

0

2 4 2 2!

15 8-------------------------------- 64 2

15-------------= =

Page 577: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Appendix B The Gamma and Beta Functions and Distributions

B-20 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

B.4 The Beta DistributionThe beta distribution is defined as

(B.78)

A plot of the beta probability density function (pdf) for and , is shown in Figure B.6.

Figure B.6. The pdf of the beta distribution

As with the gamma probability distribution, a detailed discussion of the beta probability distribu-tion is beyond the scope of this book; it will suffice to say that it is used in computing variations inpercentages of samples such as the percentage of the time in a day people spent at work, drivinghabits, eating times and places, etc.

Using (B.71) we can express the beta distribution as

(B.79)

We can evaluate the beta cumulative distribution function (cdf) with Excels’s BETADIST functionwhose syntax is

=BETADIST(x,alpha,beta,A,B)

where:

f x m n xm 1– 1 x– n 1–

B m n--------------------------------------= x 0 1 m n 0

m 3= n 2=

x m n (m) (n) (m+n) x(m-1) (1-x)(n-1) f(x,m,n)0.00 3.0 2.0 2.0 1.0 24.0 0.0000 1.0000 0.00000.02 0.0004 0.9800 0.00470.04 0.0016 0.9600 0.01840.06 0.0036 0.9400 0.04060.08 0.0064 0.9200 0.07070.10 0.0100 0.9000 0.10800.12 0.0144 0.8800 0.15210.14 0.0196 0.8600 0.20230.16 0.0256 0.8400 0.25800.18 0.0324 0.8200 0.31880.20 0.0400 0.8000 0.38400.22 0.0484 0.7800 0.45300.24 0.0576 0.7600 0.52530.26 0.0676 0.7400 0.60030.28 0.0784 0.7200 0.67740.30 0.0900 0.7000 0.75600.32 0.1024 0.6800 0.83560.34 0.1156 0.6600 0.9156

Probability Density Functionof the Beta Distribution

for m = 3 and n = 2

0.0

0.4

0.8

1.2

1.6

2.0

0.0 0.2 0.4 0.6 0.8 1.0

x

f(x,m

,n)

f x m n m n+m n

------------------------- xm 1– 1 x– n 1– x 0 1 m n 0=

Page 578: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition B-21Orchard Publications

The Beta Distribution

x = value between A and B at which the distribution is to be evaluated

alpha = the parameter in (B.79)

beta = the parameter in (B.79)

A = the lower bound to the interval of x

B = the upper bound to the interval of x

From the plot of Figure B.6, we see that when , which represents the probabilitydensity function, is zero. However, the cumulative distribution (the area under the curve) at thispoint is or unity since this is the upper limit of the -range. This value can be verified by

=BETADIST(1,3,2,0,1)

which returns 1.0000.

m

n

x 1= f x m n

100% x

Page 579: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Appendix B The Gamma and Beta Functions and Distributions

B-22 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

NOTES

Page 580: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition C-1Orchard Publications

Appendix C

Introduction to Markov Chains

his chapter introduces the concept of Markov chains as applied to probability and statistics.It is defined in terms of probability vectors and stochastic matrices. These concepts areillustrated with several examples.

C.1 Stochastic ProcessesA stochastic process is a finite sequence of experiments in which each experiment has a finitenumber of outcomes with given probabilities. Alternately, a stochastic process is a family ofrandom variables.

Definition 1

A vector(C.1)

is called a probability vector if all of its components are non-negative and their sum is unity.

Example C.1

Determine which of the following are probability vectors.

a.

b.

c.

Solution:

According to Definition 1, only is a probability vector since all of its components are non-negative and their sum is unity.

C.2 Stochastic MatricesDefinition 2

A stochastic matrix is a square matrix where each of its rows is a probability vector.

T

u u1 u2 un=

x 0.75 0 0.25– 0.25=

y 0.75 0.25 0 0.25=

z 0.25 0.25 0 0.50=

z

Page 581: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Appendix C Introduction to Markov Chains

C-2 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

Example C.2

Determine which of the following are stochastic matrices.

Solution:

According to Definition 2, only is a stochastic matrix, since each of its rows is a probabilityvector.

Theorem 1If and are stochastic matrices, their product results in a stochastic matrix also.

Theorem 2

If is a stochastic matrix, all powers of , that is, all matrices are stochastic matrices.

Definition 3

A stochastic process which satisfies the following two properties, in a sequence of trials whoseoutcomes are , is called a finite Markov chain.

1. Each outcome belongs to a finite set of outcomes that is referred to as the state

space of the system. If the outcome on the trial is , then we say that the system is in state at step or it is at the step.

2. The outcome of any trial depends, at most, upon the outcome of the immediately precedingtrial, and not upon any other previous outcome. With each pair of states , there is agiven probability that occurs immediately after occurs.

The numbers are called transition probabilities and are arranged in a matrix that is calledtransition matrix , and it is arranged as shown in (C.2) below.

(C.2)

X 1 4 3 41 3 1 3

= Y1 3 0 2 33 4 1 2 1 4–

1 3 1 3 1 3= Z

0 1 01 2 1 6 1 31 3 2 3 0

=

Z

A B AB

A A An

X1 X2 Xn

x1 x2 xn

ith xi

xi i ith

xi xj

pij xj xi

pij

P

P

p11 p12 p13 p1n

p21 p22 p23 p2n

p31 p32 p33 p3n

pm1 pm2 pm3 pmn

=

Page 582: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition C-3Orchard Publications

Stochastic Matrices

Theorem 3The transition matrix of a Markov chain is a stochastic matrix.

Example C.3

An employee either brings his brown bag (lunch), or goes out to eat at a nearby restaurant duringthe work week. He never goes out to eat two consecutive days, but if he brings his brown bag, thenext day he may again bring his brown bag, or go out to eat with equal probability.

a. Determine the state space of this situation.

b. Determine whether this stochastic process is a Markov chain.

c. If it is a Markov chain, express it as a transition matrix.

Solution:

a. The state space of this situation is

b. Since the outcome of any day depends only on what happened the preceding day, thisstochastic process is a Markov chain.

c. The transition matrix of this Markov chain is

(C.3)

The row of the matrix of (C.3) represents the fact that if he brings his brown bag in anyparticular day, the next day he will bring his brown bag, or eat out at a restaurant with equalprobability. The row indicates the condition that if he eats out in any particular day, hedefinitely will not go out to a restaurant on the next day.

Definition 4

A state in a Markov chain is called absorbing state, if the system remains in that state once itenters it. The state is absorbing if and only if the row of a transition matrix , has onthe main diagonal and zeros everywhere else in that row.

Example C.4

Determine whether or not, the transition matrix of the Markov chain of (C.4) below has anyabsorbing states.

P

b brown bag r restaurant

Pb r

b 1 2 1 2r 1 0

=

b

r

xi yi

xi yi ith P 1

Page 583: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Appendix C Introduction to Markov Chains

C-4 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

(C.4)

Solution:

According to Definition 4, the transition matrix of (C.4) has two absorbing states, and since they appear in the main diagonal, and the rows in which they appear have zeros

everywhere else.

C.3 Transition DiagramsThe transition probabilities of a Markov chain are often represented by a transition diagram suchas that shown in Figure C.1.

Figure C.1. Transition diagram showing the transition probabilities of a Markov chain.

For this transition diagram, the state space is and the transition matrix is

(C.5)

P

x1 x2 x3 x4 x5y1 1 4 0 1 4 1 4 1 4

y2 0 1 0 0 0

y3 1 2 0 1 4 1 4 0

y4 0 1 0 0 0

y5 0 0 0 0 1

=

x2 y2

x5 y5

m1

m2

m3

1

1 / 2

1 / 21 / 2

1 / 2

m1 m2 m3

P

m1 m2 m3

m1 0 0 1m2 1 2 0 1 2m3 1 2 0 1 2

=

Page 584: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition C-5Orchard Publications

Regular Stochastic Matrices

C.4 Regular Stochastic MatricesDefinition 5

A stochastic matrix is said to be regular, if all elements of a power matrix are greater thanzero.

Example C.5

Determine whether or not the matrices and below are regular.

(C.6)

Solution:

For Matrix

Since all elements of the matrix are greater that zero, Matrix is said to be regular.

For Matrix

Since has a in the first row for , Matrix B is not regular.

Theorem 4

If is a regular stochastic matrix, then

a. has a unique fixed probability vector , and the components of are all greater than zero.

b. the sequence , , , ... approaches the matrix which has the same dimension as and whose rows are each the fixed probability vector .

c. if is any probability vector, the sequence of vectors , , , ... , approaches thefixed probability vector .

P P m

A B

A 0 11 2 1 2

= B 0 11 2 1 2

=

A

A2 0 11 2 1 2

0 11 2 1 2

1 2 1 21 4 1 4

= =

A2 A

B

B2 1 03 4 1 4

= B3 1 07 8 1 8

= B4 1 015 16 1 16

=

Bm 0 m 1

P

P t t

P P2 P3 Pm T Pt

p pP pP2 pP3 pPm

t

Page 585: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Appendix C Introduction to Markov Chains

C-6 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

Example C.6

In Example C.5 we found that the matrix is a regular stochastic matrix. Let this same matrix bedenoted as , that is,

We want to find a probability vector with two components x and , that is, sothat .

Solution:

In matrix form, the condition is

or

or

Equating corresponding elements of these matrices, we get

and either of these equations yields . Therefore,

and thus, is the unique fixed probability vector of the regular stochastic matrix P.

Next, by the second property of Theorem 4, the sequence , , , ... approaches thematrix that has the same dimension as , and whose rows are each the fixed probability vector

. Thus,

AP

P 0 11 2 1 2

=

t 1 x– t x 1 x–=

tP t=

tP t=

x 1 x–0 1

1 2 1 2x 1 x–=

0 12--- 1 x–+ x 1

2--- 1 x–+ x 1 x–=

12--- 1

2---x– 1

2--- 1

2---x+ x 1 x–=

12--- 1

2---x– x=

12--- 1

2---x+ 1 x–=

x 1 3=

t x 1 x–13--- 1 1

3---– 1 3 2 3= = =

t

P P2 P3 Pm

T Pt

Page 586: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition C-7Orchard Publications

Some Practical Examples

(C.7)

The same result can be obtained by the sequence , , , ... , that is,

or

(C.8)

Comparison of (C.8) with (C.7), reveals that for higher powers of , we obtain values closer to .

C.5 Some Practical Examples

Example C.7

A sales engineer sells computers and accessories in three cities, San Francisco (SF), San Jose (SJ),and Oakland (Oak), and spends the entire day in any of these cities. If he spends one day in SF,he will spend the next day in SJ, and if he spends his day in SJ or Oak, he is twice as likely tospend the next day in SF as in the other two cities. Compute the percentages of the time hespends in each of these cities over an extended period of time.

Solution:

We can model this situation as a three-state Markov chain. The transition matrix for thisexample is

T 1 3 2 31 3 2 3

0.33 0.670.33 0.67

= =

P P2 P3 Pm

P2 0 11 2 1 2

0 11 2 1 2

1 2 1 21 4 3 4

= =

P3 P2 P 1 2 1 21 4 3 4

0 11 2 1 2

1 4 3 43 8 5 8

= = =

P4 P3 P 1 4 3 43 8 5 8

0 11 2 1 2

3 8 5 85 16 11 16

= = =

P5 P4 P 3 8 5 85 16 11 16

0 11 2 1 2

5 16 11 1611 32 21 32

= = =

P5 0.31 0.690.34 0.66

=

P T

Page 587: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Appendix C Introduction to Markov Chains

C-8 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

A unique probability vector of the matrix can be any vector of the form , i.e.,

Equating corresponding elements of these matrices we get

These equations yield the trivial solution . To obtain a meaningful solution, wegroup any two of the equations of (C.9) with the condition . This condition, groupedwith the first two equations of (C.9) yields

(C.9)

We will use Excel to find the values of the unknowns. The spreadsheet is shown in Figure C.2.

Figure C.2. Spreadsheet for the solution of the system of equations of (C.10)

P

SF SJ OakSF 0 1 0SJ 2 3 0 1 3

Oak 2 3 1 3 0

=

t P u x y z=

x y z0 1 0

2 3 0 1 32 3 1 3 0

x y z=

23---y 2

3---z+ x 1

3---z+

13---y x y z=

23---y 2

3---z+ x= x 1

3---z+ y=

13---y z=

x– 23---+ y 2

3---z+ 0= x y–

13---z+ 0=

13---y z– 0=

x y z 0= = =

x y z+ + 1=

x y z+ + 1= x– 23---+ y 2

3---z+ 0= x y–

13---z+ 0=

123456789

10

A B C D E F G HSpreadsheet for Matrix Inversion and Matrix MultiplicationExample 11.7

1 1 1 1A= -1 2/3 2/3 B= 0

1 -1 1/3 0

2/5 - 3/5 0 0.400A-1= 4/9 - 1/3 - 3/4 X= 0.450

1/7 1 3/4 0.150

Page 588: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition C-9Orchard Publications

Some Practical Examples

The step-by-step procedure was given in Chapter 3, Example 3.18.

Thus, the desired probability vector is and this indicates that, over anextended period of time he spends of the time in San Francisco, in San Jose, and in Oakland.

Example C.8

An electronics test technician, henceforth referred to as board tester, spends all his time on thetest bench testing personal computer motherboards and, on the average, it takes minutes tocomplete the testing of each motherboard. A pickup/delivery man, working for the samecompany, comes to the test bench every minutes to pick up the boards that the board testerhas completed, and delivers new boards to be tested. The number of untested boards brought tothe test board tester’s bench varies, but it is estimated that of the time, the pickup/deliveryman brings no boards, of the time brings one board, and of the time he brings twoboards. Accordingly, at no time there should be more than three untested boards on the testbench, including the board which is currently being tested.

Determine the percentage of time that the test board tester is idle, assuming that any untestedboards on the bench at the end of the work shift remain there for the next working day.

Solution:

We can model this process as a three-state Markov chain, where the states represent the numberof untested boards on the bench just before the pickup/delivery man arrives.

Let represent the state that no untested boards remain on the bench, the state that there isone untested board, and the state that there are two untested boards just before the pickup/delivery man arrives. We want to find out the percentage of the time the board tester is idle. As a first step, we construct the state transition diagram shown in Figure C.3.

Figure C.3. State transition diagram for Example C.8.

t t 0.40 0.45 0.15=

40% 45% 15%

30

30

30%50% 20%

s0 s1

s2

No boards on the bench

One board on the bench

Two boards on the bench

30% + 50% = 80%

20%

30%

50%

20%

30%

20% + 50% = 70%

s0

s1

s2

A

B

C

D

EF G

Page 589: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Appendix C Introduction to Markov Chains

C-10 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

The state transition diagram was constructed with the assumption that the untested boards areon the bench just before the pickup/delivery man arrives. Let us assume that the board tester is idle(no testing is performed and no boards are on the bench), and the pickup/delivery man arrives.He may bring no boards ( probability), one board ( probability) or two boards (probability). In the case where the pickup/delivery man brings no boards ( ), or one board( ), the next time he comes there will be no untested boards on the bench. The probability ofthis happening is ; this is denoted as Path on the state transition diagram.But if the pickup/delivery man leaves two boards, while the board tester is idled, there will be oneboard untested on the bench when the pickup/delivery man arrives again. The probability of thishappening is and it is denoted as Path .

Next, suppose that the board tester is not idled, that is, he is testing a board when the pickup/delivery man arrives. If he brings no boards (probability ), there will be no boards untestedwhen he comes again, and thus the board tester will be idled. This condition is shown by Path .However, if the pickup/delivery man brings one board (probability ), there will be one boarduntested when he comes again; this condition is shown by Path . The other paths are drawnusing similar reasoning.

Now, using the state transition diagram, we construct the following transition matrix.

(C.10)

The next step is to find the probability vector from

Multiplication of the matrices on the left side yields

Equating corresponding elements of these matrices we get

(C.11)

or

30% 50% 20%30%

50%30% 50%+ 80%= A

20% B

30%C

50%D

P

s0 s1 s3

s0 0.8 0.2 0s1 0.3 0.5 0.2s3 0 0.3 0.7

=

t

x y z0.8 0.2 00.3 0.5 0.20 0.3 0.7

x y z=

0.8x 0.3y 0+ + 0.2x 0.5y 0.3z+ + 0 0.2y 0.7z+ + x y z=

0.8x 0.3y+ x=

0.2x 0.5y 0.3z+ + y=

0.2y 0.7z+ z=

Page 590: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition C-11Orchard Publications

Some Practical Examples

(C.12)

These equations yield the trivial solution . To obtain a meaningful solution, wegroup any two of the equations of (C.13) with the condition . Grouping thiscondition with the first two equations of (C.13) we get

(C.13)

We will use Excel to find the values of the unknowns. The step-by-step procedure was given inChapter 3, Example 3.18. The spreadsheet is shown in Figure C.4.

Figure C.4. Spreadsheet for the solution of the system of equations of (C.13).

Thus, the desired probability vector is and the first value representsthe percentage of state (no untested boards on the bench). This indicates that over anextended period, the board tester starts a minute interval in state of the time. Sincethe probability that the pickup/delivery man brings no untested boards to him is , the boardtester is idle for or of his daily shift.

Example C.9

ABC Technologies is a contract manufacturer for personal computer modems. The three majorsteps in the manufacturing process in succession are:

1. Attaching small devices (resistors, capacitors, diodes, etc.) to the modem by the solderingprocess.

0.2x– 0.3+ y 0=

0.2x 0.5– y 0.3z+ 0=

0.2y 0.3z– 0=

x y z 0= = =

x y z+ + 1=

x y z+ + 1=

0.2x– 0.3+ y 0=

0.2x 0.5– y 0.3z+ 0=

123456789

10

A B C D E F G HSpreadsheet for Matrix Inversion and Matrix MultiplicationExample 11.8

1.00 1.00 1.00 1.00A= -0.20 0.30 0.00 B= 0.00

0.20 -0.50 0.30 0.00

0.47 -4.21 -1.58 0.47A-1= 0.32 0.53 -1.05 X= 0.32

0.21 3.68 2.63 0.21

t t 0.47 0.32 0.21=

s0

30 s0 0.47

30%0.47 0.3 0.141= 14.1%

Page 591: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Appendix C Introduction to Markov Chains

C-12 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

2. Inserting integrated circuit (IC) components to the modem.

3. Perform a final test to verify proper operation.

When each of the above three steps is completed, the units are tested to determine whether theywill be forwarded to the next step, if they pass the test, or to the rework area if they fail the test.The testing procedure is shown by the flow chart of Figure C.5.

Figure C.5. Flow chart for Example C.9

Start

SolderingCompleted

PassTest

PassTest

Yes

ReworkPossible

No ReworkPossible

Yes

No

Insertion ofICs

Completed

PassTest

ReworkPossible

Yes

No

Modem BoardCompleted

AcceptModem

Yes

No

Yes

No

Yes

No

RejectModem

Step A

Test A

Test C

Step B

Step C

Test B

(65%)

(35%)

(85%)

(15%)

(95%)

(5%)

(99%)

(1%)

(98%)

(2%)

(97%)

(3%)

(1.25 min.)

(2.00 min.)

(3.00 min.) (30.0 min.)

(10.0 min.)

(5.0 min.)

Page 592: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition C-13Orchard Publications

Some Practical Examples

Shown also are the probability percentages that a modem will go from one stage to the next. Forinstance, the flow chart indicates that there is a probability that the modem will pass thetest and thus go from Stage A to Stage B. Likewise, it is shown that there is a probabilitythat rework is possible at Stage A. These probabilities are normally provided by productionengineers. The nominal times for a modem to go through each test and the rework times are alsoshown on the flow chart. The nominal times are also provided by production engineers.

Using a Markov chain procedure, compute total modem reject rate.

Solution:

We start the Markov chain with the construction of a matrix of probabilities that a modem willmove from one test to the next.

Table C.1 shows the probabilities given on the flow chart of Figure C.5.

Table C.2 shows the information of Table C.1 with the probabilities into a matrix form.

The conditions of the left most column are also listed on top of the table, since these can beeither a source or a destination. The two right most columns show the probabilities for the twoabsorbing states, accept or reject. These are the states at which there is no exit once they haveentered these states.

TABLE C.1 Probabilities that a modem will move from one test to the next

1 2 3Probability from

1 to 2 Probability from

1 to 3 Test A Step B Rework and retest A 0.65 0.35Test B Test C Rework and retest B 0.85 0.15Test C Accept Rework and retest C 0.95 0.05Rework, return to A Test A Reject 0.99 0.01Rework, return to B Test B Reject 0.98 0.02Rework, return to C Test C Reject 0.97 0.03

TABLE C.2 Array of probabilities

Test A Test B Test CRework, return to A

Rework, return to B

Rework, return to C Accept Reject

Test A 0.00 0.65 0.00 0.35 0.00 0.00 0.00 0.00Test B 0.00 0.00 0.85 0.00 0.15 0.00 0.00 0.00Test C 0.00 0.00 0.00 0.00 0.00 0.05 0.95 0.00

Rework, return to A 0.99 0.00 0.00 0.00 0.00 0.00 0.00 0.01Rework, return to B 0.00 0.98 0.00 0.00 0.00 0.00 0.00 0.02Rework, return to C 0.00 0.00 0.97 0.00 0.00 0.00 0.00 0.03

65%99%

Page 593: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Appendix C Introduction to Markov Chains

C-14 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

Next, we construct the matrix shown on Table C.3, where there is a in the maindiagonal, that is, where the row and column headings are the same, and the other values are thenegative values corresponding to the values of Table C.2. This procedure is based on eigenvalues,eigenvectors, and matrix decomposition methods. These topics are discussed in advanced theoryof Markov chain textbooks.

Now, using an Excel spreadsheet, we invert the matrix of Table C.3, and we multiply the invertedmatrix by the matrix of the last two columns (Accept and Reject) of Table C.2. The resultis shown in the spreadsheet of Figure C.6. The values in J12:J17 show the probabilities that amodem will be accepted, whereas the values in K12:K17 indicate the probabilities that a modemwill be rejected. For instance, the probability that a modem will go to the acceptance areafollowing Test A is , and the probability that it will be rejected is .We can also determine which production steps contribute most to the reject area.

Figure C.6. Matrix Inversion and Multiplication

TABLE C.3 The 6 by 6 matrix to be inverted

Test A Test B Test C Rework, return to A Rework, return to B Rework, return to C

Test A 1.00 0.65 0.00 0.35 0.00 0.00Test B 0.00 1.00 0.85 0.00 0.15 0.00Test C 0.00 0.00 1.00 0.00 0.00 0.05Rework, return to A 0.99 0.00 0.00 1.00 0.00 0.00Rework, return to B 0.00 0.98 0.00 0.00 1.00 0.00Rework, return to C 0.00 0.00 0.97 0.00 0.00 1.00

6 6 1.00

6 2

98.96% 1.04%

123456789

1011121314151617

A B C D E F G H I J KSpreadsheet for Matrix Inversion and Matrix MultiplicationExample 11.8

Test A Test B Test C Redo A Redo B Redo C Accept RejectTest A 1.00 -0.65 0.00 -0.35 0.00 0.00 0.00 0.00Test B 0.00 1.00 -0.85 0.00 -0.15 0.00 0.00 0.00

Matrix Test C 0.00 0.00 1.00 0.00 0.00 -0.05 0.95 0.00P Redo A -0.99 0.00 0.00 1.00 0.00 0.00 0.00 0.01

Redo B 0.00 -0.98 0.00 0.00 1.00 0.00 0.00 0.02Redo C 0.00 0.00 -0.97 0.00 0.00 1.00 0.00 0.03

Test A Test B Test C Redo A Redo B Redo C Accept RejectTest A 1.530 1.166 1.042 0.536 0.175 0.052 0.9896 0.0104Test B 0.000 1.172 1.047 0.000 0.176 0.052 0.9949 0.0051

Matrix Test C 0.000 0.000 1.051 0.000 0.000 0.053 0.9984 0.0016P-1 Redo A 1.515 1.154 1.031 1.530 0.173 0.052 0.9797 0.0203

Redo B 0.000 1.149 1.026 0.000 1.172 0.051 0.9750 0.0250Redo C 0.000 0.000 1.019 0.000 0.000 1.051 0.9685 0.0315

Page 594: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Mathematics for Business, Science, and Technology, Second Edition C-15Orchard Publications

Some Practical Examples

For example, to find out how much of the rejection rate originates at Test A, we dividethe percentage of units which go from Test A to acceptance ( ) by the percentage thatgoes from Test B to acceptance ( ). The result is . This isthe percentage of units that go from Test A to Test B.

To find out the percentage of the rejected modems from Test A, we subtract this value fromunity, that is,

To find out how much of the rejection rate originates at Test B, we divide the percentage of unitswhich go from Test B to acceptance ( ) by the percentage of units which go from Test C toacceptance ( ). The result is

To determine the percentage of the rejected modems from Test B, we subtract this value fromunity, that is,

The percentage of units which are rejected from Test C is found in K14, i.e., . We canverify that these percentages are correct by adding them. Thus, .

Row 12 of Figure C.6 contains some additional and useful information. These values can be usedto compute the time it takes for a modem to pass through each step. Let us assume, for example,that the nominal time (furnished by production engineers) for a modem to go through Test A is

minutes. But since some of the units are going through the rework stage, the actual time islonger by the factor shown in C12 of the spreadsheet of Figure C.6, i.e.,

Similarly, if we assume that the nominal times for Tests B and C are and minutesrespectively, these are increased by the factors shown in D12 and E12 and thus the actual timesare for Test B and for Test C.

Let us also assume that the nominal times for the three rework stages are , , and minutesfor the rework A, B, and C steps respectively. Then, the actual times are found by multiplicationof these nominal times by the values of F12, G12, and H12. Therefore, the actual times for thesetasks are:

and

Under ideal conditions, no modems would go through the rework stages and thus the totalnominal time is minutes per product. However, the total actual timeincludes the time for rework and therefore, it is minutes per product. In other words, the actual time is

1.04%98.96%

99.49% 98.96 99.49 0.9947 99.47%= =

1 0.9947– 0.0053 0.53%= =

99.49%99.84% 99.49 99.84 0.9965 99.65%= =

1 0.9947– 0.0035 0.35%= =

0.16%0.53%+0.35%+0.16% 1.04%=

1.251.25 1.53 1.91 min.=

2.00 3.00

2.000 1.116 2.33 min.= 3.000 1.042 3.13 min.=

5 10 30

5.000 0.536 2.68 min.=

10.000 0.175 1.75 min.=

30.000 0.052 1.56 min.=

1.25 2.00 3.00+ + 6.25=

1.91 2.33 3.13 2.68 1.75 1.56+ + + + + 13.36=

Page 595: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

Appendix C Introduction to Markov Chains

C-16 Mathematics for Business, Science, and Technology, Second EditionOrchard Publications

times greater than the nominal. Accordingly, the manufacturing division ofthis company must make an effort to improve in this area.13.36 6.25 2.14=

Page 596: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

IndexSymbols and Numerics B column vector A-19

command screen in MATLAB A-1% (percent) symbol in MATLAB A-2 base 10 logarithm 1-30 Command Window in MATLAB A-110-year property 8-14 base 10 number 1-1 commas in MATLAB A-8125%, 150%, and 200% base of a number 1-21 comment line in MATLAB A-2 Declining Balance 8-8 Bayes’ rule 9-10 common difference 2-1915-year property 8-15 Bernoulli distribution - see binomial distribution common logarithm 1-3020-year property 8-15 beta distribution B-20 common prefixes 1-3425-year property 8-15 beta function B-17 common ratio 2-193-year property 8-14 BETADIST Excel function B-20 comparison of alternate proposals 7-655-year property 8-14 between groups (in analysis of variance) complementary error function 11-257-year property 8-14 degrees of freedom 13-4, 13-19, 13-25 complex conjugate defined A-4

sum of squares 13-4, 13-18, 13-25, 13-28 complex fraction 1-20A variance 13-4, 13-19, 13-25 complex number A-3

variation 13-1, 13-25 compound interest 7-7a priori probabilities 9-11 bimodal 2-15 CONCATENATE Excel function 13-22abs(z) MATLAB function A-24 binary number 1-1 conditional probability 9-7abscissa 1-37 binomial cone 4-20absolute value 1-2 distribution 11-2 confidenceabsorbing state C-3 coefficients 11-1 interval 11-36accelerated cost recovery system 8-12 expansion 11-2 levels 11-71acceleration 6-3 series 11-2 limits 11-71acquisition costs 8-20 theorem 11-2 CONFIDENCE Excel function 11-71actual frequencies 11-75 bivariate normal distribution 11-56 congruent 4-18actual value 8-2 bond 7-1 constant value 1-39acute angle 5-1 bond rating systems 7-3 continuous random variable 9-2, 10-1adjoint of a matrix - see matrix book value 7-3, 8-18 conv MATLAB function A-6algebra 2-1 box MATLAB command A-12 CONVERT Excel function 1-36algebraic equation 2-2 break-even point 3-3 convertible bond 7-2alternative depreciation system 8-12 co-ordinates 1-37alternative hypothesis 11-65 C corporate bond 7-1amortize function 7-64 CORREL Excel function 12-12analysis of variance 13-1 calculus defined 6-1 correlation coefficient 11-57analytic geometry 4-1 capital asset 8-1 COUNT Excel function 13-3, 13-4, 13-9analytical solution 3-3 capital investment 8-21 coupon bond 7-3angle defined 5-1 Cartesian coordinate system 1-37, 3-2 COVAR Excel function 12-11angle(z) MATLAB functionA-24 Cauchy distribution 11-59 covariance 12-10angle-sum angle-difference relations 5-9 characteristic in logarithms 2-10 Cramer’s rule 3-15, 12-3annuity 7-5 characteristic function 10-18 CRITBINOM Excel function 11-62annurate MATLAB function 7-64 Chebyshev’s inequality 11-46 cube 4-18ANOVA - see analysis of variance CHIDIST Excel function 11-44 cubic equation 2-13apothem 4-12 CHIINV Excel function 11-44 cubic root 1-29arbitrary constant of integration 6-15 chi-square ( 2) distribution 11-41 cumulative distribution function 10-2area of a polygon 4-2 chi-square ( 2) test 11-75 cumulative frequency distribution 10-2arithmetic mean 2-13 CHITEST Excel function 11-77 cumulative frequency percentages 10-3arithmetic progression 2-19 circle 4-14 curve fitting 12-1arithmetic series 2-19 circular cone 4-20 curved regression 12-7asymptote 4-17 circumference 4-14 cylinder 4-21AVERAGE Excel function 11-16, 13-9 class life 8-12average value 2-13 clc MATLAB command A-2 Daverage rate of change 6-1 clear MATLAB command A-2axis MATLAB command A-17 coefficient 2-4 Data Analysis Toolpack in Excel 12-6, 13-6

cofactor 3-11 deceleration 6-9

Page 597: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

decibels A-13 equation 2-1 frequency response A-12decimal number 1-1 equilateral triangle 4-6 frustum of cone 4-20deconv MATLAB functionA-6 equity stripping 7-5 frustum of pyramid 4-19default in MATLAB Erlang distribution B-15 FTEST Excel function 11-74 color A-15 error F-test 11-74 line A-15 degrees of freedom 13-21 function files in MATLAB A-26 marker A-15 sum of squares 13-20 function-product relations 5-11definite integral 6-15 variance 13-21 fundamental theorem ofdegree defined 5-1 error function 11-25 integral calculus 6-17degrees of freedom Euclidean geometry 4-1 fundamental trigonometric identities 5-11 between groups 13-4, 13-25 event 9-2, 10-1 FV Excel function 7-46 defined 11-36 exit MATLAB command A-2 fvfix MATLAB function 7-62 for error variation 13-12 EXP Excel function 11-19 fvvar MATLAB function 7-62 for Factor A 13-19 EXP(GAMMALN(n)) Excel function B-5 fzero MATLAB function A-27 for Factor B 13-20 expected frequencies 11-75 for total variation 13-12 expected value 12-10 G within groups 13-5 exploration costs 8-20demo in MATLAB A-2 EXPONDIST Excel function 11-12 gamma distribution B-15dependent variable 6-1 exponent 1-21, 1-30 gamma function B-1depletion 8-19 exponential distribution 11-10, 11-79 gamma(n) MATLAB function B-3deposit period 7-23 extrapolation 2-16 GAMMADIST Excel function B-15depreciation 8-1 GAMMALN Excel function B-5derivative 6-1 F Gaussian distribution 11-13descriptive geometry 4-1 Gaussian Elimination Method 3-17determinant - see matrix F critical value 13-7 General Depreciation System 8-12development costs 8-20 F distibution 11-44, 13-1 generalized factorial function B-1diagonals 4-11 F distribution table 13-13 generatrix 4-20diameter 4-14 F ratio 13-1, 13-5, 13-12, 13-21, 13-26 geometric distribution 11-59difference 1-3 F values 13-13 geometric progression 2-19differentiable 6-4 face value 7-2 geometric series 2-19differential calculus 6-1 Factor A geometry defined 4-1differentials 6-15 defined 13-14 golden proportion 2-23differentiation 6-1 degrees of freedom 13-19 golden rectangle 2-24directrix 4-16 sum of squares 13-18 grand mean 13-9discrete random variable 10-1 variance 13-19 grand sum 9discriminant of a quadratic equation 2-12 Factor B graphical solution 3-3display formats in MATLAB A-31 defined 13-14 grid MATLAB function A-12dividend 7-38 degrees of freedom 13-20 gtext MATLAB function A-13dot multiplication operator in MATLAB A-21 sum of squares 13-19double declining balance 8-8 variance 13-20 Hdummy variable 10-10 factorial 11-1

fair market value 8-19 harmonic progression 2-21E FDIST Excel function 11-46, 13-6 harmonic series 2-21

figure window A-13 help MATLAB command A-2eccentricity 4-16, 4-17 FINV Excel function 11-46, 13-6, 13-22 heteroscedastic 11-73editor window in MATLAB A-2 first derivative 6-1 homoscedastic 11-73editor/debugger in MATLAB A-1 fixed-declining balance 8-6 hyperbola 4-16effective interest rate 7-21 flipping 7-5 hypergeometric distribution 11-53effrr MATLAB function 7-59 fmax in MATLAB A-28 HYPGEOMDIST Excel function 11-55element-by-element fmin MATLAB function A-27 hypotenuse 4-3 division in MATLAB A-22 foci 4-15 exponentiation in MATLAB A-22 focus 4-15, 4-16 I multiplication in MATLAB A-19, A-21 format MATLAB command A-31elements of a matrix - see matrix fplot MATLAB command A-28 identity matrix - see matrixellipse 4-15 fractal geometry 4-1 IIR Excel function 7-52eps MATLAB function A-22 fractional number 1-10 imag(z) MATLAB command A-24equality 2-2 F-ratio 13-1 impairment 8-18

Page 598: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

improper integral B-1 squares for straight line 12-2 squares 13-12increments between points in MATLAB A-14 squares for curve 12-2 square value 10-13indefinite integral 6-15 squares for parabola 12-2 measure of central tendency 2-13indenture 7-2 level of significance 11-67 median 2-14, 4-2independent variable 6-1 limit 6-4 mesh MATLAB command A-17indeterminate form 6-4 lims = MATLAB function A-28 method of least squares 12-2infinite sequence 2-18 linear metric system 1-33infinitesimal 10-5 correlation coefficient 12-13 m-file in MATLAB A-26inner numbers 1-20 extrapolation 2-16 minor axis 4-15instantaneous acceleration 6-3 factor A-9 minor of determinant - see matrixinstantaneous velocity 6-2 graph 1-39 minuend 1-3integer number 1-10, 1-42 interpolation 2-16 minutes defined 5-1integral calculus 6-1 regression 12-2 MINVERSE Excel function 3-22integration 6-15 linspace MATLAB command A-14 MIRR Excel function 7-54interaction 13-14 listed property 8-12 mixed number defined 1-10 defined 13-14 ln (natural logarithm) A-13 MMULT Excel function 3-22 degrees of freedom 13-20 locus 4-14 mode 2-15 plot 13-22 log A-13 modified accelerated sum of squares 13-20 log(x) MATLAB function A-13 cost recovery system 8-12 variance 13-20 log10(x) MATLAB function A-13 monotonic function 10-4interest 7-6 log2(x) MATLAB function A-13 mortgage loan 7-4interior angles 4-10 loglog(x,y) MATLAB command A-13 multinomial distribution 11-52International System of Units 1-33 lower limit of integration 6-18 municipal bond 7-1interpolation 2-16 mutually exclusive events 9-3inverse matrix method of solution 3-21 Minverse of a matrix - see matrix Ninverse trigonometric functions 5-14 m n order matrix - see matrixIPMT Excel function 7-55 main diagonal - see matrix NaN 27, 28irr MATLAB function 7-58 major axis 4-15 negative binomial distribution 11-59isosceles triangle 4-5 mantissa of a logarithm 2-10 negative number 1-1ISPMT Excel function 7-57 Markov chain C-2 NEGBINOMDIST in Excel 11-60

MATLAB - distributions with 11-21 non-Euclidean geometry 4-1J MATLAB Demos A-2 non-parametric 12-13

matrix, matrices nonresidential real property 8-12, 8-15joint occurence 9-7 adjoint of 3-18 non-singular 3-19joint probability conformable for addition 3-7 normal distribution 11-13 defined 9-7 conformable for multiplication 3-8 NORMSDIST Excel function 11-68 density function 10-12 conformable for subtraction 3-7 NORMSINV Excel function 11-69 distribution function 10-11 defined 3-6 NPER Excel function 7-49junk bond 7-3 determinant of 3-9 NPV Excel function 7-50

diagonal elements 3-7 nth moment about the mean 10-13K elements of 3-7 null hypothesis 11-65

identity 3-9 number of levels in ANOVA 13-14Kelvin’s Law 7-68 inverse of

left division in MATLAB 3-24 OL m n order matrix 3-7

main diagonal 3-7 obtuse angle 5-1L’ Hôpital’s rule B-2 minor of determinant 3-12 one-taillaw(s) of multiplication in MATLAB A-19 left test 11-65 cosines 5-12 regular stochastic C-5 right test 11-65 exponents 2-5 square 3-7 test 11-39 logarithms 2-9 stochastic C-1 one-way ANOVA 13-1 of large numbers 11-47 transition C-2 order of precedence 2-1 sines 5-12 zero 3-7 ordinary annuity 7-5 tangents 5-12 Maxwell distribution 11-61 ordinate 1-37, 3-2LCM Excel function 1-15 mean origin date 7-23least defined 2-13 overdetermined system 12-3

Page 599: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

P pyramid 4-19 defined 2-13, 11-36Pythagorean theorem 4-4 point 10-1

packing 7-5 space 10-1paired test 11-73 Q sampled mean 11-63par value 7-2 sampling with replacement 11-54parabola 4-16 Q function 11-30 script file in MATLAB A-26parabolic curve 12-1 quadrant 5-3 second defined 5-1parallel lines 4-11 quadratic second order differential equation 6-20parallelepiped 4-17 equations 2-11 Section 1245 property 8-13parallelogram 4-11 factor A-9 Section 1250 property 8-13Pascal distribution 11-59 curve 12-1 Section 17 property 8-16Pearson correlation coefficient 12-9, 12-13 quadrilateral 4-11 semicolons in MATLAB A-8PEARSON Excel function 12-13 quit MATLAB command A-2 semilogx MATLAB command A-13percentile 11-32 semilogy MATLAB command A-13PERCENTILE Excel function 11-35 R set of sample points 10-1perimeter 4-2 similar triangles 4-10perpendicular 4-2 radian 5-1 simple differential equation 6-15perpetual bond 7-1 radius 4-14 simple harmonic motion 6-20perpetuity 7-1 random experiment 9-2 simple interest 7-6phasor defined 1-39 random variable 9-2, 10-1 sinewave graph 1-40placed in service 8-12 random variation 13-11 single factor analysis tool 13-6, 13-7plot MATLAB command A-10, A-13, A-15 RANK Excel function 12-13 single sample point 10-1PMT Excel function function 7-47 rank correlation coefficient 12-13 singular 3-19Poisson distribution 11-47 rare event 11-48 sinking fund 7-5POISSON Excel function 11-51 RATE Excel function 7-48 slope 2-16, 3-2, 6-1polar MATLAB function A-24 rational polynomials A-8 sphere 4-21polar form 1-37 Rayleigh distribution 11-57 SQRT Excel function 1-29polar plot using MATLAB A-25 real numbers 1-2 square 4-11poly MATLAB function A-4 real(z) MATLAB function A-24 square matrix - see matrixpolyder MATLAB function A-8 reciprocal of a number 1-11 square root 1-28polygon 4-1 recovery period 8-12 standard deviation 10-14, 12-11polyval MATLAB function A-6 rectangle 4-11 standard prefixes 1-34population 9-2, 11-36 rectangular coordinate system 5-3 STANDARDIZE Excel function 11-15population correlation coefficient 12-12 rectangular form 1-37 standardized form of thepositive number 1-1 rectangular parallelepiped 4-17 normal distribution 11-13posteriori probabilities 9-11 regression 12-2 state space C-2power 1-30 regression analysis 12-6 statistical independence 9-9PPMT Excel function 7-56 regular stochastic matrix - see matrix statistical regularities 9-2precedence 2-1 relative frequency 9-2 statistically independent 9-9present value of an ordinary annuity 2-6 research hypothesis 11-65 STDEV Excel function 11-16principal angle 5-2 residential rental property 8-12, 8-15 step function 10-7prism 4-18 restoration cost 8-20 Stirling’s asymptotic series B-9probability rhombus 4-11 stochastic matrix - see matrix cumulative distribution function 10-2 right angle 5-1 stochastic process C-1 defined 9-1 right circular cylinder 4-21 straight-line depreciation 8-4 density function 10-9 right triangle 4-3 Student’s t-distribution - see t-distribution differential 10-9 roots MATLAB function A-3 subplot MATLAB function A-19 function 10-2 roots of an equation 2-11 subtrahend 1-3 integral 11-25 ROUND Excel function 11-19 sum vector C-1 round MATLAB function A-24 identity 2-19promissory note 7-3 row vector A-3, A-19 of squares for error 13-20property class 8-12 rth central moment 10-13 of squares for Factor A 13-18proportion 2-23 rv - see random variable of squares for Factor B 13-19PV Excel function 7-45 of the years digits 8-4P-value in ANOVA 13-8 S SUM Excel function 13-9pvfix MATLAB function 7-60pvvar MATLAB function 7-60 sample

Page 600: (eBook) MatLab - Mathematics for Business, Science, And Technology With MATLAB and Spreadsheet Applications 2E

T for interaction 13-20variation

t-distribution 11-36 between columns 13-11, 13-16, 13-26t-test 11-73 between rows 13-9, 13-26tables of integrals 6-16 due to error 13-11tangible property 8-13 due to interaction 13-16TDIST Excel function 11-39 vector 1-39terminal date 7-24 velocity 6-2test statistic 11-66 vertex 5-1text MATLAB command A-13, A-17title MATLAB command A-12 Wtotal variation 13-11, 13-12transition diagram C-4 Wallis’s formulas B-15transition matrix - see matrix Weibull distribution 11-60transversal line 4-9 within groupstrapezoid 4-11 degrees of freedom 13-5, 13-25treasury sum of squares 13-4, 13-25 bill 7-2 variance 13-5, 13-26 bond 7-1 variation 13-1, 13-25 note 7-2treatments 13-14 Xtrendline in Excel 12-4, 12-8triangle 4-1 x axis defined 1-37trigonometric identities 5-2 xlabel MATLAB command A-13trigonometric reduction formulas 5-8 XY (Scatter) in Excel 12-4trimodal 2-15TTEST Excel function 11-73 Ytwo-dimensional normal distribution 11-57two-factor y axis defined 1-37 with replication 13-8 y-intercept 3-2 with Replication Analysis Tool 13-6 ylabel MATLAB command A-13 without replication 13-8 without Replication Analysis Tool 13-6 Z without Replication ANOVA 13-8two-tail test 11-66 zero coupon bond 7-3two-way ANOVA 13-8 zero matrix - see matrixType z-test 11-72 A investment 8-21 ZTEST Excel function 11-72 B investment 8-20 I error 11-67 II error 11-67

U

undetermined system 12-3uniform distribution 11-6units of production 8-10upper limit of integration 6-18upper-tail test 11-65

V

variable declining balance 8-9variance between groups 13-4, 13-25 defined 10-13, 12-11 for Factor B 13-20