This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Step 4 - Conduct two-sample t-test | |
#Null Hypothesis: There is no difference between the mean of two samples | |
#Alternate Hypothesis: There is difference between the men of two samples | |
t.test(data$screensize_sample1,data$screensize_sample2,var.equal = T) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Step 4 - Conduct two-sample t-test | |
#Null Hypothesis: There is no difference between the means of tyres before and after changing the rubber material. | |
#Alternate Hypothesis: There is a difference between the means of tyres before and after changing the rubber material. | |
t.test(data$tyre_1,data$tyre_2,paired = T) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Step 3 - Check for assumptions | |
#______________________________________________________ | |
#1. Observations in the data are independent from one another. | |
#2. Samples are independent from each other. | |
#3. To check the data is normally distributed, we will use the following codes: | |
shapiro.test(data$Stock.A) | |
shapiro.test(data$Stock.B) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Step 4 - Conduct F-test for equality of variances | |
#Null Hypothesis: Variances of both the stocks are equal i.e σ1^2 = σ2^2 or | |
#Variance of the stock A is less than the variance of Stock B or σ1^2 < σ2^2 | |
#Alternate Hypothesis: Variance of the stock B is less than the variance of Stock A or σ1^2 > σ2^2 | |
var.test(data$Stock.A,data$Stock.B) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Step 3 - Calculate the proportion of experience of employees | |
#Proportion table for observed frequencies | |
prop.table((table(data$Experience.intervals))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Step 4 - Calculate the chi-square value | |
#_______________________________________________________ | |
chisq.test(x = table(data$Experience.intervals), | |
p = c(0.2, 0.17, 0.41, 0.22)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Step 3 - Make a table and Calculate the chi-square value | |
#_______________________________________________________ | |
ct<-table(data$age.intervals,data$Experience.intervals) | |
ct | |
chisq.test(ct) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
install.packages("shiny") | |
install.packages("shinydashboard") | |
library(shiny) | |
library(shinydashboard) | |
ui<-shinyUI( | |
dashboardPage( | |
dashboardHeader(title = "BLACK FRIDAY SALES",titleWidth = 300, | |
dropdownMenu(type = "messages", | |
messageItem( | |
from = "Harshit Gupta", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data<-read.csv(file.choose()) | |
u1 <- data$User_ID | |
df_uniq1 <- unique(u1) | |
l1<-length(df_uniq1) | |
u2 <- data$Product_ID | |
df_uniq2 <- unique(u2) | |
l2<-length(df_uniq2) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
frow_c <- fluidRow( | |
box( | |
title = "Purchase amount by Males and Females" | |
,status = "primary" | |
,solidHeader = TRUE,background = 'purple' | |
,collapsible = TRUE | |
,plotOutput("pie_1") | |
), | |
box( | |
title = "Purchase amount by Age intervals" |