Added some missing static files
|
@ -20,14 +20,14 @@ bridgy_syndication:
|
|||
---
|
||||
Looking at Aaron Parecki's [“Fun with QR Codes”](https://aaronparecki.com/articles/2015/10/05/1/fun-with-qr-codes) inspired me to play with QR Codes myself. Using the tool [QArt Coder](http://research.swtch.com/qr/draw) made by [Russ Cox](https://plus.google.com/116810148281701144465), I made a QR Code with my face in it!
|
||||
|
||||

|
||||

|
||||
|
||||
|
||||
### Why QR Codes?
|
||||
|
||||
QR Codes aren't prevalent in the United States of America. In fact, they're often viewed by technologists as a [joke](http://picturesofpeoplescanningqrcodes.tumblr.com/). But as [Christina Xu](http://www.christinaxu.org/) points out on her Medium post [“Pictures of Chinese People Scanning QR Codes”](https://medium.com/chrysaora-weekly/pictures-of-chinese-people-scanning-qr-codes-a564047ec58f), it's not a joke everywhere. In fact, many people actually depend on this humble little QR code to get by in their day. Another story, my family and I go out to eat sometimes. Occasionally, we'll knock into a Heinz Ketchup bottle.
|
||||
|
||||

|
||||

|
||||
|
||||
Image by Azad Zahoory.
|
||||
|
||||
|
|
|
@ -23,4 +23,4 @@ First go to File->Knit Document. If this is your first time, then it will instal
|
|||
|
||||
Once that is downloaded, it will let you choose between three different file formats (HTML, PDF, MS Word). For the purposes of blog posts, I like to output it in HTML so I can copy and paste the code. But for personal use, I like using PDFs
|
||||
|
||||
After you select the file format, hit compile, and voila! A nice neat compiled report is created for you. Here is a [pdf](https://brandonrozek.com/wp-content/uploads/2017/03/LifeExpectancy.pdf) example of the report I made.
|
||||
After you select the file format, hit compile, and voila! A nice neat compiled report is created for you. Here is a [pdf](/files/reports/LifeExpectancy.pdf) example of the report I made.
|
||||
|
|
|
@ -41,7 +41,7 @@ grep -oE '[0-9]+' Random.csv > Random_corrected.csv
|
|||
|
||||
Do this with all three files and make sure to keep track of which is which.
|
||||
|
||||
Here are a copy of my files for [Firefox](https://brandonrozek.com/wp-content/uploads/2017/03/Firefox_corrected.csv), [Chrome](https://brandonrozek.com/wp-content/uploads/2017/03/Chrome_corrected-1.csv), and [IE11](https://brandonrozek.com/wp-content/uploads/2017/03/IE11_corrected.csv)
|
||||
Here are a copy of my files for [Firefox](/data/browser-random/Firefox_corrected.csv), [Chrome](/data/browser-random/Chrome_corrected-1.csv), and [IE11](/data/browser-random/IE11_corrected.csv)
|
||||
|
||||
## Check Conditions
|
||||
|
||||
|
@ -70,19 +70,19 @@ ie11 = read.csv("~/IE11_corrected.csv", header = F)
|
|||
hist(ie11$V1, main = "Distribution of Random Values for IE11", xlab = "Random Value")
|
||||
```
|
||||
|
||||

|
||||

|
||||
|
||||
```R
|
||||
hist(firefox$V1, main = "Distribution of Random Values for Firefox", xlab = "Random Value")
|
||||
```
|
||||
|
||||

|
||||

|
||||
|
||||
```R
|
||||
hist(chrome$V1, main = "Distribution of Random Values for Chrome", xlab = "Random Value")
|
||||
```
|
||||
|
||||

|
||||

|
||||
|
||||
## Chi-Square Test
|
||||
|
||||
|
@ -134,4 +134,4 @@ As you can see in the test results below, we fail to reject the null hypothesis
|
|||
|
||||
## Conclusion
|
||||
|
||||
At a 5% significance level, we fail to obtain enough evidence to suggest that the distribution of random number is not uniform. This is a good thing since it shows us that our random number generators give all numbers an equal chance of being represented. We can use `Math.random()` with ease of mind.
|
||||
At a 5% significance level, we fail to obtain enough evidence to suggest that the distribution of random number is not uniform. This is a good thing since it shows us that our random number generators give all numbers an equal chance of being represented. We can use `Math.random()` with ease of mind.
|
||||
|
|
|
@ -46,7 +46,7 @@ The formula for a circle centered at the origin with radius one is $$x^2 + y^2 =
|
|||
|
||||
Let us focus again on the first quadrent, and do a Monte Carlo simulation to find the area of the quarter-circle
|
||||
|
||||

|
||||

|
||||
|
||||
We can do this by what is called the dart board method. We generate a random x and y between 0 and 1. If it satisfies the inequality $$x^2 + y^2 \leq 1$$ then it counts as being inside the circle, if not then it lies outside the circle.
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ Buttons are created using the JButton component. The constructor takes the text
|
|||
JButton stopBtn = new JButton("Stop");
|
||||
```
|
||||
|
||||

|
||||

|
||||
|
||||
|
||||
You can also add images inside a button. To do that you need to get the image and make it into an icon. The following code grabs the image file “smallpanda.jpg” from the current working directory.
|
||||
|
@ -51,7 +51,7 @@ this.add(stopBtn);
|
|||
this.add(feedBtn);
|
||||
```
|
||||
|
||||

|
||||

|
||||
|
||||
|
||||
### Labels and Textfields
|
||||
|
@ -71,7 +71,7 @@ One of the most common forms of input is a text field, usually distinguished wit
|
|||
this.add(nameInput);
|
||||
```
|
||||
|
||||

|
||||

|
||||
|
||||
|
||||
### Checkboxes
|
||||
|
@ -87,7 +87,7 @@ Checkboxes are commonly used when giving the possibility for multiple answers. S
|
|||
this.add(rice);
|
||||
```
|
||||
|
||||

|
||||

|
||||
|
||||
|
||||
You can even replace the default look of the checkbox with an image. To do this, you need to make image icons for both when it's checked and when it's unchecked.
|
||||
|
@ -105,8 +105,8 @@ checkbox.setSelectedIcon(checkedIcon);
|
|||
this.add(checkbox);
|
||||
```
|
||||
|
||||

|
||||

|
||||

|
||||

|
||||
|
||||
|
||||
### Text Areas
|
||||
|
@ -123,7 +123,7 @@ By default, when the someone inputs more text than the size can hold, it will au
|
|||
JScrollPane scrollPane = new JScrollPane(textarea);
|
||||
```
|
||||
|
||||

|
||||

|
||||
|
||||
### Radio Buttons
|
||||
|
||||
|
@ -147,7 +147,7 @@ this.add(radio2);
|
|||
this.add(radio3);
|
||||
```
|
||||
|
||||

|
||||

|
||||
|
||||
|
||||
### JList
|
||||
|
@ -188,7 +188,7 @@ list.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
|
|||
this.add(sp);
|
||||
```
|
||||
|
||||

|
||||

|
||||
|
||||
### JComboBox
|
||||
|
||||
|
@ -205,4 +205,4 @@ cb.addItem("Steak");
|
|||
this.add(cb);
|
||||
```
|
||||
|
||||

|
||||

|
||||
|
|
|
@ -8,7 +8,7 @@ guid: https://brandonrozek.com/2017/03/2052-revision-v1/
|
|||
permalink: /2017/03/2052-revision-v1/
|
||||
tags: ["Statistics"]
|
||||
---
|
||||

|
||||

|
||||
|
||||
## Do females live longer than males?
|
||||
|
||||
|
@ -27,7 +27,7 @@ HA: The average female life expectancy is higher than the average male life expe
|
|||
|
||||
Since the website gives us an overlook at all of the counties in the United States we want to take a small sample of that so we can perform statistics. Using the entire dataset will result in looking at population parameters which doesn't leave room for inference.
|
||||
|
||||
A random number was chosen to pick the state and then the county. This was done a total of 101 times. The CSV file is located [here](https://brandonrozek.com/wp-content/uploads/2017/03/LifeExpectancy.csv) for convenience.
|
||||
A random number was chosen to pick the state and then the county. This was done a total of 101 times. The CSV file is located [here](/data/LifeExpectancy.csv) for convenience.
|
||||
|
||||
## R Programming
|
||||
|
||||
|
@ -90,7 +90,7 @@ The male life expectancy distribution appears to be unimodal and symmetric.
|
|||
hist(maleExpectancy, main = "Male Life Expectancy", xlab = "Age")
|
||||
```
|
||||
|
||||

|
||||

|
||||
|
||||
Same with the female life expectancy distribution
|
||||
|
||||
|
@ -98,7 +98,7 @@ Same with the female life expectancy distribution
|
|||
hist(femaleExpectancy, main = "Female Life Expectancy", xlab = "Age")
|
||||
```
|
||||
|
||||

|
||||

|
||||
|
||||
|
||||
Looking at the boxplot, we can see that the IQR of the female life expectancy is higher than the one of the males. The hypothesis test will show us if this is of significant difference. On the male's side there are two outliers. This violates the Nearly Normal Condition so we must proceed with caution in our test.
|
||||
|
@ -107,7 +107,7 @@ Looking at the boxplot, we can see that the IQR of the female life expectancy is
|
|||
boxplot(maleExpectancy, femaleExpectancy, names = c("Male Life Expectancy", "Female Life Expectancy"), ylab = "Age")
|
||||
```
|
||||
|
||||

|
||||

|
||||
|
||||
Since the nearly normal condition was not met, we do not meet the assumptions necessary to perform a t-test. However, since the condition was violated by an outlier, let us perform a t-test with the outlier and without the outlier and compare the results.
|
||||
|
||||
|
@ -175,7 +175,7 @@ Looking at the boxplot, there are no more outliers present
|
|||
boxplot(maleExpectancy2, ylab = "Age", main = "Male Life Expectancy w/o Outliers")
|
||||
```
|
||||
|
||||

|
||||

|
||||
|
||||
The histogram still appears to be unimodal and symmetric
|
||||
|
||||
|
@ -183,7 +183,7 @@ The histogram still appears to be unimodal and symmetric
|
|||
hist(maleExpectancy2, xlab = "Age", main = "Male Life Expectancy w/o Outliers")
|
||||
```
|
||||
|
||||

|
||||

|
||||
|
||||
Without the outliers present, the nearly normal condition is now met. We can perform the t-test.
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ guid: http://brandonrozek.com/2016/10/362-revision-v1/
|
|||
permalink: /2016/10/362-revision-v1/
|
||||
---
|
||||
|
||||

|
||||

|
||||
|
||||
### [Math I/O](http://math-io.com)
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ layout: revision
|
|||
guid: http://brandonrozek.com/2016/10/360-revision-v1/
|
||||
permalink: /2016/10/360-revision-v1/
|
||||
---
|
||||

|
||||

|
||||
|
||||
### [Sentence Worthy](http://sentenceworthy.com)
|
||||
|
||||
|
|
|
@ -8,10 +8,10 @@ guid: http://brandonrozek.com/2016/10/364-revision-v1/
|
|||
permalink: /2016/10/364-revision-v1/
|
||||
---
|
||||
|
||||

|
||||

|
||||
|
||||
### [Tori Dayton](http://toridayton.com) {.project-title}
|
||||
|
||||
Tori Dayton is a great friend and poet, this is the site I made for her to showcase her writings. It's the first WordPress project I worked on and it set the tone for all the future ones I did. Check out her [writings!](http://toridayton.com/work) I'm a fan of her work. (Not biased at all)
|
||||
|
||||
Fun Fact: I also worked on the [Tori Bot](http://toridayton.com/category/tori-bot/) on the site. Tori Bot takes existing poems and tries to generate a new one using the [Natural Language Toolkit](http://www.nltk.org/) library made for Python.
|
||||
Fun Fact: I also worked on the [Tori Bot](http://toridayton.com/category/tori-bot/) on the site. Tori Bot takes existing poems and tries to generate a new one using the [Natural Language Toolkit](http://www.nltk.org/) library made for Python.
|
||||
|
|
101
static/data/LifeExpectancy.csv
Normal file
|
@ -0,0 +1,101 @@
|
|||
State,County #,Life Expectancy Male,Life Expectancy Female
|
||||
Alabama,12,72.9,78.6
|
||||
Alabama,52,70.4,76.9
|
||||
Alabama,37,71,77.4
|
||||
Arizona,14,72.5,79.4
|
||||
Arkansas,60,70.9,79.6
|
||||
California,36,75.8,80.9
|
||||
California,44,75.2,80.2
|
||||
Connecticut,3,78,82.6
|
||||
Connecticut,4,77.7,82.3
|
||||
Connecticut,1,79.4,83.7
|
||||
Delaware,2,75.6,80.5
|
||||
Delaware,1,76,81.1
|
||||
Florida,17,76.4,81.8
|
||||
Florida,19,76.2,81.4
|
||||
Florida,61,71.1,77.8
|
||||
Georgia,30,74.3,79.5
|
||||
Hawaii,3,76.8,82.9
|
||||
Hawaii,4,76.6,82.6
|
||||
Idaho,1,80,83.4
|
||||
Idaho,25,76.2,80.8
|
||||
Idaho,24,76.2,80.8
|
||||
Illinois,46,75.1,80.5
|
||||
Kansas,33,75.9,81.1
|
||||
Kansas,78,75.2,80.2
|
||||
Kansas,48,75.8,81
|
||||
Kentucky,40,73.2,79
|
||||
Louisiana,35,71.2,77.4
|
||||
Maine,4,77.2,81.8
|
||||
Maine,7,76.2,81
|
||||
Maine,10,75.7,80.7
|
||||
Maryland,18,74.1,79.5
|
||||
Maryland,19,73.9,79.1
|
||||
Massachusetts,6,77.9,82.6
|
||||
Michigan,35,75.7,80.8
|
||||
Michigan,51,75.2,80.3
|
||||
Michigan,76,74.1,79.4
|
||||
Michigan,38,75.6,80.6
|
||||
Minnesota,85,75.1,80.9
|
||||
Mississippi,56,69.8,76.6
|
||||
Missouri,86,73.2,79.2
|
||||
Missouri,59,74.3,79.7
|
||||
Montana,22,76.1,81.2
|
||||
Montana,47,74.6,80.3
|
||||
Montana,53,74.3,80.1
|
||||
Nebraska,42,76.4,81.4
|
||||
Nebraska,55,76.2,81.4
|
||||
Nevada,16,72.6,82
|
||||
Nevada,13,74.5,82
|
||||
Nevada,10,74.9,82.1
|
||||
New Hampshire,3,78,82.4
|
||||
New Hampshire,2,78.4,82.5
|
||||
New Mexico,2,78.6,83.2
|
||||
New Mexico,7,75.7,81.4
|
||||
New Mexico,11,75.6,80.9
|
||||
New Mexico,14,74.9,80.5
|
||||
New York,36,76,80.9
|
||||
New York,27,76.4,81.3
|
||||
North Carolina,91,70.4,77.3
|
||||
North Dakota,22,76,82.1
|
||||
North Dakota,11,76.6,82.3
|
||||
North Dakota,29,76,81.6
|
||||
North Dakota,52,74.5,80.3
|
||||
Ohio,66,74,79.3
|
||||
Ohio,61,74.1,79.5
|
||||
Oklahoma,4,75.3,80
|
||||
Oklahoma,18,74,79.4
|
||||
Oklahoma,8,75.1,79.7
|
||||
Oklahoma,47,72.4,78.4
|
||||
Oklahoma,33,73.2,78.7
|
||||
Oregon,5,78.2,81.8
|
||||
Oregon,17,76,80.9
|
||||
Rhode Island,4,76.2,81.9
|
||||
South Carolina,25,72.2,77.9
|
||||
South Carolina,35,70.1,77
|
||||
South Carolina,41,69,76.1
|
||||
South Dakota,38,75.7,81.5
|
||||
Tennessee,43,72.5,78.4
|
||||
Tennessee,36,72.6,78.6
|
||||
Tennessee,60,71.6,78
|
||||
Tennessee,24,73.1,78.9
|
||||
Tennessee,34,72.7,78.6
|
||||
Texas,66,74.7,80.2
|
||||
Texas,126,73.8,79.3
|
||||
Utah,7,78.6,82.1
|
||||
Utah,22,75.5,80.5
|
||||
Virginia,88,72.8,80.9
|
||||
Virginia,27,76,77.9
|
||||
Virginia,108,71.8,77.9
|
||||
Washington,2,79.2,83.4
|
||||
Washington,1,80.9,84.1
|
||||
Washington,35,75.1,80.1
|
||||
Washington,30,75.3,80.5
|
||||
Washington,25,75.8,80.9
|
||||
West Virginia,27,73.5,78.8
|
||||
West Virginia,1,76,80.4
|
||||
West Virginia,36,72.5,78.6
|
||||
Wisconsin,43,76.4,81.2
|
||||
Wisconsin,13,77.7,82.3
|
||||
Wyoming,23,73.6,82
|
||||
Wyoming,2,77.7,83.1
|
|
1000000
static/data/browser-random/Chrome_corrected-1.csv
Normal file
1000000
static/data/browser-random/Firefox_corrected.csv
Normal file
1000000
static/data/browser-random/IE11_corrected.csv
Normal file
BIN
static/files/images/blog/JComboBox.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
static/files/images/blog/JList.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
static/files/images/blog/LifeExpectancyBoxplot.png
Normal file
After Width: | Height: | Size: 5.1 KiB |
BIN
static/files/images/blog/MLifeExpectBoxplotNoOutliers.png
Normal file
After Width: | Height: | Size: 15 KiB |
BIN
static/files/images/blog/MLifeExpectHistNoOutliers.png
Normal file
After Width: | Height: | Size: 19 KiB |
BIN
static/files/images/blog/checkboxes.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
static/files/images/blog/checked.png
Normal file
After Width: | Height: | Size: 5.4 KiB |
BIN
static/files/images/blog/chromehist.png
Normal file
After Width: | Height: | Size: 21 KiB |
BIN
static/files/images/blog/circlefilled.png
Normal file
After Width: | Height: | Size: 23 KiB |
BIN
static/files/images/blog/femaleLifeExpectancyHist.png
Normal file
After Width: | Height: | Size: 17 KiB |
BIN
static/files/images/blog/firefoxhist.png
Normal file
After Width: | Height: | Size: 21 KiB |
BIN
static/files/images/blog/heinz-2-768x1024.jpg
Normal file
After Width: | Height: | Size: 136 KiB |
BIN
static/files/images/blog/ie11hist.png
Normal file
After Width: | Height: | Size: 21 KiB |
BIN
static/files/images/blog/labeltextfield.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
static/files/images/blog/maleLifeExpectancyHist.png
Normal file
After Width: | Height: | Size: 17 KiB |
BIN
static/files/images/blog/qrcode-large-1.png
Normal file
After Width: | Height: | Size: 5 KiB |
BIN
static/files/images/blog/radiobuttons.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
static/files/images/blog/smallpandabutton.png
Normal file
After Width: | Height: | Size: 82 KiB |
BIN
static/files/images/blog/stopbutton.png
Normal file
After Width: | Height: | Size: 823 B |
BIN
static/files/images/blog/textarea.png
Normal file
After Width: | Height: | Size: 826 B |
BIN
static/files/images/blog/unchecked.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
static/files/images/projects/Math-I-O.png
Normal file
After Width: | Height: | Size: 96 KiB |
BIN
static/files/images/projects/SentenceWorthy.jpg
Normal file
After Width: | Height: | Size: 151 KiB |
BIN
static/files/images/projects/Tori-Dayton-1.png
Normal file
After Width: | Height: | Size: 164 KiB |