R Markdown

This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see http://rmarkdown.rstudio.com.

When you click the Knit button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this:

Initial preparation of data

Loading libraries and reading of data from CSV to data frame

library(tidyverse)
## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
## ✔ dplyr     1.1.2     ✔ readr     2.1.4
## ✔ forcats   1.0.0     ✔ stringr   1.5.0
## ✔ ggplot2   3.4.3     ✔ tibble    3.2.1
## ✔ lubridate 1.9.2     ✔ tidyr     1.3.0
## ✔ 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
path= 'C:/Users/prase/OneDrive/Documents/signal_metrics.csv'

Reading data into data_frame

data_frame = read.csv('C:/Users/prase/OneDrive/Documents/signal_metrics.csv',header=TRUE, sep = ",")

head(data_frame)

head(data_frame)
##   Timestamp       Locality Latitude Longitude SignalStrengthdBm
## 1   51:30.7        Danapur 25.42617  85.09443         -76.72446
## 2   23:56.4      Bankipore 25.59105  85.25081         -77.52335
## 3   24:39.7  Ashok Rajpath 25.48233  85.14868         -78.55790
## 4   02:26.4 Rajendra Nagar 25.46116  85.23826         -78.77064
## 5   32:12.7  Ashok Rajpath 25.61583  85.10455         -77.27129
## 6   58:31.2 Rajendra Nagar 25.56698  85.12149         -75.67285
##   DataThroughputMbps Latencyms NetworkType BB60CMeasurementdBm
## 1           1.105452  138.9383         LTE           -72.50342
## 2           2.476287  137.6606         LTE           -73.45848
## 3           1.031408  165.4447         LTE           -73.88210
## 4           1.461008  101.6800         LTE           -74.04047
## 5           1.792531  177.4726         LTE           -74.08004
## 6           2.572450  131.5178         LTE           -74.66450
##   srsRAN.MeasurementdBm BladeRFxA9MeasurementdBm
## 1             -84.97208                -75.12779
## 2             -84.77590                -77.94294
## 3             -84.76128                -77.21692
## 4             -87.27312                -77.86791
## 5             -85.93112                -75.57369
## 6             -85.16332                -74.51283

Exploring the data

Dimension of data and data types of the columns

Dimension of data

dim(data_frame)
## [1] 12621    11

Data types of the columns

str(data_frame)
## 'data.frame':    12621 obs. of  11 variables:
##  $ Timestamp               : chr  "51:30.7" "23:56.4" "24:39.7" "02:26.4" ...
##  $ Locality                : chr  "Danapur" "Bankipore" "Ashok Rajpath" "Rajendra Nagar" ...
##  $ Latitude                : num  25.4 25.6 25.5 25.5 25.6 ...
##  $ Longitude               : num  85.1 85.3 85.1 85.2 85.1 ...
##  $ SignalStrengthdBm       : num  -76.7 -77.5 -78.6 -78.8 -77.3 ...
##  $ DataThroughputMbps      : num  1.11 2.48 1.03 1.46 1.79 ...
##  $ Latencyms               : num  139 138 165 102 177 ...
##  $ NetworkType             : chr  "LTE" "LTE" "LTE" "LTE" ...
##  $ BB60CMeasurementdBm     : num  -72.5 -73.5 -73.9 -74 -74.1 ...
##  $ srsRAN.MeasurementdBm   : num  -85 -84.8 -84.8 -87.3 -85.9 ...
##  $ BladeRFxA9MeasurementdBm: num  -75.1 -77.9 -77.2 -77.9 -75.6 ...

Grouping the data

1. Summarizing ‘Signal strength’ based on the grouping of ‘Network type’

data_frame_NetworkType <- data_frame|>
  filter(!(is.na(NetworkType)))|>
    group_by(NetworkType) |>
      summarise(category_mean_SignalStrengthdBm = mean(SignalStrengthdBm,na.rm=TRUE), size=n())
