1.1: R and Data
How to enter the data from within R
We now need to know how to enter data into R . Basic command is c() (shortcut of the word concatenate ):
Code \(\PageIndex{1}\) (Python):
c(1, 2, 3, 4, 5)
However, in that way your numbers will be forgotten because R does not remember anything which is not saved into object :
Code \(\PageIndex{2}\) (Python):
aa <- c(2, 3, 4, 5, 6, 7, 8) aa
(Here we created an object aa , assigned to it vector of numbers from one to five, and then printed object with typing its name.)
If you want to create and print object simultaneously, use external parentheses:
Code \(\PageIndex{3}\) (Python):
(aa <- c(1, 2, 3, 4, 5, 6, 7, 8, 9)) aa
(By the way, here we created aa object again , and R silently re-wrote it. R never gives a warning if object already exists!)
In addition to c() , we can use commands rep() , seq() , and also the colon ( : ) operator :
Code \(\PageIndex{4}\) (Python):
rep(1, 5) rep(1:5, each=3) seq(1, 5) 1:5
How to name your objects
R has no strict rules on the naming your objects, but it is better to follow some guidelines:
- Keep in mind that R is case-sensitive , and, for example, X and x are different names.
- For objects, use only English letters, numbers, dot and (possibly) underscore. Do not put numbers and dots in the beginning of the name. One of recommended approaches is double-letter (or triple-letter) when you name objects like aa , jjj , xx and so on.
- In data frames, we recommend to name your columns (characters) with uppercase letters and dots . The examples are throughout of this book.
- Do not reassign names already given to popular functions (like c() ), reserved words (especially T , F , NA , NaN , Inf and NULL ) and predefined objects like pi \(^{[1]}\) , LETTERS and letters . If you accidentally did it, there is conflict() function to help in these situations. To see all reserved words, type ?Reserved .
How to load the text data
In essence, data which need to be processed could be of two kinds: text and binary . To avoid unnecessary details, we will accept here that text data is something which you can read and edit in the simple text editor like Geany\(^{[2]}\). But if you want to edit the binary data , you typically need a program which outputted this file in the past. Without the specific software, the binary data is not easy to read.
Text data for the statistical processing is usually text tables where every row corresponds with the table row, and columns are separated with delimiters , either invisible, like spaces or tab symbols, or visible, like commas or semicolons. If you want R to “ingest” this kind of data, is is necessary to make sure first that the data file is located within the same directory which R regards as a working directory :
Code \(\PageIndex{5}\) (Python):
getwd()
If this is not the directory you want, you can change it with the command:
Code \(\PageIndex{6}\) (Python):
setwd("e:\wrk\temp") getwd()
Note how R works with backslashes under Windows . Instead of one backslash, you need to enter two . Only in that case R under Windows will understand it. It is also possible to use slashes under Windows , similar to Linux and macOS :
Code \(\PageIndex{7}\) (Python):
setwd("e:/wrk/temp") getwd()
Please always start each of your R session from changing working directory . Actually, it is not absolutely necessary to remember long paths. You can copy it from your file manager into R . Then, graphical R under Windows and macOS have rudimentary menu system, and it is sometimes easier to change working directory though the menu . Finally, collection asmisc.r contains function Files() which is the textual file browser , so it is possible to run setwd(Files()) and then follow screen instructions\(^{[3]}\).
The next step after you got sure that the working directory is correct, is to check if your data file is in place, with dir() command:
Code \(\PageIndex{8}\) (Python):
dir("data")
It is really handy to separate data from all other stuff. Therefore, we assumed above that you have subdirectory data in you working directory, and your data files (including mydata.txt ) are in that subdirectory. Please create it (and of course, create the working directory ) if you do not have it yet. You can create these with your file manager, or even with R itself:
Code \(\PageIndex{9}\) (Python):
dir.create("data")
Now you can load your data with read.table() command. But wait a minute! You need to understand the structure of your file first.
Command read.table() is sophisticated but it is not smart enough to determine the data structure on the fly\(^{[4]}\). This is why you need to check data. You can open it in any available simple text editor, in your Web browser, or even from inside R with file.show() or url.show() command. It outputs the data “as is”. This is what you will see:
Code \(\PageIndex{10}\) (Python):
file.show("data/mydata.txt")
(By the way, if you type file.show("data/my and press Tab , completion will show you if your file is here—if it is really here. This will save both typing file name and checking the presence with dir() .)
How did the file mydata.txt appear in your data subdirectory? We assume that you already downloaded it from the repository mentioned in the foreword. If you did not do it, please do it now . It is possible to perform with any browser and even with R :
Code \(\PageIndex{11}\) (Python):
download.file("http://ashipunov.info/data/mydata.txt","data/mydata.txt")
(Within parentheses, left part is for URL whereas right tells R how to place and name the downloaded file.)
Alternatively, you can check your file directly from the URL with url.show() and then use read.table() from the same URL.
Now time finally came to load data into R . We know that all columns have names, and therefore use head=TRUE , and also know that the delimiter is the semicolon, this is why we use sep=";" :
Code \(\PageIndex{12}\) (Python):
mydata <- read.table("data/mydata.txt", sep=";", head=TRUE)
Immediately after we loaded the data, we must check the new object. There are three ways:
Code \(\PageIndex{13}\) (Python):
mydata <- read.table("data/mydata.txt", sep=";", head=TRUE) str(mydata)
Third way is to simply type mydata but this is not optimal since when data is large, your computer screen will be messed with content. Commands head() and str() are much more efficient.
To summarize, local data file should be loaded into R in three steps :
-
Make sure that you data is in place , with dir() command, Tab completion or through Web browser;
-
Take a look on data with file.show() or url.show() command and determine its structure;
-
Load it with read.table() command using appropriate options (see below).
How to load data from Internet
Loading remote data takes same three steps from above. However, as the data is not on disk but somewhere else, to check its presence, the best way is to open it in the Internet browser using URL which should be given to you; this also makes the second step because you will see its structure in the browser window. It is also possible to check the structure with the command:
Code \(\PageIndex{14}\) (Python):
url.show("http://ashipunov.info/data/mydata.txt")
Then you can run read.table() but with URL instead of the file name:
Code \(\PageIndex{15}\) (Python):
read.table("http://ashipunov.info/data/mydata.txt", sep=";", head=TRUE)
(Here and below we will sometimes skip creation of new object step. However, remember that you must create new object if you want to use the data in R later. Otherwise, the content will be shown and immediately forgotten.)
How to use read.table()
Sometimes, you want R to “ingest” not only column names but also row names:
Code \(\PageIndex{16}\) (Python):
read.table("data/mydata1.txt", head=TRUE)
(File mydata1.txt \(^{[5]}\) is constructed in the unusual way: its first row has three items whereas all other rows each have four items delimited with the tab symbol —“big invisible space”. Please do not forget to check that beforehand, for example using file.show() or url.show() command.)
Sometimes, there are both spaces (inside cells) and tabs (between cells):
Code \(\PageIndex{17}\) (Python):
read.table("data/mydata2.txt", sep=" ", quote="", head=TRUE)
If we run read.table() without sep="\t" option (which is “separator is a tab”), R will give an error. Try it . But why did it work for mydata1.txt ? This is because the default separator is both space and/or tab. If one of them used as the part of data, the other must be stated as separator explicitly.
Note also that since row names contain quote, quoting must be disabled, otherwise data will silently read in a wrong way.
How to know what separator is here, tab or space? This is usually simple as most editors, browsers and file.show() / url.show() commands visualize tab as a space which is much broader than single letter. However, do not forget to use monospaced font in your software, other fonts might be deceiving.
Sometimes, numbers have comma as a decimal separator (this is another worldwide standard). To input this kind of data, use dec option:
Code \(\PageIndex{18}\) (Python):
read.table("data/mydata3.txt", dec=",", se=";", h=T)
(Please note the shortcuts. Shortcuts save typing but could be dangerous if they match several possible names. There are only one read.table() argument which starts with se , but several of them start with s (e.g., skip ); therefore it is impossible to reduce se further, into s . Note also that TRUE and FALSE are possible to shrink into T and F , respectively (but this is the only possible way); we will avoid this in the book though.)
When read.table() sees character columns, it converts them into factors (see below). To avoid this behavior, use as.is=TRUE option.
Command scan() is similar to read.table() but reads all data into only one “column” (one vector). It has, however, one unique feature:
Code \(\PageIndex{19}\) (Python):
scan()
(What did happen here? First, we entered scan() with empty first argument , and R changed its prompt to numbers allowing to type numerical data in, element after element. To finish, enter empty row \(^{[6]}. One can paste here even numbers from the clipboard!)
How to load binary data
Functions from the foreign package (it is installed by default) can read data in MiniTab, S , SAS, SPSS, Stata, Systat, and FoxPro DBF binary formats. To find out more, you may want to call it first with command library(foreign) and then call help about all its commands help(package=foreign) .
R can upload images. There are multiple packages for this, one of the most developed is pixmap . R can also upload GIS maps of different formats including ArcInfo (packages maps , maptools and others).
R has its own binary format . It is very fast to write and to load\(^{[7]}\) (useful for big data) but impossible to use with any program other than R :
Code \(\PageIndex{20}\) (Python):
xx <- "apple" save(xx, file="xx.rd") exists("xx") rm(xx) exists("xx") dir() load("xx.rd") xx
(Here we used several new commands. To save and to load binary files, one needs save() and load() commands, respectively; to remove the object, there is rm() command. To show you that the object was deleted, we used exists() command.)
Note also that everything which is written after “ # ” symbol on the same text string is a comment . R skips all comments without reading.
There are many interfaces which connect R to databases including MySQL, PostgresSQL and sqlite (it is possible to call the last one directly from inside R see the documentation for RSQLite and sqldf packages).
But what most users actually need is to load the spreadsheet data made with MS Excel or similar programs (like Gnumeric or LibreOffice Calc). There are three ways.
First way we recommend to all users of this book: convert Excel file into the text , and then proceed with read.table() command explained above\(^{[8]}\). On macOS , the best way is likely to save data from spreadsheet as tab-delimited text file. On Windows and Linux , if you copy any piece of spreadsheet into clipboard and then paste it into text editor (including R script editor), it becomes the tab-delimited text. The same is possible in macOS but you will need to use some terminal editor (like nano ).
Another way is to use external packages which convert binary spreadsheets “on the fly”. One is readxl package with main command read_excel() , another is xlsx package with main command read.xlsx() . Please note that these packages are not available by default so you need to download and install them (see below for the explanations).
How to load data from clipboard
Third way is to use clipboard. It is easy enough: on Linux or Windows you will need to select data in the open spreadsheet, copy it to clipboard, and then in R window type command like:
Code \(\PageIndex{21}\) (Python):
read.table("clipboard", sep=" ", head=TRUE)
On macOS , this is slightly different:
Code \(\PageIndex{22}\) (Python):
read.table(pipe("pbpaste"), sep=" ", head=TRUE)
(Ignore warnings about “incomplete lines” or “closed connection”. Package clipr unifies the work with clipboard on main OSes.)
“Clipboard way” is especially good when your data come out of non-typical software. Note also that entering scan() and then pasting from clipboard (see above) work the same way on all systems.
Summarizing the above, recommended data workflow in R might look like:
-
Enter data into the spreadsheet;
-
Save it as a text file with known delimiters (tab and semicolon are preferable), headers and row names (if needed);
-
Load it into R with read.table() ;
-
If you must change the data in R , write it afterwards to the external file using write.table() command (see below);
-
Open it in the spreadsheet program again and proceed to the next round.
One of its big pluses of this workflow is the separation between data editing and data processing .
How to edit data in R
If there is a need to change existing objects, you could edit them through R . We do not recommend this though, spreadsheets and text editors are much more advanced then R internal tools.
Nevertheless, there is a spreadsheet sub-program embedded into R which is set to edit table-like objects (matrices or data frames). To start it on bb matrix (see above), enter command fix(bb) and edit “in place”. Everything which you enter will immediately change your object. This is somewhat contradictory with R principles so there is the similar function edit() which does not change the object but outputs the result to the R window.
For other types of objects (not table-like), commands fix() / edit() call internal (on Windows or macOS ) or external (on Linux ) text editor. To use external editor, you might need to supply an additional argument, edit(..., editor="name") where name could be any text editor which is available in the system.
R on Linux has vi editor as a default but it is too advanced for the beginner\(^{[9]}\); we recommend to use nano instead\(^{[10]}\). Also, there is a pico() command which is usually equal to edit(..., editor="nano") . nano editor is usually available also through the macOS terminal.
How to save the results
Beginners in R simply copy results of the work (like outputs from statistical tests) from the R console into some text file. This is enough if you are the beginner. Earlier or later, however, it becomes necessary to save larger objects (like data frames):
Code \(\PageIndex{23}\) (Python):
write.table(file="trees.txt", trees, row.names=FALSE, sep=" ", quote=FALSE)
(File trees.txt , which is made from the internal trees data frame, will be written into the working directory.)
Please be really careful with write.table() as R is perfectly silent if the file with the same name trees.txt is already here. Instead of giving you any warning, it simply overwrites it!
By the way, “internal data” means that it is accessible from inside R directly, without preliminary loading. You may want to check which internal data is available with command data() .
While a scan() is a single-vector variant of read.table() , write() command is the single-vector variant of write.table() .
It is now a good time to speak about file name conventions in this book. We highly recommend to follow these simply rules:
-
Use only lowercase English letters, numbers and underscore for the file and directory names (and also dot, but only to separate file extension).
-
Do not use uppercase letters, spaces and other symbols!
-
Make your names short, preferably shorter than 15–20 symbols.
-
For R command (script) files, use extension *.r
By the way, for the comfortable work in R , it is strongly recommended to change those options of your operating system which allow it to hide file extensions . On macOS , go to Finder preferences, choose Advanced tab and select the appropriate box. On Windows , click View tab in File Explorer , choose Options , then View again, unselect appropriate box and apply this to all folders. Linux , as a rule, does not hide file extensions.
But what if we need to write into the external file our results (like the output from statistical test)? There is the sink() command:
Code \(\PageIndex{24}\) (Python):
sink("1.txt", split=TRUE) 2+2 sink()
(Here the string “ [1] 4 ” will be written to the external file.),
We specified split=TRUE argument because we wanted to see the result on the screen. Specify also append=TRUE if you want to add output to the existing file. To stop sinking, use sink() without arguments. Be sure that you always close sink() !
There are many tools and external packages which enhance R to behave like full-featured report system which is not only calculates something for you but also helps you to write the results. One of the simplest is Rresults shell script ( http://ashipunov.info/shipunov/r ) which works on macOS and Linux . The appendix of the book explains Sweave system. There are also knitr and much more.
History and scripts
To see what you typed during the current R session, run history() \(^{[11]}\) :
Code \(\PageIndex{25}\) (Python):
history(100) # 100 last commands history(Inf) # all session commands history(p="plot") # last plot commands
If you want to save your history of commands , use savehistory() with the appropriate file name (in quotes) as argument\(^{[12]}).
While you work with this book, it is a good idea to use savehistory() and save all commands from each R session in the file named, saying, by the date (like 20170116.r ) and store this file in your working folder.
To do that on macOS , use menu R -> Preferences -> Startup -> History , uncheck Read history file on startup and and enter the name of today’s history file. When you close R , file will appear in your working directory.
To save all objects in the binary file, type save.image() . You may want to use it if, for example, you are experimenting with R .
R allows to create scripts which might be run later to reproduce your work. Actually, R scripts could be written in any text editor\(^{[13]}\).
In the appendix, there is much more about R scripts, but the following will help you to create your own first one:
-
Open the text editor, or just type file.edit("hello.r") \(^{[14]}\)
-
Write there the string print("Hello, world!")
-
Save the file under hello.r name in your working directory
-
Call it from R using the command source("hello.r")
- ... and you will see [1] "Hello, world!" in R console as if you typed it.
(In fact, you can even type in the script "Hello world!" without print() , R will understand what to do.)
Then, every time you add any R command to the hello.r , you will see more and more output. Try it.
To see input (commands) and output (results) together, type source("hello.r", echo=TRUE) .
Scripting is the “killer feature” of R . If all your data files are in place, and the R script is made, you may easily return to your calculations years later! Moreover, others can do exactly the same with your data and therefore your research becomes fully reproducible. Even more, if you find that your data must be changed, you run the same script and it will output results which take all changes into account.
Command source() allows to load commands not only from local file but also from Internet. You only need to replace file name with URL.
References
1. By the way, if you want the Euler number, e , type exp(1).
2. And also like editor which is embedded into R for Windows or into R macOS GUI, or the editor from rite R package, but not office software like MS Word or Excel!
3. Yet another possibility is to set working directory in preferences (this is quite different between op- erating systems) but this is not the best solution because you might (and likely will) want different working directories for different tasks.
4. There is rio package which can determine the structure of data.
5. Again, download it from Internet to data subdirectory first. Alternatively, replace subdirectory with URL and load it into R directly—of course, after you check the structure.
6. On macOS, type Enter twice.
7. With commands dput() and dget(), R also saves and loads textual representations of objects.
8. This is a bit similar to the joke about mathematician who, in order to boil the kettle full with water, would empty it first and therefore reduce the problem to one which was already solved !
9. If, by chance, it started and you have no idea how to quit, press uppercase ZQ.
10. Within nano, use Ctrl+O to save your edits and Ctrl+X to exit.
11. Does not work on graphical macOS.
12. Under graphical macOS, this command is not accessible, and you need to use application menu.
13. You can also use savehistory() command to make a “starter” script.
14. On Windows and macOS, this will open internal editor; on Linux, it is better to set editor option manually,e.g.,file.edit("hello.r", editor="geany").


13.3: Math and Medicine
- Compute the mathematical factors utilized in concentrations/dosages of drugs.
- Describe the history of validating effectiveness of a new drug.
- Describe how mathematical modeling is used to track the spread of a virus.
The pandemic that rocked the world starting in 2020 turned attention to finding a cure for the Covid-19 strain into a world race and dominated conversations from major news channels to households around the globe. News reports decreeing the number of new cases and deaths locally as well as around the world were part of the daily news for over a year and progress on vaccines soon followed. How was a vaccine able to be found so quickly? Is the vaccine safe? Is the vaccine effective? These and other questions have been raised through communities near and far and some remain debatable. However, we can educate ourselves on the foundations of these discussions and be more equipped to analyze new information related to these questions as it becomes available.
Concentrations and Dosages of Drugs
Consider any drug and the recommended dosage varies based on several factors such as age, weight, and degree of illness of a person. Hospitals and medical dispensaries do not stock every possible needed concentration of medicines. Drugs that are delivered in liquid form for intravenous (IV) methods in particular can be easily adjusted to meet the needs of a patient. Whether administering anesthesia prior to an operation or administering a vaccine, calculation of the concentration of a drug is needed to ensure the desired amount of medicine is delivered.
The formula to determine the volume needed of a drug in liquid form is a relatively simple formula. The volume needed is calculated based on the required dosage of the drug with respect to the concentration of the drug. For drugs in liquid form, the concentration is noted as the amount of the drug per the volume of the solution that the drug is suspended in which is commonly measured in g/mL or mg/mL.
Suppose a doctor writes a prescription for 6 mg of a drug, which a nurse calculates when retrieving the needed prescription from their secure pharmaceutical storage space. On the shelves, the drug is available in liquid form as 2 mg per mL. This means that 1 mg of the drug is found in 0.5 mL of the solution. Multiplying 6 mg by 0.5 mL yields 3 mL, which is the volume of the prescription per single dose.
.
A common calculation for the weight of a liquid drug is measured in grams of a drug per 100 mL of solution and is also called the percentage weight by volume measurement and labeled as % w/v or simply w/v.
Note that the units for a desired dose of a drug and the units for a solution containing the drug or pill form of the drug must be the same. If they are not the same, the units must first be converted to be measured in the same units.
 One possible recourse is sodium bicarbonate, which aids in reducing stomach acid.
How much sodium bicarbonate is there in a 250 mL solution of 1.58% w/v sodium bicarbonate?
- Answer
-
sodium bicarbonate in 100 mL. If there is 250 mL of the solution, we have 2.5 times as much sodium bicarbonate as in 100 mL. Thus, we multiply 1.58 by 2.5 to yield 3.95 g sodium bicarbonate in 250 mL solution.
How many milligrams of sodium chloride are there in 200 mL of a 0.9% w/v normal saline solution?
A doctor prescribes 25.5 mg of a drug to take orally per day and pills are available in 8.5 mg. How many pills will be needed each day?
- Answer
-
The prescription and the pills are in the same units which means no conversions are needed. We can divide the units of the drug prescribed by the units in each pill: . So, 3 pills will be needed each day.
How many pills would be needed for a patient who has been prescribed 25.5 mg of a drug if each pill contains 4.25 mg.
A patient is prescribed 2 mg/kg of a drug to be delivered intramuscularly, divided into 3 doses per day. If the patient weighs 45 kg, how many milligrams of the drug should be given per dose?
- Answer
-
Step 1: Calculate the total daily dose of the drug based on the patient’s weight (measured in kilograms):
Step 2: Divide the total daily dose by the number of doses per day:
The patient should receive 30 mg of the drug in each dose.
A patient is prescribed 1.4 mg/kg of a drug to be delivered intramuscularly, divided into 2 doses per day. If the patient weighs 60 kg, how many milliliters of the drug should be given per dose?
Note that the units for a patient’s weight must be compatible with the units used in the medicine measurement. If they are not the same, the units must first be converted to be measured in the same units.
A patient is prescribed 2 mg/kg of a drug to be delivered intramuscularly, divided into 3 doses per day. If the drug is available in 20 mg/mL and the patient weighs 60 kg, how many milliliters of the drug should be given per dose?
- Answer
-
Step 1: Calculate the total daily dose of the drug (measured in milligrams) based on the patient’s weight (measured in kilograms):
Step 2: Calculate the volume in each dose:
Step 3: Calculate the volume based on the strength of the stock:
The patient should receive 2 mL of the stock drug in each dose.
A patient is prescribed 2.5 mg/kg of a drug to be delivered intramuscularly, divided into 2 doses per day. If the drug is available in 5 mg/mL and the patient weighs 52 kg, how many milligrams of the drug should be given per dose?
The Centers for Disease Control and Prevention (CDC) states that about half the U.S. population in 2019 used at least one prescription drug each month, and about 25% of people used three or more prescription drugs in a month. The resulting overall collective impact of the pharmaceutical industry in the United States exceeded $1.3 trillion a year prior to the 2020 pandemic.
Validating Effectiveness of a New Vaccine
The process to develop a new vaccine and be able to offer it to the public typically takes 10 to 15 years. In the United States, the system typically involves both public and private participation in a process. During the 1900s, several vaccines were successfully developed, including the following: polio vaccine in the 1950s and chickenpox vaccine in the 1990s. Both of these vaccines took years to be developed, tested, and available to the public. Knowing the typical timeline for a vaccine to move from development to administration, it is not surprising that some people wondered how a vaccine for Covid-19 was released in less than a year’s time.
Lesser known is that research on coronavirus vaccines has been in process for approximately 10 years. Back in 2012, concern over the Middle Eastern respiratory syndrome (MERS) broke out and scientists from all over the world began working on researching coronaviruses and how to combat them. It was discovered that the foundation for the virus is a spike protein, which, when delivered as part of a vaccine, causes the human body to generate antibodies and is the platform for coronavirus vaccines.
When the Covid-19 pandemic broke out, Operation Warp Speed, fueled by the U.S. federal government and private sector, poured unprecedented human resources into applying the previous 10 years of research and development into targeting a specific vaccine for the Covid-19 strain.
Dr. Shibo Jiang, MD, PhD, is co-director the Center for Vaccine Development at the Texas Children’s Hospital and head of a virology group at the New York Blood Center. Together with his colleagues, Jiang has been working on vaccines and treatments for a range of viruses and infections including influenzas, HIV, Sars, HPV and more recently Covid-19. His work has been recognized around the world and is marked with receiving grants amounting to over $20 million from U.S. sources as well as the same from foundations in China, producing patents in the United States and China for his antiviral products to combat world concerns.
Jiang has been a voice for caution in the search for a vaccine for Covid-19, emphasizing the need for caution to ensure safety in the development and deployment of a vaccine. His work and that of his colleagues for over 10 years on other coronaviruses paved the way for the vaccines that have been shared to combat the Covid-19 pandemic.
Mathematical Modeling to Track the Spread of a Vaccine
With a large number of people receiving a Covid-19 vaccine, the concern at this time is how to create an affordable vaccine to reach people all over the world. If a world solution is not found, those without access to a vaccine will serve as incubators to variants that might be resistant to the existing vaccines.
As we work to vaccinate the world, attention continues with tracking the spread of the Covid-19 and its multiple variants. Mathematical modeling is the process of creating a representation of the behavior of a system using mathematical language. Digital mathematical modeling plays a key role in analyzing the vast amounts of data reported from a variety of sources such as hospitals and apps on cell phones.
When attempting to represent an observed quantitative data set, mathematical models can aid in finding patterns and concentrations as well as aid in predicting growth or decline of the system. Mathematical models can also be useful to determine strengths and vulnerabilities of a system, which can be helpful in arresting the spread of a virus.
The chapter on Graph Theory explores one such method of mathematical modeling using paths and circuits. Cell phones have been helpful in tracking the spread of the Covid-19 virus using apps regulated by regional government public health authorities to collect data on the network of people exposed to an individual who tests positive for the Covid-19 virus.
Dr. Gladys West is a mathematician and hidden figure with a rich résumé of accomplishments spanning Air Force applications and work at NASA. Born in 1930, West rose and excelled both academically and in her professional life at a time when Black women were not embraced in STEM positions. One of her many accomplishments is the Global Positioning System (GPS) used on cell phones for driving directions.
West began work as a human computer, someone who computes mathematical computations by hand. Considering the time and complexity of some calculations, she became involved in programming computers to crunch computations. Eventually, West created a mathematical model of Earth with detail and precision that made GPS possible, which is utilized in an array of devices from satellites to cell phones. The next time you tag a photo or obtain driving directions, you are tapping into the mathematical modeling of Earth that West developed.
Consider the following graph (Figure
):At the center of the graph, we find Alyssa, whom we will consider positive for a virus. Utilizing the technology of phone apps voluntarily installed on each phone of the individuals in the graph, tracking of the spread of the virus among the 6 individuals that Alyssa had direct contact with can be implemented, namely Suad, Rocio, Braeden, Soren, and Sandra.
Let’s look at José’s exposure risk as it relates to Alyssa. There are multiple paths connecting José with Alyssa. One path includes the following individuals: José to Mikaela to Nate to Sandra to Alyssa. This path contains a length of 4 units, or people, in the contact tracing line. There are 2 more paths connecting José to Alyssa. A second path of the same length consists of José to Lucia to Rocio to Braeden to Alyssa. Path 3 is the shortest and consists of José to Lucia to Rocio to Alyssa. Tracking the spread of positive cases in the line between Alyssa and José aids in monitoring the spread of the infection.
Now consider the complexity of tracking a pandemic across the nation. Graphs such as the one above are not practical to be drawn on paper but can be managed by computer programs capable of computing large volumes of data. In fact, a computer-generated mathematical model of contact tracing would look more like a sphere with paths on the exterior as well as on the interior. Mathematical modeling of contact tracing is complex and feasible through the use of technology.
For the following exercises, use the sample contact tracing graph to identify paths (Figure
).- How many people have a path of length 2 from Jeffrey?
- Find 2 paths between Kayla and Rohan.
- Find the shortest path between Yara and Kalani. State the length and people in the path.
- Answer
-
- 5 (Lura, Naomi, Kalani, Vega, Yara)
-
Answers will vary. Two possible answers are as follows:
- Kayla, Jeffrey, Rohan
- Kayla, Lura, Yara, Lev, Vega, Uma, Kalani, Rohan
- Length is 4. People in path = Yara, Lev, Vega, Uma, Kalani
For the following exercises, use Figure
.List all the names of those who have a path length of three from Uma.
What is the length of the shortest path from Naomi to Vega?
Check Your Understanding
What two pieces of information are needed to calculate the volume of a prescription drug to be dispensed?
Research on coronavirus vaccines began in 2020.
-
True
-
False
What is mathematical modeling, and how is it used in the world of medicine with pandemics?


2.2: Acknowledging Fear
What scares people the most about public speaking? The bullet points below outline common fears people share about public speaking:
- Fear of eye contact . Most people have a natural desire to avoid being the center of attention within a crowd, and if and when that moment strikes, it can feel very unnerving.
- Fear of failure . Similarly, making a fool of oneself presents an almost equally daunting phobia.
- Traumatic public speaking experience . Many students can vividly recount stories where they botched a presentation in front of their peers, effectively creating a mental block, often leading to higher-than-average anxiety when faced with the prospect of public speaking.
- Clinical anxiety . Some rare individuals have cases of extreme anxiety in any social situation due to social, biological, or a variety of different reasons. For these individuals, public speaking may seem to present an insurmountable challenge.
Most people possess not merely one of these fears, but combinations of them (or, in the worst-case scenario, all of them). Regardless, the most important place for individuals to start in learning to cope with these fears (and later, use them to their advantage) is to recognize their onset and acknowledge their existence. Novice speakers can sabotage their chances for success by ignoring these fears or pretending they will not affect their performance—because they most certainly will. Ignoring these fears can lead to a false sense of confidence, allowing them to creep up and strike at the worst possible moment.
All too often, novice speakers make the mistake of thinking they need to conquer or overcome their fear, but that type of thinking can set a speaker up for failure. Fear is a necessary component of public speaking.  It can keep people alert and provide them with necessary energy. Above all, it makes the speaker care about how well he or she perform. In public speaking an old saying goes: “Speakers who say they are as cool as a cucumber usually give speeches about as interesting as a cucumber.” Overconfidence has probably flattened more potentially interesting and engaging speeches than nervousness ever has.
Note to Self
The following sections detail various strategies and techniques for coping with anxiety, as well as providing useful tactics to redirect this nervous energy into a more positive outcome.


1.4: WATCH- Bases of Power
Watch the following video: Bases of Power
Within Section 13.3 of your textbook, you were introduced to the sources of power leaders utilize to influence others. Within this video, the speaker discusses the five types of power that are identified in your textbook.
Note: He also identifies a sixth type (Informational power), which your textbook addresses within the Expert power category.
After watching the video, how do you think leaders most effectively exercise their influence? Reflect on your own life experiences and the leaders you have encountered.
- Consider your current or previous professional roles.
- Consider your experience in school, sports, or any volunteer work you have done.
Which types of influence have you experienced? Which types of influence have you exercised over others?


29.2: Lyndon Johnson and the Great Society
On November 27, 1963, a few days after taking the oath of office, President Johnson addressed a joint session of Congress and vowed to accomplish the goals that John F. Kennedy had set and to expand the role of the federal government in securing economic opportunity and civil rights for all. Johnson brought to his presidency a vision of a Great Society in which everyone could share in the opportunities for a better life that the United States offered, and in which the words “liberty and justice for all” would have real meaning.
THE GREAT SOCIETY
In May 1964, in a speech at the University of Michigan, Lyndon Johnson described in detail his vision of the Great Society he planned to create (Figure 29.2.1). When the Eighty-Ninth Congress convened the following January, he and his supporters began their effort to turn the promise into reality. By combatting racial discrimination and attempting to eliminate poverty, the reforms of the Johnson administration changed the nation.
One of the chief pieces of legislation that Congress passed in 1965 was the Elementary and Secondary Education Act (Figure 29.2.1). Johnson, a former teacher, realized that a lack of education was the primary cause of poverty and other social problems. Educational reform was thus an important pillar of the society he hoped to build. This act provided increased federal funding to both elementary and secondary schools, allocating more than $1 billion for the purchase of books and library materials, and the creation of educational programs for disadvantaged children. The Higher Education Act, signed into law the same year, provided scholarships and low-interest loans for the poor, increased federal funding for colleges and universities, and created a corps of teachers to serve schools in impoverished areas.
Education was not the only area toward which Johnson directed his attention. Consumer protection laws were also passed that improved the safety of meat and poultry, placed warning labels on cigarette packages, required “truth in lending” by creditors, and set safety standards for motor vehicles. Funds were provided to improve public transportation and to fund high-speed mass transit. To protect the environment, the Johnson administration created laws protecting air and water quality, regulating the disposal of solid waste, preserving wilderness areas, and protecting endangered species. All of these laws fit within Johnson’s plan to make the United States a better place to live. Perhaps influenced by Kennedy’s commitment to the arts, Johnson also signed legislation creating the National Endowment for the Arts and the National Endowment for the Humanities, which provided funding for artists and scholars. The Public Broadcasting Act of 1967 authorized the creation of the private, not-for-profit Corporation for Public Broadcasting, which helped launch the Public Broadcasting Service (PBS) and National Public Radio (NPR) in 1970.
In 1965, the Johnson administration also encouraged Congress to pass the Immigration and Nationality Act, which essentially overturned legislation from the 1920s that had favored immigrants from western and northern Europe over those from eastern and southern Europe. The law lifted severe restrictions on immigration from Asia and gave preference to immigrants with family ties in the United States and immigrants with desirable skills. Although the measure seemed less significant than many of the other legislative victories of the Johnson administration at the time, it opened the door for a new era in immigration and made possible the formation of Asian and Latin American immigrant communities in the following decades.
While these laws touched on important aspects of the Great Society, the centerpiece of Johnson’s plan was the eradication of poverty in the United States. The war on poverty, as he termed it, was fought on many fronts. The 1965 Housing and Urban Development Act offered grants to improve city housing and subsidized rents for the poor. The Model Cities program likewise provided money for urban development projects and the building of public housing.
The Economic Opportunity Act (EOA) of 1964 established and funded a variety of programs to assist the poor in finding jobs. The Office of Economic Opportunity (OEO), first administered by President Kennedy’s brother-in-law Sargent Shriver, coordinated programs such as the Jobs Corps and the Neighborhood Youth Corps, which provided job training programs and work experience for the disadvantaged. Volunteers in Service to America recruited people to offer educational programs and other community services in poor areas, just as the Peace Corps did abroad. The Community Action Program, also under the OEO, funded local Community Action Agencies, organizations created and managed by residents of disadvantaged communities to improve their own lives and those of their neighbors. The Head Start program, intended to prepare low-income children for elementary school, was also under the OEO until it was transferred to Department of Health, Education, and Welfare in 1969.
The EOA fought rural poverty by providing low-interest loans to those wishing to improve their farms or start businesses (Figure 29.2.2). EOA funds were also used to provide housing and education for migrant farm workers. Other legislation created jobs in Appalachia, one of the poorest regions in the United States, and brought programs to Indian reservations. One of EOA’s successes was the Rough Rock Demonstration School on the Navajo Reservation that, while respecting Navajo traditions and culture, also trained people for careers and jobs outside the reservation.
The Johnson administration, realizing the nation’s elderly were among its poorest and most disadvantaged citizens, passed the Social Security Act of 1965. The most profound change made by this act was the creation of Medicare, a program to pay the medical expenses of those over sixty-five. Although opposed by the American Medical Association, which feared the creation of a national healthcare system, the new program was supported by most citizens because it would benefit all social classes, not just the poor. The act and subsequent amendments to it also provided coverage for self-employed people in certain occupations and expanded the number of disabled who qualified for benefits. The following year, the Medicaid program allotted federal funds to pay for medical care for the poor.
JOHNSON’S COMMITMENT TO CIVIL RIGHTS
The eradication of poverty was matched in importance by the Great Society’s advancement of civil rights. Indeed, the condition of the poor could not be alleviated if racial discrimination limited their access to jobs, education, and housing. Realizing this, Johnson drove the long-awaited civil rights act, proposed by Kennedy in June 1963 in the wake of riots at the University of Alabama, through Congress. Under Kennedy’s leadership, the bill had passed the House of Representatives but was stalled in the Senate by a filibuster. Johnson, a master politician, marshaled his considerable personal influence and memories of his fallen predecessor to break the filibuster. The Civil Rights Act of 1964, the most far-reaching civil rights act yet passed by Congress, banned discrimination in public accommodations, sought to aid schools in efforts to desegregate, and prohibited federal funding of programs that permitted racial segregation. Further, it barred discrimination in employment on the basis of race, color, national origin, religion, or gender, and established an Equal Employment Opportunity Commission.
Protecting African Americans’ right to vote was as important as ending racial inequality in the United States. In January 1964, the Twenty-Fourth Amendment, prohibiting the imposition of poll taxes on voters, was finally ratified. Poverty would no longer serve as an obstacle to voting. Other impediments remained, however. Attempts to register southern African American voters encountered white resistance, and protests against this interference often met with violence. On March 7, 1965, a planned protest march from Selma, Alabama, to the state capitol in Montgomery, turned into “Bloody Sunday” when marchers crossing the Edmund Pettus Bridge encountered a cordon of state police, wielding batons and tear gas (Figure 29.2.3). Images of white brutality appeared on television screens throughout the nation and in newspapers around the world.
Figure 29.2.3: African American marchers in Selma, Alabama, were attacked by state police officers in 1965, and the resulting “Bloody Sunday” helped create support for the civil rights movement among northern whites. (credit: Library of Congress)
Deeply disturbed by the violence in Alabama and the refusal of Governor George Wallace to address it, Johnson introduced a bill in Congress that would remove obstacles for African American voters and lend federal support to their cause. His proposal, the Voting Rights Act of 1965, prohibited states and local governments from passing laws that discriminated against voters on the basis of race (Figure 29.2.4). Literacy tests and other barriers to voting that had kept ethnic minorities from the polls were thus outlawed. Following the passage of the act, a quarter of a million African Americans registered to vote, and by 1967, the majority of African Americans had done so. Johnson’s final piece of civil rights legislation was the Civil Rights Act of 1968, which prohibited discrimination in housing on the basis of race, color, national origin, or religion.
INCREASED COMMITMENT IN VIETNAM
Building the Great Society had been Lyndon Johnson’s biggest priority, and he effectively used his decades of experience in building legislative majorities in a style that ranged from diplomacy to quid pro quo deals to bullying. In the summer of 1964, he deployed these political skills to secure congressional approval for a new strategy in Vietnam—with fateful consequences.
President Johnson had never been the cold warrior Kennedy was, but believed that the credibility of the nation and his office depended on maintaining a foreign policy of containment. When, on August 2, the U.S. destroyer USS Maddox conducted an arguably provocative intelligence-gathering mission in the gulf of Tonkin, it reported an attack by North Vietnamese torpedo boats. Two days later, the Maddox was supposedly struck again, and a second ship, the USS Turner Joy , reported that it also had been fired upon. The North Vietnamese denied the second attack, and Johnson himself doubted the reliability of the crews’ report. The National Security Agency has since revealed that the August 4 attacks did not occur. Relying on information available at the time, however, Secretary of Defense Robert McNamara reported to Congress that U.S. ships had been fired upon in international waters while conducting routine operations. On August 7, with only two dissenting votes, Congress passed the Gulf of Tonkin Resolution, and on August 10, the president signed the resolution into law. The resolution gave President Johnson the authority to use military force in Vietnam without asking Congress for a declaration of war. It dramatically increased the power of the U.S. president and transformed the American role in Vietnam from advisor to combatant.
In 1965, large-scale U.S. bombing of North Vietnam began. The intent of the campaign, which lasted three years under various names, was to force the North to end its support for the insurgency in the South. More than 200,000 U.S. military personnel, including combat troops, were sent to South Vietnam. At first, most of the American public supported the president’s actions in Vietnam. Support began to ebb, however, as more troops were deployed. Frustrated by losses suffered by the South’s Army of the Republic of Vietnam (ARVN), General William Westmoreland called for the United States to take more responsibility for fighting the war. By April 1966, more Americans were being killed in battle than ARVN troops. Johnson, however, maintained that the war could be won if the United States stayed the course, and in November 1967, Westmoreland proclaimed the end was in sight.
To hear one soldier’s story about his time in Vietnam, listen to Sergeant Charles G. Richardson’s recollections of his experience on the ground and his reflections on his military service.
Westmoreland’s predictions were called into question, however, when in January 1968, the North Vietnamese launched their most aggressive assault on the South, deploying close to eighty-five thousand troops. During the Tet Offensive, as these attacks were known, nearly one hundred cities in the South were attacked, including the capital of Saigon (Figure 29.2.5). In heavy fighting, U.S. and South Vietnamese forces recaptured all the points taken by the enemy.
Although North Vietnamese forces suffered far more casualties than the roughly forty-one hundred U.S. soldiers killed, public opinion in the United States, fueled by graphic images provided in unprecedented media coverage, turned against the war. Disastrous surprise attacks like the Tet Offensive persuaded many that the war would not be over soon and raised doubts about whether Johnson’s administration was telling the truth about the real state of affairs. In May 1968, with over 400,000 U.S. soldiers in Vietnam, Johnson began peace talks with the North.
It was too late to save Johnson himself, however. Many of the most outspoken critics of the war were Democratic politicians whose opposition began to erode unity within the party. Minnesota senator Eugene McCarthy, who had called for an end to the war and the withdrawal of troops from Vietnam, received nearly as many votes in the New Hampshire presidential primary as Johnson did, even though he had been expected to fare very poorly. McCarthy’s success in New Hampshire encouraged Robert Kennedy to announce his candidacy as well. Johnson, suffering health problems and realizing his actions in Vietnam had hurt his public standing, announced that he would not seek reelection and withdrew from the 1968 presidential race.
THE END OF THE GREAT SOCIETY
Perhaps the greatest casualty of the nation’s war in Vietnam was the Great Society. As the war escalated, the money spent to fund it also increased, leaving less to pay for the many social programs Johnson had created to lift Americans out of poverty. Johnson knew he could not achieve his Great Society while spending money to wage the war. He was unwilling to withdraw from Vietnam, however, for fear that the world would perceive this action as evidence of American failure and doubt the ability of the United States to carry out its responsibilities as a superpower.
Vietnam doomed the Great Society in other ways as well. Dreams of racial harmony suffered, as many African Americans, angered by the failure of Johnson’s programs to alleviate severe poverty in the inner cities, rioted in frustration. Their anger was heightened by the fact that a disproportionate number of African Americans were fighting and dying in Vietnam. Nearly two-thirds of eligible African Americans were drafted, whereas draft deferments for college, exemptions for skilled workers in the military industrial complex, and officer training programs allowed white middle-class youth to either avoid the draft or volunteer for a military branch of their choice. As a result, less than one-third of white men were drafted.
Although the Great Society failed to eliminate suffering or increase civil rights to the extent that Johnson wished, it made a significant difference in people’s lives. By the end of Johnson’s administration, the percentage of people living below the poverty line had been cut nearly in half. While more people of color than whites continued to live in poverty, the percentage of poor African Americans had decreased dramatically. The creation of Medicare and Medicaid as well as the expansion of Social Security benefits and welfare payments improved the lives of many, while increased federal funding for education enabled more people to attend college than ever before. Conservative critics argued that, by expanding the responsibilities of the federal government to care for the poor, Johnson had hurt both taxpayers and the poor themselves. Aid to the poor, many maintained, would not only fail to solve the problem of poverty but would also encourage people to become dependent on government “handouts” and lose their desire and ability to care for themselves—an argument that many found intuitively compelling but which lacked conclusive evidence. These same critics also accused Johnson of saddling the United States with a large debt as a result of the deficit spending (funded by borrowing) in which he had engaged.
Section Summary
Lyndon Johnson began his administration with dreams of fulfilling his fallen predecessor’s civil rights initiative and accomplishing his own plans to improve lives by eradicating poverty in the United States. His social programs, investments in education, support for the arts, and commitment to civil rights changed the lives of countless people and transformed society in many ways. However, Johnson’s insistence on maintaining American commitments in Vietnam, a policy begun by his predecessors, hurt both his ability to realize his vision of the Great Society and his support among the American people.
Review Questions
________ was Johnson’s program to provide federal funding for healthcare for the poor.
- Medicare
- Social Security
- Medicaid
- AFDC
C
Many Americans began to doubt that the war in Vietnam could be won following ________.
- Khe Sanh
- Dien Bien Phu
- the Tonkin Gulf incident
- the Tet Offensive
D
How did the actions of the Johnson administration improve the lives of African Americans?
The social programs of the Great Society, such as Medicaid, job training programs, and rent subsidies, helped many poor African Americans. All African American citizens were aided by the passage of the Civil Rights Act of 1964, which ended discrimination in employment and prohibited segregation in public accommodations; the Voting Rights Act of 1965, which prohibited literacy tests and other racially discriminatory restrictions on voting; and the Civil Rights Act of 1968, which outlawed discrimination in housing.
Glossary
- Great Society
- Lyndon Johnson’s plan to eliminate poverty and racial injustice in the United States and to improve the lives of all Americans
- war on poverty
- Lyndon Johnson’s plan to end poverty in the Unites States through the extension of federal benefits, job training programs, and funding for community development


10.2: Appendix A (Part 2)
§ 4. Physical Meaning of the Equations Obtained in Respect to Moving Rigid Bodies and Moving Clocks
We envisage a rigid sphere 26 of radius R, at rest relative to the moving system k, and with its centre at the origin of coordinates of k. The equation of the surface of this sphere moving relative to the system K with velocity v is
\[\xi^{2} + \eta^{2} + \zeta^{2} = R^{2} \ldotp\]
Note
That is, a body possessing spherical form when examined at rest.—AS
The equation of this surface expressed in x, y, z at the time t = 0 is
\[\frac{x^{2}}{\left(\sqrt{1 - \dfrac{v^{2}}{c^{2}}} \right)^{2}} + y^{2} + z^{2} = R^{2} \ldotp\]
A rigid body which, measured in a state of rest, has the form of a sphere, therefore has in a state of motion—viewed from the stationary system—the form of an ellipsoid of revolution with the axes
\[R \sqrt{1 - \frac{v^{2}}{c^{2}}}, R, R \ldotp\]
Thus, whereas the Y and Z dimensions of the sphere (and therefore of every rigid body of no matter what form) do not appear modified by the motion, the X dimension appears shortened in the ratio 1 : \(sqrt{1 − \frac{v^{2}}{c^{2}}}\), i.e., the greater the value of v, the greater the shortening. For v = c all moving objects—viewed from the “stationary” system—shrivel up into plane figures. 27 For velocities greater than that of light our deliberations become meaningless; we shall, however, find in what follows, that the velocity of light in our theory plays the part, physically, of an infinitely great velocity.
Note
That is, a body possessing spherical form when examined at rest.—AS
It is clear that the same results hold good of bodies at rest in the “stationary” system, viewed from a system in uniform motion.
Further, we imagine one of the clocks which are qualified to mark the time t when at rest relative to the stationary system, and the time \(\tau\) when at rest relative to the moving system, to be located at the origin of the coordinates of k, and so adjusted that it marks the time \(\tau\). What is the rate of this clock, when viewed from the stationary system?
Between the quantities x, t, and \(\tau\), which refer to the position of the clock, we have, evidently, x = vt and
\[\tau = \frac{1}{\sqrt{1 - \frac{v^{2}}{c^{2}}}} \left( t - \dfrac{vx}{c^{2}} \right) \ldotp\]
Therefore,
\[\tau = t \sqrt{1 - \frac{v^{2}}{c^{2}}} = t - \left( 1 - \sqrt{1 - \dfrac{v^{2}}{c^{2}}} \right) t\]
whence it follows that the time marked by the clock (viewed in the stationary system) is slow by 1 − \(\sqrt{1 − \frac{v^{2}}{c^{2}}}\) seconds per second, or—neglecting magnitudes of fourth and higher order—by \(\frac{1}{2} \frac{v^{2}}{c^{2}}\).
From this there ensues the following peculiar consequence. If at the points A and B of K there are stationary clocks which, viewed in the stationary system, are synchronous; and if the clock at A is moved with the velocity v along the line AB to B, then on its arrival at B the two clocks no longer synchronize, but the clock moved from A to B lags behind the other which has remained at B by \(\frac{1}{2} \frac{tv^{2}}{c^{2}}\) (up to magnitudes of fourth and higher order), t being the time occupied in the journey from A to B.
It is at once apparent that this result still holds good if the clock moves from A to B in any polygonal line, and also when the points A and B coincide.
If we assume that the result proved for a polygonal line is also valid for a continuously curved line, we arrive at this result: If one of two synchronous clocks at A is moved in a closed curve with constant velocity until it returns to A, the journey lasting t seconds, then by the clock which has remained at rest the travelled clock on its arrival at A will be \(\frac{1}{2} \frac{tv^{2}}{c^{2}}\) second slow. Thence we conclude that a spring-clock at the equator must go more slowly, by a very small amount, than a precisely similar clock situated at one of the poles under otherwise identical conditions. 28
Note
Einstein specifies a spring-clock (“unruhuhr”) because the effective gravitational field is weaker at the equator than at the poles, so a pendulum clock at the equator would run more slowly by about two parts per thousand than one at the north pole, for nonrelativistic reasons. This would completely mask any relativistic effect, which he expected to be on the order of \(\frac{v^{2}}{c^{2}}\), or about 10 −13 . In any case, it later turned out that Einstein was mistaken about this example. There is also a gravitational time dilation that cancels the kinematic effect. See example 10 . The two clocks would actually agree.—BC
§ 5. The Composition of Velocities
In the system k moving along the axis of X of the system K with velocity v, let a point move in accordance with the equations
\[\xi = w_{\xi} \tau, \quad \eta = w_{\eta} \tau, \quad \zeta = 0,\]
where \(w_{\xi}\) and \(w_{\eta}\) denote constants.
Required: the motion of the point relative to the system K. If with the help of the equations of transformation developed in § 3 we introduce the quantities x, y, z, t into the equations of motion of the point, we obtain
\[\begin{split} x &= \frac{w_{\xi} + v}{1 + \frac{vw_{\xi}}{c^{2}}} t, \\ y &= \frac{\sqrt{1 - \frac{v^{2}}{c^{2}}}}{1 + \frac{vw_{\xi}}{c^{2}}} w_{\eta} t, \\ z &= 0 \ldotp \end{split}\]
Thus the law of the parallelogram of velocities is valid according to our theory only to a first approximation. We set 29
\[\begin{split} V^{2} &= \left(\dfrac{dx}{dt} \right)^{2} + \left(\dfrac{dy}{dt} \right)^{2}, \\ w^{2} &= w^{2}_{\xi} + w^{2}_{\eta}, \\ a &= \tan^{-1} \frac{w_{\eta}}{w_{\xi}}, \end{split}\]
a is then to be looked upon as the angle between the velocities v and w. After a simple calculation we obtain
\[V = \frac{\sqrt{(v^{2} + w^{2} + 2vw \cos a) - (vw \sin \frac{a}{c})^{2}}}{1 + vw \cos \frac{a}{c^{2}}} \ldotp\]
Note
This equation was incorrectly given in Einstein’s original paper and the 1923 English translation as a = tan −1 \(\frac{w_{y}}{w_{x}}\).—JW
It is worthy of remark that v and w enter into the expression for the resultant velocity in a symmetrical manner. If w also has the direction of the axis of X, we get
\[V = \frac{v + w}{1 + \frac{vw}{c^{2}}} \ldotp\]
It follows from this equation that from a composition of two velocities which are less than c, there always results a velocity less than c. For if we set v = c − \(\kappa\), w = c − \(\lambda\), \(\kappa\) and \(\lambda\) being positive and less than c, then
\[V = c \frac{2c - \kappa - \lambda}{2c - \kappa - \lambda + \frac{\kappa \lambda}{c}} < c \ldotp\]
It follows, further, that the velocity of light c cannot be altered by composition with a velocity less than that of light. For this case we obtain
\[V = \frac{c + w}{1 + \frac{w}{c}} = c \ldotp\]
We might also have obtained the formula for V, for the case when v and w have the same direction, by compounding two transformations in accordance with § 3. If in addition to the systems K and k figuring in § 3 we introduce still another system of coordinates k' moving parallel to k, its initial point moving on the axis of \(\Xi\) 30 with the velocity w, we obtain equations between the quantities x, y, z, t and the corresponding quantities of k', which differ from the equations found in § 3 only in that the place of “v” is taken by the quantity
\[\frac{v + w}{1 + \frac{vw}{c^{2}}};\]
from which we see that such parallel transformations—necessarily—form a group.
Note
“X” in the 1923 English translation.—JW
We have now deduced the requisite laws of the theory of kinematics corresponding to our two principles, and we proceed to show their application to electrodynamics. 31
Note
The remainder of the paper is not given here, but can be obtained from John Walker’s web site at www.fourmilab.ch.—BC


5.1: READ- Paid Time Off - Costs and Benefits
Why do Employers Offer Paid time off?
Employee burnout is real. Taking time away to refresh can not only improve overall productivity, but can increase overall retention of your employees. A good paid time off policy is essential in business today.
Paid time off, otherwise referred to as PTO, is exactly what it sounds like: It is an employee benefit in which the employer pays the employee for an allotted number of days off of work each year. Employers can choose from a variety of different PTO options like federal holidays, floating holidays, vacation days, sick leave, parental leave, bereavement leave, jury duty and military leave.
When reviewing total compensation, it is important to consider not just the costs of wages and salaries but also the costs of providing various benefits. Paid time off is a necessary benefit to stay competitive in the market. But before offering additional time off, be sure to know what it's going to cost the bottom line.
Employer Costs for Employee Compensation
When observing overall employee compensation, it is important to consider not just the costs of wages and salaries but also the costs of providing various benefits. Aside from wage data, the Employer Costs for Employee Compensation (ECEC) provides detailed benefits cost data for a more comprehensive look at overall compensation. The ECEC provides the employer cost of a specific benefit as well as the percent of total compensation that the benefit represents.
Paid leave benefits cost employers on average $2.94 dollars per hour in September 2022, representing 7.4 percent of total compensation costs. The cost of paid leave is calculated by multiplying the total leave time used by the rate at which the employee was paid during the used leave time.
Paid leave includes a combination of four leave benefits, as shown in Chart 1.  Paid leave benefits accounted for 25.1 percent of the costs of total benefits.
Among different occupational groups in private industry in September 2022, employer costs for paid leave benefits (per hour worked) varied. Employer costs for paid leave benefits averaged $0.86 for service workers and $7.50 for management, business, and financial workers. The average among all private industry workers was $2.94.
In September 2022, private industry employer costs of paid leave benefits averaged $3.79 for union workers and $2.86 for nonunion workers. Vacation leave accounted for 3.6 percent of total compensation for union workers and 3.8 percent of total compensation for nonunion workers. While paid personal leave accounted for 0.3 percent of total compensation for union workers and 0.4 percent of total compensation for nonunion workers.
Source: Employer Costs for Employee Compensation Fact Sheert. Bureau of Labor Statistics. BLS.gov
Source: "How to create a paid time off policy that reduces employee absences" , Business News Daily, December 20, 2023.
NOTE: Printable PDF attached below.


30.21: Plant Sensory Systems and Responses - Auxins, Cytokinins, and Gibberellins
- Differentiate among the types of plant hormones and their effects on plant growth
Growth Responses
A plant’s sensory response to external stimuli relies on hormones, which are simply chemical messengers. Plant hormones affect all aspects of plant life, from flowering to fruit setting and maturation, and from phototropism to leaf fall. Potentially, every cell in a plant can produce plant hormones. The hormones can act in their cell of origin or be transported to other portions of the plant body, with many plant responses involving the synergistic or antagonistic interaction of two or more hormones. In contrast, animal hormones are produced in specific glands and transported to a distant site for action, acting alone.
Plant hormones are a group of unrelated chemical substances that affect plant morphogenesis. Five major plant hormones are traditionally described: auxins, cytokinins, gibberellins, ethylene, and abscisic acid. In addition, other nutrients and environmental conditions can be characterized as growth factors. The first three plant hormones largely affect plant growth, as described below.
Auxins
The term auxin is derived from the Greek word auxein, which means “to grow. ” Auxins are the main hormones responsible for cell elongation in phototropism and gravitropism. They also control the differentiation of meristem into vascular tissue and promote leaf development and arrangement. While many synthetic auxins are used as herbicides, indole acetic acid (IAA) is the only naturally-occurring auxin that shows physiological activity. Apical dominance (the inhibition of lateral bud formation) is triggered by auxins produced in the apical meristem. Flowering, fruit setting and ripening, and inhibition of abscission (leaf falling) are other plant responses under the direct or indirect control of auxins. Auxins also act as a relay for the effects of the blue light and red/far-red responses.
Commercial use of auxins is widespread in plant nurseries and for crop production. IAA is used as a rooting hormone to promote growth of adventitious roots on cuttings and detached leaves. Applying synthetic auxins to tomato plants in greenhouses promotes normal fruit development. Outdoor application of auxin promotes synchronization of fruit setting and dropping, which coordinates the harvesting season. Fruits such as seedless cucumbers can be induced to set fruit by treating unfertilized plant flowers with auxins.
Cytokinins
The effect of cytokinins was first reported when it was found that adding the liquid endosperm of coconuts to developing plant embryos in culture stimulated their growth. The stimulating growth factor was found to be cytokinin, a hormone that promotes cytokinesis (cell division). Almost 200 naturally-occurring or synthetic cytokinins are known, to date. Cytokinins are most abundant in growing tissues, such as roots, embryos, and fruits, where cell division is occurring. Cytokinins are known to delay senescence in leaf tissues, promote mitosis, and stimulate differentiation of the meristem in shoots and roots. Many effects on plant development are under the influence of cytokinins, either in conjunction with auxin or another hormone. For example, apical dominance seems to result from a balance between auxins that inhibit lateral buds and cytokinins that promote bushier growth.
Gibberellins
Gibberellins (GAs) are a group of about 125 closely-related plant hormones that stimulate shoot elongation, seed germination, and fruit and flower maturation. GAs are synthesized in the root and stem apical meristems, young leaves, and seed embryos. In urban areas, GA antagonists are sometimes applied to trees under power lines to control growth and reduce the frequency of pruning.
GAs break dormancy (a state of inhibited growth and development) in the seeds of plants that require exposure to cold or light to germinate. Abscisic acid is a strong antagonist of GA action. Other effects of GAs include gender expression, seedless fruit development, and the delay of senescence in leaves and fruit. Seedless grapes are obtained through standard breeding methods; they contain inconspicuous seeds that fail to develop. Because GAs are produced by the seeds and because fruit development and stem elongation are under GA control, these varieties of grapes would normally produce small fruit in compact clusters. Maturing grapes are routinely treated with GA to promote larger fruit size, as well as looser bunches (longer stems), which reduces the incidence of mildew infection.
Key Points
- During phototropism and gravitropism, the plant hormone auxin controls cell elongation.
- The plant hormone cytokinin promotes cell division, controling many developmental processes in plants.
- Gibberellins control many aspects of plant physiology including shoot elongation, seed germination, fruit and flower maturation, seed dormancy, gender expression, seedless fruit development, and the delay of senescence in leaves and fruit.
Key Terms
- gibberellin : any of a class of diterpene plant growth hormones that stimulate shoot elongation, seed germination, and fruit and flower maturation
- auxin : a class of plant growth hormones that is responsible for elongation in phototropism and gravitropism and for other growth processes in the plant life cycle
- cytokinin : any of a class of plant hormones involved in cell growth and division


7.3: Unit 7 Practice Problems
Exercise 1
Decide if the following species are acids or bases according to Lewis theory. Order them with respect to their hardness and polarizability.
Ti 3 + , Ti 4 + , Zr 3 + , Hf 3 +
- Answer
-
Hardness: Ti 4 + >Ti 3 + >Zr 3 + >Hf 3 +
Polarizability: Hf 3 + >Zr 3 + >Ti 3 + >Ti 4 +
Exercise 2
Decide if the following species are acids or bases according to Lewis theory. Order them with respect to their hardness and polarizability.
NH 3 , PH 3 , AsH 3 , SbH 3 .
- Answer
-
Bases.
Hardness: NH 3 >PH 3 >AsH 3 >SbH 3
Polarizability: SbH 3 >AsH 3 >PH 3 >NH 3
Exercise 3
CsI is much less soluble in water than CsF. Why?
- Answer
-
Cs-F hard-hard interactions are stronger than Cs-I hard-soft interactions. Nonetheless, CsI is less soluble because of the small solvation enthalpy for I - (weak hard-soft interaction between water and I - ).
Exercise 4
Order the following species with regard to their expected solubility in water: ZnS, CdS, HgS.
- Answer
-
ZnS> CdS>HgS
Exercise 5
AlF 3 is insoluble in liquid HF but dissolves when NaF is present. When BF 3 is added to the solution, AlF 3 precipitates. Explain.
- Answer
-
Hard-Hard interactions between H and F in H-F stronger than Hard-Hard interactions between Al 3 + and F - . Consequence: no reaction occurs (no formation of AlF 4 - ).
Hard-Hard interactions between Al 3 + and F - are stronger than hard-hard interactions between Na + and F - . Consequence: AlF 3 dissolves to form AlF 4 - .
AlF 3 precipitates upon addition of BF 3 because Al-F hard-hard interactions are weaker than B-F hard-hard interactions (B 3+ is harder than Al 3 + ). AlF 4 - (aq) + BF 3 (aq) --> BF 4 - (aq) + AlF 3 (s).
Exercise 6
Why were most of the metals used in early prehistory soft metals (in HSAB terminology)?
- Answer
-
Because oxygen is the most abundant element in the earth crust. Thus most hard metals have formed oxides with oxygen. Soft metals do not easily combine with oxygen to form oxides. Therefore, they can be found more often in elemental form in nature. Because of that they have been used more often.
Exercise 7
Which of the following ions is the softest according to HSAB theory:
a) oxide (O 2- )
b) peroxide (O 2 2 - )
c) ozonide (O 3 - )
- Answer
-
c) ozonide (O 3 - )
Exercise 8
The oxidation of barium with oxygen gas yields barium peroxide while the oxidation of strontium with oxygen gas yields strontium oxide. Explain this from the standpoint of the HSAB theory.
- Answer
-
Barium is softer, so it has a greater tendency to combine with the peroxide ion which is relatively soft compared to the oxide ion.
Exercise 9
A molecule with an electron pair in an antibonding HOMO will most likely undergo a reaction in which
a) this molecule will get oxidized
b) this molecule will be reduced
c) this molecule will act as a donor in a Lewis acid base reaction.
d) this molecule will act as an acceptor in a Lewis acid base reaction.
- Answer
-
a) this molecule will get oxidized
Exercise 10
When a dative bond is polarized toward the acceptor this indicates that
a) the HOMO energy of the donor is higher than the LUMO energy of the acceptor.
b) the HOMO energy of the donor is lower than the LUMO energy of the acceptor.
c) the HOMO energy of the donor is equal to the LUMO energy of the acceptor.
- Answer
-
a) the HOMO energy of the donor is higher than the LUMO energy of the acceptor.
Dr. Kai Landskron ( Lehigh University ). If you like this textbook, please consider to make a donation to support the author's research at Lehigh University: Click Here to Donate .