pnorm(1,0,1)
## [1] 0.8413447
pnorm(-2,0,1)
## [1] 0.02275013
qnorm(0.05,0,1)
## [1] -1.644854
library(tidyverse)
## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
## ✔ dplyr     1.1.4     ✔ readr     2.1.5
## ✔ forcats   1.0.0     ✔ stringr   1.5.1
## ✔ ggplot2   3.5.1     ✔ tibble    3.2.1
## ✔ lubridate 1.9.3     ✔ tidyr     1.3.1
## ✔ purrr     1.0.2     
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag()    masks stats::lag()
## ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
library(DescTools)
library(rcompanion)
edu<-read.csv("C:/Users/86135/Desktop/Rstudio的文件/Week6_edu.csv")
income<-read.csv("C:/Users/86135/Desktop/Rstudio的文件/Week6_hinc.csv")
head(edu)
##                 GEO_ID                                        NAME B06009_001E
## 1 1400000US13001950100  Census Tract 9501, Appling County, Georgia        1914
## 2 1400000US13001950200  Census Tract 9502, Appling County, Georgia        2896
## 3 1400000US13001950300  Census Tract 9503, Appling County, Georgia        3970
## 4 1400000US13001950400  Census Tract 9504, Appling County, Georgia        1121
## 5 1400000US13001950500  Census Tract 9505, Appling County, Georgia        2465
## 6 1400000US13003960100 Census Tract 9601, Atkinson County, Georgia        1349
##   B06009_001M B06009_002E B06009_002M B06009_003E B06009_003M B06009_004E
## 1         205         475         137         726         163         457
## 2         317         732         181        1089         188         684
## 3         385        1149         319        1671         323         786
## 4         144         255          86         430         100         329
## 5         275         465         174        1045         159         648
## 6         171         533         125         450         108         288
##   B06009_004M B06009_005E B06009_005M B06009_006E B06009_006M B06009_007E
## 1         136         131          66         125          55        1606
## 2         181         209         103         182          80        2107
## 3         192         194          86         170          82        2845
## 4          79          32          17          75          49         888
## 5         147         253          90          54          41        1715
## 6          89          32          24          46          37         826
##   B06009_007M B06009_008E B06009_008M B06009_009E B06009_009M B06009_010E
## 1         193         408         135         631         143         357
## 2         284         595         161         722         156         529
## 3         397         865         268         995         241         719
## 4         126         181          66         359          96         271
## 5         224         243          96         802         153         444
## 6         141         266         106         338          79         160
##   B06009_010M B06009_011E B06009_011M B06009_012E B06009_012M B06009_013E
## 1         118         109          56         101          49         290
## 2         153         103          67         158          79         634
## 3         185         145          70         121          72         673
## 4          71          26          15          51          38         208
## 5         122         191          86          35          34         659
## 6          53          21          18          41          36         245
##   B06009_013M B06009_014E B06009_014M B06009_015E B06009_015M B06009_016E
## 1         109          49          37          95          59         100
## 2         191         100          68         301         132         115
## 3         194         125          96         383         144          67
## 4          86          64          54          71          43          58
## 5         158         159         121         229         110         190
## 6         105          45          30         109          56          79
##   B06009_016M B06009_017E B06009_017M B06009_018E B06009_018M B06009_019E
## 1          54          22          26          24          30          18
## 2          62          94          80          24          22           0
## 3          48          49          46          49          50           0
## 4          43           6           5           9          13          10
## 5          83          62          51          19          22          20
## 6          68           7          16           5           7           0
##   B06009_019M B06009_020E B06009_020M B06009_021E B06009_021M B06009_022E
## 1          27          18          27           0          13           0
## 2          13           0          13           0          13           0
## 3          18           0          18           0          18           0
## 4          16          10          16           0          13           0
## 5          25           0          13           6          11          14
## 6          13           0          13           0          13           0
##   B06009_022M B06009_023E B06009_023M B06009_024E B06009_024M B06009_025E
## 1          13           0          13           0          13           0
## 2          13           0          13           0          13         155
## 3          18           0          18           0          18         452
## 4          13           0          13           0          13          15
## 5          22           0          13           0          13          71
## 6          13           0          13           0          13         278
##   B06009_025M B06009_026E B06009_026M B06009_027E B06009_027M B06009_028E
## 1          13           0          13           0          13           0
## 2         141          37          59          66          72          40
## 3         185         159         157         293         192           0
## 4          25           0          13           0          13           0
## 5          61          63          60           8          14           0
## 6         110         222          81           3           7          49
##   B06009_028M B06009_029E B06009_029M B06009_030E B06009_030M
## 1          13           0          13           0          13
## 2          46          12          18           0          13
## 3          18           0          18           0          18
## 4          13           0          13          15          25
## 5          13           0          13           0          13
## 6          45           4          11           0          13
head(income)
##                 GEO_ID                                        NAME B19013_001E
## 1 1400000US13001950100  Census Tract 9501, Appling County, Georgia       53242
## 2 1400000US13001950200  Census Tract 9502, Appling County, Georgia       31642
## 3 1400000US13001950300  Census Tract 9503, Appling County, Georgia       34534
## 4 1400000US13001950400  Census Tract 9504, Appling County, Georgia       40667
## 5 1400000US13001950500  Census Tract 9505, Appling County, Georgia       42540
## 6 1400000US13003960100 Census Tract 9601, Atkinson County, Georgia       29688
##   B19013_001M
## 1        9830
## 2        5124
## 3        3618
## 4       12627
## 5        6428
## 6        4775