head(data_frame_NetworkType)
## # A tibble: 3 × 3
##   NetworkType category_mean_SignalStrengthdBm  size
##   <chr>                                 <dbl> <int>
## 1 4G                                    -90.2  4219
## 2 5G                                    -95.2  4178
## 3 LTE                                   -90.0  4224
data_frame_NetworkType_SignalStrengthdBm <- data_frame |>
  left_join(data_frame_NetworkType, by = "NetworkType")

data_frame_NetworkType_SignalStrengthdBm <- data_frame_NetworkType_SignalStrengthdBm[,]
mean(data_frame$SignalStrengthdBm)
## [1] -91.76005
data_frame_NetworkType_SignalStrengthdBm <- data_frame_NetworkType_SignalStrengthdBm |>
    mutate( below_mean = ifelse(SignalStrengthdBm < category_mean_SignalStrengthdBm, "yes", "No"))
head(data_frame_NetworkType_SignalStrengthdBm)
##   Timestamp       Locality Latitude Longitude SignalStrengthdBm
## 1   51:30.7        Danapur 25.42617  85.09443         -76.72446
## 2   23:56.4      Bankipore 25.59105  85.25081         -77.52335
## 3   24:39.7  Ashok Rajpath 25.48233  85.14868         -78.55790
## 4   02:26.4 Rajendra Nagar 25.46116  85.23826         -78.77064
## 5   32:12.7  Ashok Rajpath 25.61583  85.10455         -77.27129
## 6   58:31.2 Rajendra Nagar 25.56698  85.12149         -75.67285
##   DataThroughputMbps Latencyms NetworkType BB60CMeasurementdBm
## 1           1.105452  138.9383         LTE           -72.50342
## 2           2.476287  137.6606         LTE           -73.45848
## 3           1.031408  165.4447         LTE           -73.88210
## 4           1.461008  101.6800         LTE           -74.04047
## 5           1.792531  177.4726         LTE           -74.08004
## 6           2.572450  131.5178         LTE           -74.66450
##   srsRAN.MeasurementdBm BladeRFxA9MeasurementdBm
## 1             -84.97208                -75.12779
## 2             -84.77590                -77.94294
## 3             -84.76128                -77.21692
## 4             -87.27312                -77.86791
## 5             -85.93112                -75.57369
## 6             -85.16332                -74.51283
##   category_mean_SignalStrengthdBm size below_mean
## 1                       -89.99531 4224         No
## 2                       -89.99531 4224         No
## 3                       -89.99531 4224         No
## 4                       -89.99531 4224         No
## 5                       -89.99531 4224         No
## 6                       -89.99531 4224         No
data_frame_NetworkType <- data_frame_NetworkType_SignalStrengthdBm|>
  filter(!(is.na(NetworkType)))|>
    group_by(NetworkType,below_mean) |>
      summarise(category_mean_SignalStrengthdBm = mean(SignalStrengthdBm,na.rm=TRUE), size=n())
## `summarise()` has grouped output by 'NetworkType'. You can override using the
## `.groups` argument.
data_frame_NetworkType
## # A tibble: 6 × 4
## # Groups:   NetworkType [3]
##   NetworkType below_mean category_mean_SignalStrengthdBm  size
##   <chr>       <chr>                                <dbl> <int>
## 1 4G          No                                   -87.1  2160
## 2 4G          yes                                  -93.4  2059
## 3 5G          No                                   -91.2  2091
## 4 5G          yes                                  -99.1  2087
## 5 LTE         No                                   -86.8  2112
## 6 LTE         yes                                  -93.2  2112

Visualization of NetworkType vs SignalStrengthdBm

p <- data_frame_NetworkType |>
  ggplot(aes(x = NetworkType, y=category_mean_SignalStrengthdBm, fill =below_mean ) )+
  geom_bar(position = "dodge", stat = "identity") +
  theme_minimal() +
  scale_fill_brewer(palette = 'Pastel2')
  
p

p <- data_frame_NetworkType |>
  ggplot(aes(x = NetworkType, y=size, fill =below_mean ) )+
  geom_bar(position = "dodge", stat = "identity") +
  theme_minimal() +
  scale_fill_brewer(palette = 'Set2')
  
