Publications by Muhammad Bilal(DS-5121107)
MUHAMMAD BILAL (DS-5TH) Comparing Proportions in R
##One-proportion z-Test: #Compute one proportion z-test in R res <- prop.test(x = 95, n = 160, p = 0.5, correct = FALSE) # Printing the results res ## ## 1-sample proportions test without continuity correction ## ## data: 95 out of 160, null probability 0.5 ## X-squared = 5.625, df = 1, p-value = 0.01771 ## alternative...
237 sym
Muhammad Bilal DS5th(5121107) Comparing mean
##Comparing one-sample mean to a standard known mean: #One-sample T-test (parametric): set.seed(1234) my_data <- data.frame( name = paste0(rep("M_", 10), 1:10), weight = round(rnorm(10, 20, 2), 1) ) #Check your data: # Print the first 10 rows of the data head(my_data, 10) ## name weight ## 1 M_1 17.6 ## 2 M_2 20.6 ## 3 M_3...
1889 sym R (30298 sym/220 pcs) 23 img
MUHAMMAD BILAL DS-5TH correlation test in two varaible
Correlation Test Between Two Variables in R Install and load required R packages install.packages(“ggpubr”) library(“ggpubr”) Import your data into R my_data <- mtcars head(my_data, 6) ## mpg cyl disp hp drat wt qsec vs am gear carb ## Mazda RX4 21.0 6 160 110 3.90 2.620 16.46 0 1 4 4 ## Mazda...
840 sym R (8681 sym/44 pcs) 8 img
MUHAMMAD BILAL DS-5TH (Descriptive Statistics and Graphics)
Import your data into R my_data <- iris my_data ## Sepal.Length Sepal.Width Petal.Length Petal.Width Species ## 1 5.1 3.5 1.4 0.2 setosa ## 2 4.9 3.0 1.4 0.2 setosa ## 3 4.7 3.2 1.3 0.2 setosa ## 4 4.6 ...
1112 sym R (18512 sym/87 pcs) 6 img
MUHAMMAD BILAL DS-5TH(Normality Test in R)
Install required R packages install.packages(“dplyr”, dependencies = TRUE) ggpubr for an easy ggplot2-based data visualization ` ## Install install.packages(“ggpubr”, dependencies = TRUE) Load required R packages library("dplyr") ## Warning: package 'dplyr' was built under R version 4.3.2 ## ## Attaching package: 'dplyr' ## The followin...
780 sym R (1044 sym/15 pcs) 2 img
MUHAMMAD BILAL (Statistical_Tests_and_Assumptions)
Statistical Tests and Assumptions Research questions and corresponding statistical tests The most popular research questions include: 1.whether two variables (n = 2) are correlated (i.e., associated) 2.whether multiple variables (n > 2) are correlated 3.whether two groups (n = 2) of samples differ from each other 4.whether multiple groups (n...
2679 sym
Practical_Muhammad Bilal Ds-5th(5121107)
#Q.1 Energy_In_take<-c(5260,5470,5640,6180,6390,6515,6805,7515,8230,8770) mean(Energy_In_take) ## [1] 6677.5 var(Energy_In_take) ## [1] 1378535 sd(Energy_In_take) ## [1] 1174.11 boxplot(Energy_In_take) shapiro.test(Energy_In_take) ## ## Shapiro-Wilk normality test ## ## data: Energy_In_take ## W = 0.93468, p-value = 0.4955 alpha<- 0.05 ...
21 sym 1 img
Muhammad Bilal DS-5th (test of hypothesis)
# 10 invidual are chossen random for in normal popuation and highest ARE found to be in inches # hight 63 63 66 67 68 69 70 70 71 71 #in the lite of these data discuss the suggestion that the mean height in the population is 66 inches x<-c( 63, 63, 66, 67, 68, 69, 70, 70, 71, 71 ) mue <-66 sum(x) ## [1] 678 mean(x) ## [1] 67.8 n<-length(x...
3646 sym Python (7058 sym/80 pcs) 12 img
Muhammad Bilal DS-5121107(Assignment-05) EX#3.15
library(dslabs) data(murders) #Q:1. Compute the per 100,000 murder rate for each state and store it in an object called murder_rate. Then use logical operators to create a logical vector named low that tells us which entries of murder_rate are lower than 1. #Answer murder_rate <- (murders$total / murders$population) * 100000 low <- murder_rate...
1506 sym R (2615 sym/25 pcs)
Muhammad Bilal DS-5121107(Assignment-05) ClassWork
Class Work # Create a data frame with the student information data <- data.frame( Name = c("Ali", "Ahmed", "Sania", "Sara", "Adil", "sharjeel", "subhan","asad", "athar","hassan", "waled"), CGPA = c(2.5, 3.2, 3.9, 2.99, 3.1, 2.99,2.91,2.87, 3.2, 3.52, 2.5), GRADE = c("D", "B", "A", "C", "B", "A", "B", "B", "B", "A", "D") ) #Q1: Which S...
20 sym