看板 FJU-STAT95B 關於我們 聯絡資訊
#include <C:\devcpp\all.h> /*double F1( double x ) { return f_den(x,3,20); }*/ double normal( double x ) { double n =14; return nor_den( x, n*(n+1)/4, sqrt(n*(n+1)*(2*n+1)/24)); } int main() { long int i, j; srand((unsigned)time(NULL)); cout.setf(ios::fixed); cout.precision(10); // $$$$$$$$ Start your program here $$$$$$$$$$$$$$$$$$$$$ Univar R = time_axis(1,14,1); R.print(0); /* Univar B(14); B.print(0); B.ber_ran(0.5).print(0); cout << "inner product = "; cout << R * B << endl;*/ int rep = 10000; Univar T(rep); Univar B(14); for(i=0; i < rep; i++) { B.ber_ran(0.5); T[i] = R * B; } T.freq_dist(); T.emp_CDF(21).print(4); cout << "Monte Carlo P_value = "; cout << 2.0*T.emp_CDF(40.5) << endl; Univar t= time_axis(0,105,1); multi_dis G(t); G.push_function(normal); G.print_to_file("c:\\devcpp\\G.dat",4); 歡迎自取:) -- ▄ ▄ ████ 六丁愛維尼* ◥██◤ ˙ ◢███◣ ◤ ▃ ◢█████◣ / ◤◥████◣ -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.136.161.35
abidog:怒了 03/23 16:50
weiching0323:泰明葛格 後來有強調沒有印章的不能交!!! 03/23 18:32
s890009:樓上一回家就宅B? 03/23 23:31