p

Calculating the probabilities

total <- 2160+2059+2091+2087+2112+2112

probability of having 4G as NetworkType and SignalStrengthdBm above average mean

NetworkType_4G_above <- 2160/total
NetworkType_4G_above
## [1] 0.1711433

probability of having 4G as NetworkType and SignalStrengthdBm below average mean

NetworkType_4G_below <- 2059/total
NetworkType_4G_below
## [1] 0.1631408

probability of having 5G as NetworkType and SignalStrengthdBm above average mean

NetworkType_5G_above <- 2091/total
NetworkType_5G_above
## [1] 0.1656763

probability of having 5G as NetworkType and SignalStrengthdBm below average mean

NetworkType_5G_below <- 2087/total
NetworkType_5G_below
## [1] 0.1653593

probability of having LTE as NetworkType and SignalStrengthdBm above average mean

NetworkType_LTE_above <- 2112/total
NetworkType_LTE_above
## [1] 0.1673401

probability of having LTE as NetworkType and SignalStrengthdBm below average mean

NetworkType_LTE_below <- 2112/total
NetworkType_LTE_below
## [1] 0.1673401

Visualizing the percentages

# Pie Chart with Percentages
slices <- c(NetworkType_4G_above,NetworkType_4G_below, NetworkType_5G_above, NetworkType_5G_below, NetworkType_LTE_above, NetworkType_LTE_below)


lbls <- c("NetworkType_4G_above","NetworkType_4G_below", "NetworkType_5G_above", "NetworkType_5G_below", "NetworkType_LTE_above", "NetworkType_LTE_below")
pct <- round(slices/sum(slices)*100)
lbls <- paste(lbls, pct)
# add percents to labels
lbls <- paste(lbls,"%",sep="") # ad % to labels
pie(slices,labels = lbls, main="Pie Chart")

Assigning the Anomaly tag

data_frame_NetworkType_SignalStrengthdBm <- data_frame_NetworkType_SignalStrengthdBm %>%
    mutate(Anomaly = ifelse(NetworkType == '4G' & below_mean=='No', "Anomaly", "Not an anomaly"))
head(data_frame_NetworkType_SignalStrengthdBm)
##   Timestamp       Locality Latitude Longitude SignalStrengthdBm
## 1   51:30.7        Danapur 25.42617  85.09443         -76.72446
## 2   23:56.4      Bankipore 25.59105  85.25081         -77.52335
## 3   24:39.7  Ashok Rajpath 25.48233  85.14868         -78.55790
## 4   02:26.4 Rajendra Nagar 25.46116  85.23826         -78.77064
## 5   32:12.7  Ashok Rajpath 25.61583  85.10455         -77.27129
## 6   58:31.2 Rajendra Nagar 25.56698  85.12149         -75.67285
##   DataThroughputMbps Latencyms NetworkType BB60CMeasurementdBm
## 1           1.105452  138.9383         LTE           -72.50342
## 2           2.476287  137.6606         LTE           -73.45848
## 3           1.031408  165.4447         LTE           -73.88210
## 4           1.461008  101.6800         LTE           -74.04047
## 5           1.792531  177.4726         LTE           -74.08004
## 6           2.572450  131.5178         LTE           -74.66450
##   srsRAN.MeasurementdBm BladeRFxA9MeasurementdBm
## 1             -84.97208                -75.12779
## 2             -84.77590                -77.94294
## 3             -84.76128                -77.21692
## 4             -87.27312                -77.86791
## 5             -85.93112                -75.57369
## 6             -85.16332                -74.51283
##   category_mean_SignalStrengthdBm size below_mean        Anomaly
## 1                       -89.99531 4224         No Not an anomaly
## 2                       -89.99531 4224         No Not an anomaly
## 3                       -89.99531 4224         No Not an anomaly
## 4                       -89.99531 4224         No Not an anomaly
## 5                       -89.99531 4224         No Not an anomaly
## 6                       -89.99531 4224         No Not an anomaly

Testable Hypothesis

