Publications by Harold Nelson
Lab 3 Practice
This is a practice problem set with solved problems very similar to those in Lab 3. It is based on the CDC dataset, which you used in Lab 1. You will perform the following tasks. Construct a confidence interval for a proportion and use proper language to describe it. Conduct a hypothesis test for a proportion. Distinguish between the null and al...
4364 sym R (8452 sym/21 pcs)
Height, Weight, Gender
Gender Height and Weight Harold Nelson 9/3/2020 A Sample Data Analysis The Questions I want to explore the relationships among age, gender, height, and weight. The Data I’ll use a sample of records from the Behavioral Risk Factors Surveillance System (BRFSS) conducted by the Centers for Disease Control (CDC). The data I used is available f...
3129 sym R (12546 sym/53 pcs) 10 img
Notes on Conditional Execution
Conditional Execution Harold Nelson 1/26/2021 Boolean Expressions Read the section in PY4E. Then evaluate each of the following expressions in your head before proceeding to the following slide to see the answer. Ex1 \[4 == 2*2\] Answer 4 == 2*2 ## True Ex2 \[ 3<4\] Answer 3<4 ## True Ex3 \[ 3 <= 4\] 3 <= 4 ## True Ex4 \[ 3 \neq 4\] Not...
2714 sym R (930 sym/26 pcs)
Running Python
Running Python Harold Nelson 8/29/2020 Three ways in Cocalc Create a terminal “file” and start the python interpteter. Interact with the interpreter in a Read-Evaluate-Print Loop (REPL). Create a file containing python code as text. Open a terminal and direct python to run the file. Create a Jupyter notebook and use the python3 kernel. C...
679 sym
Variables Expressions and Statements
Variables Expressions and Statements Harold Nelson 9/5/2020 knitr::opts_chunk$set(error = TRUE) Notes on PY4E Chapter 2 These notes follow chapter 2 of the text closely. They are intended to be used in a hands-on manner, not just read. You should read each section of the text before working through the corresponding section of these notes. Ma...
5148 sym R (1805 sym/89 pcs)
Factors
Factors Harold Nelson 9/10/2020 Creating a Factor Let’s create a simple dataframe using data.frame. Name = c("Tom","Dick","Harry","Mary","Sally","Susan") Gender = c("m","m","m","f","f","f") People = data.frame(Name,Gender) People ## Name Gender ## 1 Tom m ## 2 Dick m ## 3 Harry m ## 4 Mary f ## 5 Sally f ## 6 ...
2224 sym R (10039 sym/42 pcs)
Counts and Proportions
Counts and Proportions Harold Nelson 9/10/2020 Create a vector with numerical values. x = 1:10 x ## [1] 1 2 3 4 5 6 7 8 9 10 What proportion of the values are greater than 7? Do this by hand. How could you do this with R code? How would you do this in your favorite language? R is Different Create a logical vector based on the values...
938 sym R (262 sym/13 pcs)
Binary and Hex in Python
Binary and Hex Harold Nelson 10/13/2020 Decimal Numbers Our ordinary numbers use 10 as a base. To see what this means, consider the number 367. Written out in a way that clarifies the role of 10, we have \[ 367 = 3*10^2+6*10^1+7*10^0 \] The Octopus View Suppose we thought like octopi and always based our thinking and our numbers on 8. If an o...
4210 sym R (568 sym/30 pcs)
Exploring Nat0718
Fertility Data Exploration Harold Nelson 10/1/2020 Setup Load the usual packages. library(tidyverse) library(knitr) Load Data Load the file Nat0718.Rdata from your working directory after downloading it from Moodle. Answer load("Nat0718.Rdata") Basic ID Task Use glipmse() and/or str() to identify the categorical and quantitative variables i...
2178 sym R (4660 sym/26 pcs) 7 img
List Exercises 3
List Exercises 3 Harold Nelson 9/24/2020 Ex1 Append and Concatenate What is the difference between appending to a list and concatenation? To answer this question combine two lists in two different ways. Concatenate them using “+”. Combine them by appending one list to the other. What’s the difference? Answer l1 = [1,2,3] l2 = [4,5,6] ...
1718 sym R (898 sym/28 pcs)