2016년 3월 1일 화요일

Small Guide to Statistical Inference (OpenIntro Wrap Up)

*주의* 이 글은 내맘대로 정의하는 통계적 추론에 관한 글이다. 정석적인 설명보다는 내가 이해하는대로, 직관적으로 설명하는 글임을 미리 밝힌다.


통계하면 t test, p value, ANOVA, chi square statistic 등 알 수 없는 용어들로 가득하다. 처음에 이러한 개념들을 찔끔찔끔 배우다 보니 전체 그림이 잡히지 않아, 기본 통계 공부를 시작하기로 했다. 교재는 OpenIntro Statistics로 정했다.

그 이유는

  • 공짜다.
  • 실무자가 함께 만들었다.
  • 설명이 쉽고 직관적이다. 
  • 나는 재미있게 공부하고 싶다.

그래서 이 책으로 공부를 시작했다. 작년 10월부터 시작한 것 같은데 주말마다 조금씩 공부해서 이제 거의 고지가 보인다. 그럼 지금부터 내 맘대로 책 요약을 해보도록 하겠다.

책이 영어책이라 한글 용어를 정확하게 알지 못하니, 평소 내가 좋아하는 방식은 아니지만 굳이 한글이 있는 단어를 영어로 쓰는 경우가 있을 것이다. 




Statistical Inference는 가설을 검증하는 것이다. 
그리고 가설을 검증하는 것은 곧 가설과 실제를 비교하는 것이다.
더 구체적으로 말하면 가설적 수치와 실제 수치를 비교하여 가설이 맞는지 틀리는지를 판단하는 것이다. 

가설 검증은 데이터 특성에 따라 크게 두 갈래로 나뉜다.
  1. Inference for Numerical Data: 숫자로 된 데이터
  2. Inference for Categorical Data: 몇 개의 레이블로 구성된 데이터
크게는 위와 같은 데이터의 속성에 따라 가설 검증 방법이 달라지지만,
세부적으로는
  • 충분한 샘플의 확보 여부
  • category의 수 (categorical data의 경우에)
  • 비교하고자 하는 group의 수
등에 의해 가설 검증 방법이 달라지기도 한다.

언제 어떤 방법으로 가설을 검증해야 하는지 간단하게 표로 정리하여 보았다!



좀 더 구체적으로 각 가설 검증 방법에 해당하는 데이터 형태를 정리하여 보았다.
group이 더 추가되는지,
category가 더 추가되는지에 따라 
가설 검증 방법이 달라지는 것을 볼 수 있다.



목표한 속도로 책을 완전히 마무리 하지는 못했지만, 그래도 2월 미니 프로젝트를 마무리하는 것이 내가 지식을 소화하는 데 더 도움이 되리라 판단하고, 새로운 것을 배우기 보다는, 배운 것을 정리하는 데 시간을 들이기로 했다. 남은 챕터는 출근시간에 틈틈이 보도록 해야겠다!

그래도 모호하기만 했던 통계가 이제야 좀 뭔가 보이는 것 같다.

이제 써 먹을 일만 남았다!

써먹을 수 있는 지식이 되도록 해야지~











2016년 2월 10일 수요일

OpenIntro Statistics Chapter #4-#6

Chapter 4. Foundations for Inference
Chapter 5. Inference for Numerical Data
Chapter 6. Inference for Categorical Data



Statistical inference is one field of statistics.
It is all about judging the quality of guess on parameters. To be more specific, statistical inference is about understanding the quality of parameter estimates.

Generally, there are two methods to measure the quality of parameter estimates. However, they are pretty much the same thing from different point of views.

1. Confidence Interval
- (based on sample parameter distribution, not the distribution of sample itself)
- Build confidence interval around alternative hypothesis and see if null hypothesis value is within the interval
2. Hypothesis Testing
- (based on sample parameter distribution, not the distribution of sample itself)
- Given interval based on null hypothesis distribution, see if alternative hypothesis value is outside of the interval.
- P value: the area outside the interval = how strong the evidence supports the null hypothesis

When applying the methods, there could be two cases: numerical data case and categorical data case.

1. Numerical Data
- Measuring the difference of two means
- Sample mean distribution: standard error = (std_null^2/n_null + std_alt^2/n_alt)^(1/2)

2. Categorical Data
- Measuring the difference of two proportions
- Sample proportion distribution: standard error = (p1(1-p1)/n1 + p2(1-p2)/n2)^(1/2)
- Conditions: The number of successes and failures should be over 10, respectively.


#Comment: Being good at statistics means having good understanding of conditions to apply specific statistical methods.
Just knowing how to apply statistics method itself could be dangerous. You might end up making serious mistakes in interpreting data.






2015년 12월 10일 목요일

GA: custom dimensions, custom metrics, custom variables


  • Before: Custom Variables -> After: Custom Dimensions & Custom Metrics
  • Custom Dimensions: String
  • Custom Metrics: Integer


Reference:
- How to Access Custom Dimensions in Google Analytics: http://www.lunametrics.com/blog/2013/09/10/access-custom-dimensions-google-analytics/
- Implementing Custom Variables, comparing ga.js and analytics.js: http://misterphilip.com/universal-analytics/migration/variables

2015년 12월 8일 화요일

scala를 배우자

https://ppassa.wordpress.com/2012/02/19/getting_started_scala/

2015년 11월 9일 월요일

Convolutional Neural Networks

Convolutional Neural Network = Convolution + Neural Network

It is basically a neural network, but with a convolution layer.

Simply put, feeding the neural network with preprocessed features not the raw image itself.

Convolution layers do this preprocessing.


Useful Resources:

Deepcumen: http://deepcumen.com/2015/04/convolutional-neural-network/#comment-458

CS231N.Stanford: http://cs231n.github.io/convolutional-networks/