Hypothesis - 5G Network should have higher Signal strength

5G network has the highest average signal strength.

2. Summarizing ‘DataThroughputMbps’ based on the grouping of ‘Network type’

data_frame_NetworkType <- data_frame|>
  filter(!(is.na(NetworkType)))|>
    group_by(NetworkType) |>
      summarise(category_mean_DataThroughputMbps = mean(DataThroughputMbps,na.rm=TRUE), size=n())
data_frame_NetworkType_DataThroughputMbps <- data_frame |>
  left_join(data_frame_NetworkType, by = "NetworkType")

data_frame_NetworkType_DataThroughputMbps <- data_frame_NetworkType_DataThroughputMbps[,]
mean(data_frame$DataThroughputMbps)
## [1] 20.90948
data_frame_NetworkType_DataThroughputMbps <- data_frame_NetworkType_DataThroughputMbps |>
    mutate( below_mean = ifelse(DataThroughputMbps < category_mean_DataThroughputMbps, "yes", "No"))
head(data_frame_NetworkType_DataThroughputMbps)
##   Timestamp       Locality Latitude Longitude SignalStrengthdBm
## 1   51:30.7        Danapur 25.42617  85.09443         -76.72446
## 2   23:56.4      Bankipore 25.59105  85.25081         -77.52335
## 3   24:39.7  Ashok Rajpath 25.48233  85.14868         -78.55790
## 4   02:26.4 Rajendra Nagar 25.46116  85.23826         -78.77064
## 5   32:12.7  Ashok Rajpath 25.61583  85.10455         -77.27129
## 6   58:31.2 Rajendra Nagar 25.56698  85.12149         -75.67285
##   DataThroughputMbps Latencyms NetworkType BB60CMeasurementdBm
## 1           1.105452  138.9383         LTE           -72.50342
## 2           2.476287  137.6606         LTE           -73.45848
## 3           1.031408  165.4447         LTE           -73.88210
## 4           1.461008  101.6800         LTE           -74.04047
## 5           1.792531  177.4726         LTE           -74.08004
## 6           2.572450  131.5178         LTE           -74.66450
##   srsRAN.MeasurementdBm BladeRFxA9MeasurementdBm
## 1             -84.97208                -75.12779
## 2             -84.77590                -77.94294
## 3             -84.76128                -77.21692
## 4             -87.27312                -77.86791
## 5             -85.93112                -75.57369
## 6             -85.16332                -74.51283
##   category_mean_DataThroughputMbps size below_mean
## 1                         1.994625 4224        yes
## 2                         1.994625 4224         No
## 3                         1.994625 4224        yes
## 4                         1.994625 4224        yes
## 5                         1.994625 4224        yes
## 6                         1.994625 4224         No
data_frame_NetworkType <- data_frame_NetworkType_DataThroughputMbps|>
  filter(!(is.na(NetworkType)))|>
    group_by(NetworkType,below_mean) |>
      summarise(category_mean_DataThroughputMbps = mean(DataThroughputMbps,na.rm=TRUE), size=n())
## `summarise()` has grouped output by 'NetworkType'. You can override using the
## `.groups` argument.
data_frame_NetworkType
## # A tibble: 6 × 4
## # Groups:   NetworkType [3]
##   NetworkType below_mean category_mean_DataThroughputMbps  size
##   <chr>       <chr>                                 <dbl> <int>
## 1 4G          No                                     8.25  2115
## 2 4G          yes                                    4.73  2104
## 3 5G          No                                    77.1   2096
## 4 5G          yes                                   31.9   2082
## 5 LTE         No                                     2.50  2119
## 6 LTE         yes                                    1.49  2105

Visualization of NetworkType vs DataThroughputMbps

p <- data_frame_NetworkType |>
  ggplot(aes(x = NetworkType, y=category_mean_DataThroughputMbps, fill =below_mean ) )+
  geom_bar(position = "dodge", stat = "identity") +
  theme_minimal() +
  scale_fill_brewer(palette = 'Pastel2')
  
p

