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
m1 <- 0.64882704 #mean for first set of data | |
m2 <- 0.672551333 #mean for second set of data | |
sd1 <- 0.091924365 #standard deviation for first set of data | |
sd2 <- 0.076447391 #standard deviation for second set of data | |
num1 <- 1278 #number of elements in first set of data | |
num2 <- 45 #number of elements in second set of data | |
se <- sqrt(sd1*sd1/num1+sd2*sd2/num2) #calculates standard error | |
t <- (m1-m2)/se #calculates t | |
pt(-abs(t),df=pmin(num1,num2)-1) #returns p value |
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
from twilio.rest import TwilioRestClient | |
account_sid = "AC2d73e6a6e37a5b3bd8809db9eafb2a60" | |
auth_token = "b4e9be2219ad2cc986e8ab77b9874c84" | |
client = TwilioRestClient(account_sid, auth_token) | |
message = client.messages.create(to="+50242165590", from_="+19177461129", body="Hello there!") |
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
<!DOCTYPE html> | |
<!-- | |
Copyright (c) 2012-2014 Adobe Systems Incorporated. All rights reserved. | |
Licensed to the Apache Software Foundation (ASF) under one | |
or more contributor license agreements. See the NOTICE file | |
distributed with this work for additional information | |
regarding copyright ownership. The ASF licenses this file | |
to you under the Apache License, Version 2.0 (the | |
"License"); you may not use this file except in compliance |
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
#Demanda Year 1# | |
par(mfrow=c(2,1)) | |
data<-tbl_df(day) | |
data%>%filter(yr==1)%>%group_by(season)%>%summarise(demanda=sum(cnt)) | |
data%>%filter(yr==1)%>%group_by(season)%>%summarise(demanda=sum(cnt))%>%select(demanda) | |
data%>%filter(yr==1)%>%group_by(season)%>%summarise(demanda=sum(cnt)/100000)%>%select(demanda)%>%as.matrix()%>%as.vector()%>%max() | |
data%>%filter(yr==1)%>%group_by(season)%>%summarise(demanda=sum(cnt)/100000)%>%select(demanda)%>%as.matrix()%>%as.vector() | |
data%>%filter(yr==1)%>%group_by(season)%>%summarise(demanda=sum(cnt)/100000)%>%select(demanda)%>%as.matrix()%>%as.vector()%>%barplot(names.arg=c("Primavera", "Verano", "Otono", "Invierno"), col=c("yellow", "red", "green", "blue"), main="Temporada con la demanda mas alta 2012", ylab="Demanda", xlab="Temporada") | |
#En la grafica se puede observar que la temporada del a;o que tiene mas demanda es la numero 3, que es de los dias del 21 de Junio al 22 de septiembre# |
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
#ATEMP CON DEMANDA# | |
par(mfrow=c(2,4)) | |
data%>% filter(season==1) %>% select(atemp,cnt) %>%plot(ylab="Demanda", xlab="Feeling Temperature") | |
data%>% filter(season==1) %>% select(atemp,cnt) %>% max() | |
data %>% filter(cnt == max(cnt)) %>% select(atemp) | |
points(0.505046,7836,col="red") | |
text(0.3,7836,"Demanda mas alta") | |
#cnt=7836, atemp=0.505046# | |
data%>% filter(season==2) %>% select(atemp,cnt) %>% plot(ylab="Demanda", xlab="Feeling Temperature") |
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
dat <- read.csv("hour.csv", header = TRUE) | |
dat$hr #gets everything under hr column | |
dat[1,] #gets first row | |
dat$season == 1 #returns true and false | |
#do this for all months and seasons | |
w <- which(dat$mnth == 12) | |
month12 <- data.frame(dat[w,]) | |
getAverages <- function(month){ |
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
datd <- read.csv("day.csv", header = TRUE) | |
w <- which(datd$weekday == 1) | |
monday <- data.frame(datd[w,]) | |
w <- which(datd$weekday == 2) | |
tuesday <- data.frame(datd[w,]) | |
w <- which(datd$weekday == 3) | |
wednesday <- data.frame(datd[w,]) | |
w <- which(datd$weekday == 4) | |
thursday <- data.frame(datd[w,]) | |
w <- which(datd$weekday == 5) |
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<-data.frame(Stat11=rnorm(100,mean=3,sd=2), | |
Stat21=rnorm(100,mean=4,sd=1), | |
Stat31=rnorm(100,mean=6,sd=0.5), | |
Stat41=rnorm(100,mean=10,sd=0.5), | |
Stat12=rnorm(100,mean=4,sd=2), | |
Stat22=rnorm(100,mean=4.5,sd=2), | |
Stat32=rnorm(100,mean=7,sd=0.5), | |
Stat42=rnorm(100,mean=8,sd=3), | |
Stat13=rnorm(100,mean=6,sd=0.5), | |
Stat23=rnorm(100,mean=5,sd=3), |
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 <- rnorm(100, 75, 12) | |
jpeg("scatter.jpg", type="quartz") | |
par(bg = "grey") | |
plot(data, main="Notas de matematica \n seccion A", ylab="frecuencia", xlab="notas", col="blue") | |
dev.off() |
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
quiz.time=c(15, 12, 13, 19, 18, 17, 16, 18, 22, 21, 11, 14, 13, 17, 17) | |
jpeg("puntos.jpg", type="quartz") | |
stripchart(quiz.time, | |
method="stack", | |
pch=19, | |
main="Tiempo de completacion de examen", | |
col="Red", | |
offset=0.5, | |
xlab="Tiempo (min)") | |
dev.off() |
NewerOlder