JAVA fundamental5

Queue (after stack)


import java.util.LinkedList;
import java.util.Queue;

public class Main {
    public static void main(String[] args) {
        Queue<String> queue = new LinkedList<String>();

Read more

JAVA fundamental4


We can use final to declare an object, func, var

  • object: When declare with final, this object can’t be Inherited.


When a func/var is clared as static, it will always occupy the original memeoy. Whenever we new some objects, the same static func/variable in these objects are always t[……]

Read more

Sort Algorithm


1. Buble Sort

//Buble Sort
   public static int[] bubbleSort(int[] array) {
        if (array.length == 0)
            return array;
        for (int i = 0; i < array.length; i++)
            for (int j = 0; j < array.length - 1 - i; j++)
                if (array[j + 1] < array[j]) {[......]

Read more

Applied Statistical Methods-1


  • Gauss-Markov Theorem

    为了证明 OLS 估计无偏,我们需要假设 1: E(ϵ)=0 ;假设 2: X 为确定值。

    为了得到 OLS 估计的协方差矩阵和证明 OLS 估计是最佳无偏线性估计,我们需要假设 3.1: ∀i≠j,(ϵ_i)与(ϵ_j)独立, (Cov(ϵ_i,ϵ_j) = 0 );假设 3.2: (Var(ϵ_1)=Var(ϵ_2)…=Var(ϵ_i)=σ^2 )。这两个假设可以合并为假设 3: (Var(ϵ)=σ^2I) 。


    Read more

JAVA fundamental3

An example for what have mentioned in last note.

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(;
        System.out.print("Input Principle: ");
        long p = scanner.nextLong();
        System.out.print("Input Annua[......]

Read more