p <- data_frame_NetworkType |>
  ggplot(aes(x = NetworkType, y=size, fill =below_mean ) )+
  geom_bar(position = "dodge", stat = "identity") +
  theme_minimal() +
  scale_fill_brewer(palette = 'Set2')
  
p

Calculating the probabilities

total <- 2115+2104+2096+2082+2119+2105

probability of having 4G as NetworkType and DataThroughputMbps above average mean

NetworkType_4G_above <- 2115/total
NetworkType_4G_above
## [1] 0.1675778

probability of having 4G as NetworkType and DataThroughputMbps below average mean

NetworkType_4G_below <- 2104/total
NetworkType_4G_below
## [1] 0.1667063

probability of having 5G as NetworkType and DataThroughputMbps above average mean

NetworkType_5G_above <- 2096/total
NetworkType_5G_above
## [1] 0.1660724

probability of having 5G as NetworkType and DataThroughputMbps below average mean

NetworkType_5G_below <- 2082/total
NetworkType_5G_below
## [1] 0.1649632

probability of having LTE as NetworkType and DataThroughputMbps above average mean

NetworkType_LTE_above <- 2119/total
NetworkType_LTE_above
## [1] 0.1678948

probability of having LTE as NetworkType and DataThroughputMbps below average mean

NetworkType_LTE_below <- 2105/total
NetworkType_LTE_below
## [1] 0.1667855

Visualizing the percentages

# Pie Chart with Percentages
slices <- c(NetworkType_4G_above,NetworkType_4G_below, NetworkType_5G_above, NetworkType_5G_below, NetworkType_LTE_above, NetworkType_LTE_below)


lbls <- c("NetworkType_4G_above","NetworkType_4G_below", "NetworkType_5G_above", "NetworkType_5G_below", "NetworkType_LTE_above", "NetworkType_LTE_below")
pct <- round(slices/sum(slices)*100)
lbls <- paste(lbls, pct)
# add percents to labels
lbls <- paste(lbls,"%",sep="") # ad % to labels
pie(slices,labels = lbls, main="Pie Chart")

Assigning the Anomaly tag

data_frame_NetworkType_DataThroughputMbps <- data_frame_NetworkType_DataThroughputMbps %>%
    mutate(Anomaly = ifelse(NetworkType == '4G' & below_mean=='No', "Anomaly", "Not an anomaly"))
head(data_frame_NetworkType_DataThroughputMbps)
##   Timestamp       Locality Latitude Longitude SignalStrengthdBm
## 1   51:30.7        Danapur 25.42617  85.09443         -76.72446
## 2   23:56.4      Bankipore 25.59105  85.25081         -77.52335
## 3   24:39.7  Ashok Rajpath 25.48233  85.14868         -78.55790
## 4   02:26.4 Rajendra Nagar 25.46116  85.23826         -78.77064
## 5   32:12.7  Ashok Rajpath 25.61583  85.10455         -77.27129
## 6   58:31.2 Rajendra Nagar 25.56698  85.12149         -75.67285
##   DataThroughputMbps Latencyms NetworkType BB60CMeasurementdBm
## 1           1.105452  138.9383         LTE           -72.50342
## 2           2.476287  137.6606         LTE           -73.45848
## 3           1.031408  165.4447         LTE           -73.88210
## 4           1.461008  101.6800         LTE           -74.04047
## 5           1.792531  177.4726         LTE           -74.08004
## 6           2.572450  131.5178         LTE           -74.66450
##   srsRAN.MeasurementdBm BladeRFxA9MeasurementdBm
## 1             -84.97208                -75.12779
## 2             -84.77590                -77.94294
## 3             -84.76128                -77.21692
## 4             -87.27312                -77.86791
## 5             -85.93112                -75.57369
## 6             -85.16332                -74.51283
##   category_mean_DataThroughputMbps size below_mean        Anomaly
## 1                         1.994625 4224        yes Not an anomaly
## 2                         1.994625 4224         No Not an anomaly
## 3                         1.994625 4224        yes Not an anomaly
## 4                         1.994625 4224        yes Not an anomaly
## 5                         1.994625 4224        yes Not an anomaly
## 6                         1.994625 4224         No Not an anomaly

