---
# System prepended metadata

title: Summary statistics for the 30 sample prices

---

回歸分析作業 1044794 毛勝煒
![](https://i.imgur.com/LoEmosG.png)
![](https://i.imgur.com/q2SH1Lm.png)
d<-c(155.5,195.0,197.0,207.0,214.9,230.0,239.5,242.0,252.5,255.0,259.9,259.9,269.9,270.0,274.9,283.0,285.0,285.0,299.0,299.9,
319.0,319.9,324.5,330.0,336.0,339.0,340.0,355.0,359.9,359.9)
stem(d)
hist(x=d,main="",xlab="房價",ylab="數量")

# Summary statistics for the 30 sample prices
d<-c(155.5,195.0,197.0,207.0,214.9,230.0,239.5,242.0,252.5,255.0,259.9,259.9,269.9,270.0,274.9,283.0,285.0,285.0,299.0,299.9,
319.0,319.9,324.5,330.0,336.0,339.0,340.0,355.0,359.9,359.9)

平均數
result.mean <- mean(d)
print(result.mean)

![](https://i.imgur.com/d7PPM84.png)

總和
![](https://i.imgur.com/5S03Ike.png)

中位數
median.result <- median(d)
print(median.result)
![](https://i.imgur.com/WU6luVw.png)

眾數
![](https://i.imgur.com/XpvU2rT.png)

變異數與標準差
![](https://i.imgur.com/hKdvQWC.png)


# Simulate 500 and 1000 data form normal distribution.
500:
rnorm(500, mean = 10, sd = 1)
![](https://i.imgur.com/U2hc8K8.png)


1000:
rnorm(1000, mean = 10, sd = 1)
![](https://i.imgur.com/088cas4.png)

500的正態分佈直方圖
![](https://i.imgur.com/pLzEMuc.png)

1000的正態分佈直方圖
![](https://i.imgur.com/rZ7xdKo.png)

smooth curve
x = seq(-5, 5, 0.1)
plot(x = x, y = dnorm(x), type="l", bty="n")
![](https://i.imgur.com/ozdPDv3.png)




