11.5.1: Evaluate Algebraic Expressions
Learning Outcomes
- Evaluate an algebraic expression given values for the variables.
- Recognize given values in a word problem and evaluate an expression using these values.
There are many formulas that are encountered in a statistics class and the values of each variable will be given. It will be your task to carefully evaluate the expression after plugging in each of the given values into the formula. In order to be successful you should not rush through the process and you need to be aware of the order of operations and use parentheses when necessary.
Example \(\PageIndex{1}\)
Suppose that equation of the regression line for the number of days a week, \(x\), a person exercises and the number of days, \(\hat y\), a year a person is sick is:
\[\hat y=12.5\:-\:1.6x\nonumber \]
We use \(\hat y\) instead of \(y\) since this is a prediction instead of an actual data value's y-coordinate. Use this regression line to predict the number of times a person who exercises 4 days a week will be sick this year.
Solution
The first step is always to identify the variable or variables that are given. In this case, we have 4 days of exercise a week, so:
\[x=4\nonumber \]
Next, we plug in to get:
\[\hat y=12.5\:-\:1.6(4) = 6.1\nonumber \]
Since we are predicting the number of days a year being sick, it is a good idea to round to the nearest whole number. We get that the best prediction for the number of sick days for a person who exercises 4 days per week is that they will be sick 6 days this year.
Example \(\PageIndex{2}\)
For a yes/no question, a sample size is considered large enough to use a Normal distribution if
\(np>5\) and \(nq\:>5\)
where \(n\) is the sample size, \(p\) is the proportion of Yes answers, and \(q\) is the proportion of No answers. A survey was given to 59 American adults asking them if they were food insecure today. 6.8% of them said they were food insecure today. Was the sample size large enough to use the Normal distribution?
Solution
Our first task is to list out each of the needed variables. Let's start with \(n\), the sample size. We are given that 59 Americans were surveyed. Thus
\[n=59\nonumber \]
Next, we will find \(p\), the proportion of Yes answers. We are given that 6.8% said Yes. Since this is a percent and not a proportion, we must convert the percent to a proportion by moving the decimal place two places to the right. It helps to place a 0 to the left of the 6, so that the decimal point has a place to go. A common error is to rush through this and wrongly write down 0.68. Instead, the proportion is:
\[p=0.068\nonumber \]
Our next task is to find \(q\), the proportion of No answers. For a Yes/No question, the proportion of Yes answers and the proportion of No answers must always add up to 1. Thus:
\[q=1-0.068\:=\:0.932\nonumber \]
Now we are ready to plug into the two inequalities:
\[np=59\times0.068=4.012\nonumber \]
and
\[nq=59\times0.932=54.988\nonumber \]
Although \(nq\:=\:54.988>5\), we have \(np\:=\:4.012<5\), so the sample size was not large enough to use the Normal distribution.
Example \(\PageIndex{3}\)
For a quantitative study, the sample size, \(n\), needed in order to produce a confidence interval with a margin of error no more than \(\pm E\), is
\[n=\left(\frac{z\sigma}{E}\right)^2\nonumber \]
where \(z\) is a value that is determined from the confidence level and \(\sigma\) is the population standard deviation. You want to conduct a survey to estimate the population mean amount of years it takes psychologists to get through college and you require a margin of error of no more than \(\pm0.1\) years. Suppose that you know that the population standard deviation is 1.3 years. If you want a 95% confidence interval that comes with a \(z = 1.96\), at least how many psychologists must you survey? Round your answer up.
Solution
We start out by identifying the given values for each variable. Since we want a margin of error of no more than \(\pm0.1\), we have:
\[E\:=\:0.1\nonumber \]
We are told that the population standard is 1.3, so:
\[\sigma=1.3\nonumber \]
We are also given the value of \(z\):
\[z=1.96\nonumber \]
Now put this into the formula to get:
\[n=\left(\frac{1.96\times1.3}{0.1}\right)^2\nonumber \]
We put this into a calculator or computer to get:
\[\left(1.96\times1.3\div0.1\right)^2=649.2304\nonumber \]
We round up and can conclude that we need to survey 650 psychologists.
Example \(\PageIndex{4}\)
Based on the Central Limit Theorem, the standard deviation of the sampling distribution when samples of size \(n\) are taken from a population with standard deviation, \(\sigma\), is given by:
\[\sigma_\bar x=\frac{\sigma}{\sqrt{n}}\nonumber \]
If the population standard deviation for the number of customers who walk into a fast food restaurant is 12, what is the standard deviation of the sampling distribution for samples of size 35? Round your answer to two decimal places.
Solution
First we identify each of the given variables. Since the population standard deviation was 12, we have:
\[\sigma=12\nonumber \]
We are told that the sample size is 35, so:
\[n=35\nonumber \]
Now we put these numbers into the formula for the standard deviation of the sampling distribution to get:
\[\sigma_\bar x=\frac{12}{\sqrt{35}}\nonumber \]
We are now ready to put this into our calculator or computer. We put in:
\[\sigma_x=\frac{12}{\sqrt{35}}=12\div(35^\wedge 0.5) = 2.02837\nonumber \]
Rounded to two decimal places, we can say that the standard deviation of the sampling distribution is 2.03.
Example \(\PageIndex{5}\): Z score
The z-score for a given sample mean \(\bar x\) for a sampling distribution with population mean \(\mu \), population standard deviation \(\sigma \), and sample size \(n\) is given by:
\[z=\frac{\bar x-\mu}{\frac{\sigma}{\sqrt{n}}}\nonumber \]
An environmental scientist collected data on the amount of glacier retreat. She measured 45 glaciers. The population mean retreat is 22 meters and the population standard deviation is 16 meters. The sample mean for her data was 27 meters and the sample standard deviation for her data was 18 meters. What was the z-score?
Solution
First we identify each of the given variables. Since the sample mean was 27, we have:
\[\bar x = 27\nonumber \]
We are told that the population mean is 22 meters, so:
\[\mu=22\nonumber \]
We are also given that the population standard deviation is 16 meters, hence:
\[\sigma=16\nonumber \]
Finally, since she measured 45 glaciers, we have:
\[n=45\nonumber \]
Now we put the numbers into the formula for the z-score to get:
\[z=\frac{27-22}{\frac{16}{\sqrt{45}}}\nonumber \]
We are now ready to put this into our calculator or computer. We must pay attention to the order of operations and put parentheses around the numerator, since the subtraction happens for this expression before the division. We also must put parentheses around the denominator. We put in:
\[z=\left(27-22\right)\div\left(16\div\sqrt{45}\right)=2.0963\nonumber \]
Exercise
You want to come up with a 90% confidence interval for the proportion of people in your community who are obese and require a margin of error of no more than \(\pm3\%\). According to the Journal of the American Medical Association (JAMA) 34% of all Americans are obese. The equation to find the sample size, \(n\), needed in order to come up with a confidence interval is:
\(n=p\left(1-p\right)\left(\frac{z}{E}\right)^2\)
where \(p\) is the preliminary estimate for the population proportion. Based on calculations, \(z=1.645\). How many people in your community must you survey?