Testable Hypothesis

Hypothesis - 5G Network should have higher data throughput

5G network has the highest average data throughput.

3. Summarizing ‘Latencyms’ based on the grouping of ‘Network type’

data_frame_NetworkType <- data_frame|>
  filter(!(is.na(NetworkType)))|>
    group_by(NetworkType) |>
      summarise(category_mean_Latencyms = mean(Latencyms,na.rm=TRUE), size=n())
data_frame_NetworkType_Latencyms <- data_frame |>
  left_join(data_frame_NetworkType, by = "NetworkType")

data_frame_NetworkType_Latencyms <- data_frame_NetworkType_Latencyms[,]
mean(data_frame$Latencyms)
## [1] 85.27615
data_frame_NetworkType_Latencyms <- data_frame_NetworkType_Latencyms |>
    mutate( below_mean = ifelse(Latencyms < category_mean_Latencyms, "yes", "No"))
head(data_frame_NetworkType_Latencyms)
##   Timestamp       Locality Latitude Longitude SignalStrengthdBm
## 1   51:30.7        Danapur 25.42617  85.09443         -76.72446
## 2   23:56.4      Bankipore 25.59105  85.25081         -77.52335
## 3   24:39.7  Ashok Rajpath 25.48233  85.14868         -78.55790
## 4   02:26.4 Rajendra Nagar 25.46116  85.23826         -78.77064
## 5   32:12.7  Ashok Rajpath 25.61583  85.10455         -77.27129
## 6   58:31.2 Rajendra Nagar 25.56698  85.12149         -75.67285
##   DataThroughputMbps Latencyms NetworkType BB60CMeasurementdBm
## 1           1.105452  138.9383         LTE           -72.50342
## 2           2.476287  137.6606         LTE           -73.45848
## 3           1.031408  165.4447         LTE           -73.88210
## 4           1.461008  101.6800         LTE           -74.04047
## 5           1.792531  177.4726         LTE           -74.08004
## 6           2.572450  131.5178         LTE           -74.66450
##   srsRAN.MeasurementdBm BladeRFxA9MeasurementdBm category_mean_Latencyms size
## 1             -84.97208                -75.12779                150.5047 4224
## 2             -84.77590                -77.94294                150.5047 4224
## 3             -84.76128                -77.21692                150.5047 4224
## 4             -87.27312                -77.86791                150.5047 4224
## 5             -85.93112                -75.57369                150.5047 4224
## 6             -85.16332                -74.51283                150.5047 4224
##   below_mean
## 1        yes
## 2        yes
## 3         No
## 4        yes
## 5         No
## 6        yes
data_frame_NetworkType <- data_frame_NetworkType_Latencyms|>
  filter(!(is.na(NetworkType)))|>
    group_by(NetworkType,below_mean) |>
      summarise(category_mean_Latencyms = mean(Latencyms,na.rm=TRUE), size=n())
## `summarise()` has grouped output by 'NetworkType'. You can override using the
## `.groups` argument.
data_frame_NetworkType
## # A tibble: 6 × 4
## # Groups:   NetworkType [3]
##   NetworkType below_mean category_mean_Latencyms  size
##   <chr>       <chr>                        <dbl> <int>
## 1 4G          No                            87.4  2121
## 2 4G          yes                           62.2  2098
## 3 5G          No                            39.8  2091
## 4 5G          yes                           19.9  2087
## 5 LTE         No                           175.   2122
## 6 LTE         yes                          125.   2102

Visualization of NetworkType vs Latencyms

p <- data_frame_NetworkType |>
  ggplot(aes(x = NetworkType, y=category_mean_Latencyms, fill =below_mean ) )+
  geom_bar(position = "dodge", stat = "identity") +
  theme_minimal() +
  scale_fill_brewer(palette = 'Pastel2')
  
p

p <- data_frame_NetworkType |>
  ggplot(aes(x = NetworkType, y=size, fill =below_mean ) )+
  geom_bar(position = "dodge", stat = "identity") +
  theme_minimal() +
  scale_fill_brewer(palette = 'Set2')
  
