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
# coding: utf-8 | |
#Libraries | |
import scipy.stats as stat | |
import numpy as np | |
from __future__ import division | |
import math | |
import matplotlib.pyplot as plt | |
%matplotlib inline |
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
# coding: utf-8 | |
# In[1]: | |
#libraries | |
import scipy.stats as stat | |
import numpy as np | |
from __future__ import division | |
import math |
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
# coding: utf-8 | |
# In[1]: | |
#Import libraries | |
import scipy.stats as stat | |
import numpy as np | |
from __future__ import division | |
get_ipython().magic(u'matplotlib inline') |
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
```python | |
#Import libraries | |
import numpy as np | |
import matplotlib.pyplot as plt | |
import matplotlib.mlab as mlab | |
from __future__ import division | |
%matplotlib inline | |
``` |
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
library(tseries) | |
# Simulate Gaussian white noise, find the sample acf, and compare with theoretical acf | |
x <- rnorm(300, 0, 1) | |
# Calculate and plot sample acf | |
myacf = acf(x,plot=FALSE) | |
# Simulate from an MA(1) process, e.g. X_t = Z_t + .8 Z_{t-1} | |
y <- arima.sim(list(ma=1), n = 300, sd = 1) |
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
--- | |
title: "PSTAT 131 HW1" | |
author: "Idris Rasheed and Faraz Farooq" | |
date: "April 12, 2017" | |
output: pdf_document | |
--- | |
###1 | |
(a) Looking up customers of a company according to their profitability. | |
No. This is a simple accounting calculation. |
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
/* exercise 1 */ | |
/* set library location */ | |
LIBNAME "C:\Users\SSMS1301-14\Desktop\PSTAT 130 M17" | |
/* reads airport data with three variables*/ | |
data work.airports; | |
infile 'airports.dat'; | |
input @ 1 Code $3. | |
@ 4 City $50. | |
@54 Country $15.; | |
run; |
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
#Import libraries | |
import numpy as np | |
import math as math | |
n = 10000 | |
def Monte_Carlo(n): | |
return np.mean(np.exp(np.random.uniform(0,1,n))) | |
print Monte_Carlo(n) |
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
--- | |
title: "Bitcoins Market" | |
author: "Idris Rasheed" | |
date: "August 12, 2017" | |
output: pdf_document | |
--- | |
```{r setup, include=FALSE} | |
knitr::opts_chunk$set(echo = TRUE) | |
``` |
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
--- | |
title: "Pima Indian Women Code" | |
author: "Idris Rasheed" | |
date: "August 12, 2017" | |
output: pdf_document | |
--- | |
```{r setup, include=FALSE} | |
knitr::opts_chunk$set(echo = TRUE) | |
``` |