Tagged: R Mathematical Expression

Mathematical Expressions used in Math Word Problems

To solve any mathematical problem, it is important to understand and know the mathematical meaning of the words used in the problem. Many mathematical expressions or even general expressions have the same meaning and may indicate a relationship between quantities or a mathematical operation (such as addition, subtraction, multiplication, and division).

Equality Expressions

All of the following expressions represents that two quantities are equal (=).

  • is equal to (or equals)
  • is the same as
  • the result is
  • yields
  • gives

For example, 2+5 is equal to 7.

Note: The word “is” is also used to mean “equals”. For example, 8 is 5 more than 3, or 8 equal 5 + 3.

Addition Expressions

All of the following expression shows that the number $X$ and $Y$ are added

Expression Description Example
$X+Y$ $2+3$
The sum of $X$ and $Y$ The sum of 2 and 3
The total of $X$ and $Y$ The total of 2 and 3
$X$ added to $Y$ 2 added to 3
$X$ increased by $Y$ 2 increased by 3
$X$ more than $Y$ 2 more than 3
$X$ greater than $Y$ 2 greater than 3

Subtraction Expressions

All of the following expressions show that the number $Y$ is to be subtracted from the number $X$

Expression Description Example
$X-Y$ $7-2$
$X$ minus $Y$ 7 minus 3
$X$ less $Y$ 7 less 3
The difference of $X$ and $Y$ The difference between 7 and 3
from $X$ subtract $Y$ from 7 subtract 3
$X$ take away $Y$ 7 take away 3
$X$ decreased by $Y$ 7 decreased by 3
$X$ diminished by $Y$ 7 diminished by 3
$Y$ is subtracted from $X$ 7 is subtracted from 3
$Y$ less than $X$ 3 less than 7

Multiplication Expressions

The following expression can be used if the numbers $X$ and $Y$ need to be multiplied.

Expression Description Example
$X \times Y$ $2\times 3$
$X$ multiplied by $Y$ 2 multiplied by 3
The product of $X$ and $Y$ The product of 2 and 3
$X$ times $Y$ 2 times 3

For multiplication of two or more numbers symbol $\times$ or $\cdot$ is used. In algebra, a number before a variable is a coefficient, such as $4Y$ means 4 times $Y$, where 4 is coefficient.

Division Expressions

All of the following expression indicate the division of the numbers $X$ and $Y$ (in the order $X \div Y$.

Expression Example
$X \div Y$ $10 \div 2$
$X$ divided by $Y$ 10 divided by 2
The quotient of $X$ and $Y$ The quotient of 10 and 2

Read about Significant Figures

Using R as Calculator

In the Windows Operating system, The R installer will have created an icon for R on the desktop and a Start Menu item. Double click the R icon to start the R Program; R will open the console, to type the R commands.

The greater than sing (>) in the console is the prompt symbol. In this tutorial, we will use the R language as a calculator (we will be Using R as a Calculator for mathematical expressions), by typing some simple mathematical expressions at the prompt (>). Anything that can be computed on a pocket calculator can also be computed at the R prompt. After entering the expression on prompt, you have to press the Enter key from the keyboard to execute the command. Some examples using R as a calculator are as follows

 > 1 + 2   #add two or more numbers
> 1 – 2   #abstracts two or more numbers
> 1 * 2   #multiply two or more numbers
> 1 / 2   #divides two more more numbers
> 1%/ %2   #gives the integer part of the quotient
> 2 ^ 1   #gives exponentiation
> 31 %% 7   #gives the remainder after division

These operators also work fine for complex numbers.

Upon pressing the enter key, the result of the expression will appear, prefixed by a number in square bracket:
> 1 + 2
[1] 54

The [1] indicates that this is the first result from the command.

Some advanced calculations that are available in scientific calculators can also be easily done in R for example

> sqrt(5)   #Square Root of a number
> log(10)   #Natural log of a number
> sin(45)   #Trignometric function (sin function)
> pi   #pi value 3.141593
> exp(2)   #Antilog, e raised to a power
> log10(5)   #Log of a number base 10
> factorial(5)   #Factorial of a number e.g 5!
> abs(1/-2)   #Absolute values of a number
> 2*pi/360   #Number of radian in one Babylonian degree of a circle

Remember R prints all very large or very small numbers in scientific notation.

R language also makes use of parentheses for grouping operations to follow the rules for order of operations. for example

> 1-2/3   #It first computes 2/3 and then subtracts it from 1
> (1-2)/3   #It first computes (1-2) and then divide it by 3

R recognizes certain goofs, like trying to divide by zero, missing values in data, etc.

> 1/0   #Undefined, R tells it an infinity (Inf)
> 0/0   #Not a number (NaN)
> “one”/2   #Strings or character is divided by a number

Further Reading: http://en.wikibooks.org/wiki/Statistical_Analysis:_an_Introduction_using_R/R/R_as_a_calculator

x Logo: Shield Security
This Site Is Protected By
Shield Security