p

Calculating the probabilities

total <- 2121+2098+2091+2087+2122+2102

probability of having 4G as NetworkType and Latencyms above average mean

NetworkType_4G_above <- 2121/total
NetworkType_4G_above
## [1] 0.1680532

probability of having 4G as NetworkType and Latencyms below average mean

NetworkType_4G_below <- 2098/total
NetworkType_4G_below
## [1] 0.1662309

probability of having 5G as NetworkType and Latencyms above average mean

NetworkType_5G_above <- 2091/total
NetworkType_5G_above
## [1] 0.1656763

probability of having 5G as NetworkType and Latencyms below average mean

NetworkType_5G_below <- 2087/total
NetworkType_5G_below
## [1] 0.1653593

probability of having LTE as NetworkType and Latencyms above average mean

NetworkType_LTE_above <- 2122/total
NetworkType_LTE_above
## [1] 0.1681325

probability of having LTE as NetworkType and Latencyms below average mean

NetworkType_LTE_below <- 2102/total
NetworkType_LTE_below
## [1] 0.1665478

Visualizing the percentages

# Pie Chart with Percentages
slices <- c(NetworkType_4G_above,NetworkType_4G_below, NetworkType_5G_above, NetworkType_5G_below, NetworkType_LTE_above, NetworkType_LTE_below)


lbls <- c("NetworkType_4G_above","NetworkType_4G_below", "NetworkType_5G_above", "NetworkType_5G_below", "NetworkType_LTE_above", "NetworkType_LTE_below")
pct <- round(slices/sum(slices)*100)
lbls <- paste(lbls, pct)
# add percents to labels
lbls <- paste(lbls,"%",sep="") # ad % to labels
pie(slices,labels = lbls, main="Pie Chart")

Assigning the Anomaly tag

data_frame_NetworkType_Latencyms <- data_frame_NetworkType_Latencyms %>%
    mutate(Anomaly = ifelse(NetworkType == '4G' & below_mean=='No', "Anomaly", "Not an anomaly"))
head(data_frame_NetworkType_Latencyms)
##   Timestamp       Locality Latitude Longitude SignalStrengthdBm
## 1   51:30.7        Danapur 25.42617  85.09443         -76.72446
## 2   23:56.4      Bankipore 25.59105  85.25081         -77.52335
## 3   24:39.7  Ashok Rajpath 25.48233  85.14868         -78.55790
## 4   02:26.4 Rajendra Nagar 25.46116  85.23826         -78.77064
## 5   32:12.7  Ashok Rajpath 25.61583  85.10455         -77.27129
## 6   58:31.2 Rajendra Nagar 25.56698  85.12149         -75.67285
##   DataThroughputMbps Latencyms NetworkType BB60CMeasurementdBm
## 1           1.105452  138.9383         LTE           -72.50342
## 2           2.476287  137.6606         LTE           -73.45848
## 3           1.031408  165.4447         LTE           -73.88210
## 4           1.461008  101.6800         LTE           -74.04047
## 5           1.792531  177.4726         LTE           -74.08004
## 6           2.572450  131.5178         LTE           -74.66450
##   srsRAN.MeasurementdBm BladeRFxA9MeasurementdBm category_mean_Latencyms size
## 1             -84.97208                -75.12779                150.5047 4224
## 2             -84.77590                -77.94294                150.5047 4224
## 3             -84.76128                -77.21692                150.5047 4224
## 4             -87.27312                -77.86791                150.5047 4224
## 5             -85.93112                -75.57369                150.5047 4224
## 6             -85.16332                -74.51283                150.5047 4224
##   below_mean        Anomaly
## 1        yes Not an anomaly
## 2        yes Not an anomaly
## 3         No Not an anomaly
## 4        yes Not an anomaly
## 5         No Not an anomaly
## 6        yes Not an anomaly

Testable Hypothesis

Hypothesis - LTE Network should have higher Latency

LTE network has the highest average latency.