由买买提看人间百态

topics

全部话题 - 话题: sqrt
首页 上页 1 2 3 4 5 6 7 8 9 10 下页 末页 (共10页)
o**a
发帖数: 76
1
来自主题: Mathematics版 - 再来Ahlfors书上一道习题
p148, ex5
Show that a single-valued analytic branch of \sqrt(1-z^2) can be defined
in any region such that the points -1 and +1 are in the same component
of the complement. What are the possible values of
\int dz/\sqrt(1-z^2)
over a closed curve in the region?
例如这个region可以取 2<|z|<3。我们也可以定义一个\sqrt(1-z^2)的单叶解析分支。
所以这道题还是挺有意思的。
q*d
发帖数: 22178
2
来自主题: Mathematics版 - 求助,x*y'的特征值是多少?
1.x和y线性相关,在x,y表象下,|x>,
本征值为C=/,其它的本征值都是0,
2.x和y线性无关,在x,y表象下,|x>,|y>的
线性组合,很容易求得为:sqrt()*|x>+sqrt()|y>,本征值为
sqrt(),其它的是0
注:|x>=x,
q*d
发帖数: 22178
3
来自主题: Mathematics版 - 求助,x*y'的特征值是多少?
1.x和y线性相关,在x,y表象下,|x>,
本征值为C=/,其它的本征值都是0,
2.x和y线性无关,在x,y表象下,|x>,|y>的
线性组合,很容易求得为:sqrt()*|x>+sqrt()|y>,本征值为
sqrt(),其它的是0
注:|x>=x,
r****y
发帖数: 1437
4
来自主题: Mathematics版 - a question
Friend asked me this question and I have no clue how to do it
A set of numbers, sqrt(1), sqrt(2), ..., sqrt(50)
You divide these 50 numbers into two group, the sum of the
first group is sum1, the sum of the second group is sum2, let
dsum = abs(sum1 - sum2)
question, how you divide these 50 numbers to make dsum as small as
possible?
The gut is dsum could be very small, -> 0. But no idea how to prove
and how to find those two sets. Hehe.
g******s
发帖数: 733
5
在标准的Boltzmann模拟退火中,随机数x的产生服从高斯分布,即
g(x)=(2*pi*T)^(-D/2)*exp[-x^2/(2*T)], 其中x={x_i, i=1….D}. 当D=1时,g(x)是
标准的高斯概率密度函数,其standard deviation 为sqrt(T),对它在无穷区域积分为1,
用matlab中的randn*sqrt(T)可以得到g(x). 当D>1时,基本上只和D=1时相差一个常数系
数, 我觉得归一化之后几乎完全一样.
我的问题是
1)当D>1时,g(x)还可以被称为概率密度函数吗?因为只相差一个常数系数, 是不是说明
归一化之后D>1和D=1的情况是一样的?
2) 用matlab中的randn*sqrt(T)可以得到D=1时的g(x). 请问怎么用randn这个函数得到
D>1时的g(x)? 假设给定T=2, D=32, 每一维空间产生一个符合g(x)分布的随机数,总共
产生32个符合g(x)分布的随机数,怎么用randn得到?
先谢了!
v********e
发帖数: 1058
6
如果n是合数的话,取最大的那个质因数a,按照假设是大于\sqrt{n}的,那么n/a小于\
sqrt{a},且不等于1,所以n一定还有小于\sqrt{n}的质因数。
j******s
发帖数: 387
7
来自主题: Mathematics版 - 两道中学数学题,不会做
设那一大堆=A
那么A =2
而且x -sqrt(A)=2
因为sqrt()根号里面的东西就是整个A的重复,反正是无限重复,多一个根号少一个根
号OK的。
所以 x - sqrt(2) =2
h**********c
发帖数: 4120
8
3. is not correct d1 d2 can > sqrt a
2. run 7 ~ 1000000 , 有两万个质数 sin(sqrt a pi ) <0,可能是运算精度的问题.有21万个合数(不含偶数)sin(sqrt a pi ) <0计算正确。
A***C
发帖数: 143
9
来自主题: Mathematics版 - 求大牛帮忙解题,特大包子答谢!
右边的不等式是显而易见的,因为
||x||_2^2 -(||x||_1)^2 = - \sum_{i \neq j} |x_i||x_j| <= 0
关于左边的不等式,可以这样来证
(||x||_1/\sqrt n)^2=(1/n)\sum_{ij} |x_i||x_j|
=(1/n)x_i sign(x_i) sign(x_j) x_j
=x^T H x, where
H = hh^T/n, and h_i=sign(x_i)
易知H只有一个非零特征值,且其值为 ||h||_2/\sqrt n <=1
I-H半正定,这样
x^T (I-H)x >=0,
即 ||x||^2_2 - (||x||_1/\sqrt n)^2>0
i*****e
发帖数: 68
10
来自主题: Mathematics版 - 哈哈哈, 超强版居然没有一个人会
A very nice proof.
I make some revisions:
|{(a,y,z):(a,y,z)in S}|
<=min {|A(a)|*|B(a)|, |C|}
<=sqrt(|A(a)|*|B(a)|) * sqrt(|C|).
Then you take sum over all a. A standard Cauchy-Schwarz gives
|S| <= sqrt(|A|*|B|*|C|),or
|S|^2 <=|A|*|B|*|C|
高手 always uses Cauchy-Schwarz, like Zhang Yitang. Just kidding :-)
z*********g
发帖数: 37
11
来自主题: Mathematics版 - 求一道中学数学题的解法
S=sqrt(2+....)
S*S=2+S
S=2
Sqrt(1+S)=sqrt(3)
w*****1
发帖数: 473
12
来自主题: Pharmacy版 - a question about SAS (转载)
【 以下文字转载自 Statistics 讨论区 】
发信人: wz99331 (dotti), 信区: Statistics
标 题: a question about SAS
发信站: BBS 未名空间站 (Mon Apr 2 12:52:18 2012, 美东)
我需要用MACRO 语言,用DO LOOP 改变一个模版的5个固定参数创建一些新的DATA,检
测这些新的DATA最大似然值.下面是我的CODE, 但是不能运行,大家能否帮我看看?包子
酬谢!
data parents; set csgl.individs;
keep i QTP pedid dgeno;
if i <=2;
run;
/* Do loops for grid search */
/*Y=g+R(mixed model), where g=Major Gene(latent fixed effect)with 3
values: mudaa, mudab, mudbb and R = Residual(variance component)*/
/*the max, min, and std w... 阅读全帖
l*b
发帖数: 4369
13
我倒觉得,在Michelson实验里,如果假定半反半透镜无限薄,而且两束光都恰好在
waist上和这个beam splitter相交并被合并,且合并时相对相位差为0,则合并后的光
束是有可能是一束严格的高斯光束的。试想,既然一束光可以被beam splitter(用幺
正矩阵S表示)分成两束,那必然存在某个设备,其变换矩阵为S+(S的厄米共轭),可
以把这两束光再合并为原来那束入射光。
问题在于,在遇到这个beam splitter的时候,对于任意一个beam,如果入射的电场强
度为E,则两个exit port的电场强度均为E/sqrt(2)。在相干叠加的exit port,电场强
度就是2*E/sqrt(2)=sqrt(2)*E,光强正比于2E^2,恰恰是两束入射光能量之和。
擦,n年前年本科的时候觉得仿佛天书的东西,现在竟然也慢慢明白了……
p*****k
发帖数: 318
14

one H is easy, the sum is exactly the taylor expansion of
-(p/q)*log(1-q), where p (or q) is the prob of getting H (or T).
for a fair coin, E[1/T] = log(2) ~ 0.69
case of two H's is a little messy. for a fair coin, i got:
E[1/T] = log(2) + log([sqrt(5)-1]/[sqrt(5)+1])/sqrt(5) ~ 0.26
anyone interested could help checking with monte-carlo
e***g
发帖数: 57
15
来自主题: Quant版 - 请教一个概率题
这个貌似不是锐角三角形的答案。
paperwork的话,应该是:
在区域 x:(0,1);y:(0,x);z:(x-y,sqrt(x^2+y^2))里对密度函数f=1积分。得到结果再
乘以 3。
刚粗略积分了下,得到(sqrt(2)-ln(sqrt(2)+1))/2=0.266,不知道对不对。
麻烦验证下?
n******r
发帖数: 1247
16
来自主题: Quant版 - 请教一个概率题
P{X,Y,Z构成钝角三角形 or 构不成三角形}
=3*积分x:0-1,y:0-sqrt(1-x^2),z:sqrt(x^2+y^2):1
=3*\int\int_{x^2+y^2<1}(1-sqrt(x^2+y^2))dxdy
=3*pi/2\int_0^1(1-r)rdr (极坐标代换x=rcos\theta, y=rsin\theta)
=3*pi/12
=pi/4
P{X,Y,Z构成锐角三角形}=1-pi/4
c*******d
发帖数: 255
17
来自主题: Quant版 - a probability question
assume 2*N flips, and we'll let N->infty
the probability of having N heads and N tails is
Pr = C(2N, N)*p^N*(1-p)^N
= (2N)!/(N!)^2 *[p(1-p)]^N
using sterling formula, we have
Pr = [sqrt(2 pi 2N)*(2N/e)^(2N)*(1+O(1/N))] /
[sqrt(2 pi N) * (N/e)^N*(1+O(1/N))]^2 * [p(1-p)]^N
~= 1/sqrt(pi N) * [4p(1-p)]^N
since 4p(1-p) <= 1, we have [4p(1-p)]^N <=1
thus Pr -> 0 as N-> infty
s*********k
发帖数: 1989
18
来自主题: Quant版 - 请教一个面试题brainteaser
<= 1+sqrt(2)
> sqrt(3)
My guest 2* sqrt(1.25)
p*****k
发帖数: 318
19
来自主题: Quant版 - an interview question
assume X and Y are independent.
denote Y = mu+sigma*Z, where Z~N(0,1).
by definition of CDF:
F(Y) = P(X<=Y) = E[I_{X-sigma*Z<=mu}],
where I is the indicator function.
thus E[F(Y)] = E[I_{U<=mu/sqrt(1+sigma^2)}] = F(mu/sqrt{1+sigma^2}),
where U = (X-sigma*Z)/sqrt(1+sigma^2) ~ N(0,1)
[discussed here before, but cannot find the original post...]
c******r
发帖数: 300
20
En, I was treating the covariance to be 1/2 instead of 1/sqrt(2), but the
idea applies similarly, let
X = 1/\sqrt{2}(U-V)
Y = U
P(X>0|Y<0)=P(U>V,U<0)/P(U<0)= (1/8)/(1/2)=1/4
I think in general for rho > 0, the result will be
\frac{1}{pi}arctan(rho/\sqrt(1-rho^2))
w**********y
发帖数: 1691
21
多谢分享.大概做了做..欢迎补充和指正.
- sqrt(i)=?
e^{\pi/4 i} or - e^{\pi/4 i}
- You and me roll a dice,first one gets a six wins. You roll first. what
is the probability of you winning?
P(I win) = P(Y !win and I win) = 6/11
- A stair of n steps. Each time you step up 1 or 2 steps. How many
different ways are there to reach the top? what is the asymptotic limit?
Fibonacci sequence ..limF(n)/F(n-1)==x for n>2, solve x, and F(n) ~ x^{n-1}
- Moment generating function of standard model.
statistic book…
- Write a si... 阅读全帖
t*******y
发帖数: 637
22
第二题应该是6/11吧
能讲讲这个吗? - X1 and X2 are independent random variable with pdf f and g.
what is what is the pdf of X=X1+X2
Jacobian matrix for X1+X2 and X1-X2..

多谢分享.大概做了做..欢迎补充和指正.
- sqrt(i)=?
e^{\pi/4 i} or - e^{\pi/4 i}
- You and me roll a dice,first one gets a six wins. You roll first. what
is the probability of you winning?
P(I win) = P(Y !win and I win) = 5/6*1/6
- A stair of n steps. Each time you step up 1 or 2 steps. How many
different ways are there to reach the top? what is the asymptotic... 阅读全帖
t***l
发帖数: 3644
23
B_t is a martingale?? See below.
Since a>1, we can find s such that t/a < s < t. Therefore,
E[B_t | F_s] = E[sqrt(a) * W_{t/a} | F_s] = sqrt(a) * E[W_{t/a} | F_s]
note t/a < s, so the most right conditional expectation is just sqrt(a) * W_
{t/a} = B_t.
That is, E[B_t | F_s] = B_t, which is not B_s. So B_t is not a martingale
v****0
发帖数: 1887
24
来自主题: Quant版 - 一道面试题的疑问
题目是http://www.quantnet.com/forum/threads/quantitative-interview-questions-and-answers.437/ 上的第一道
给出的答案是 sqrt(2)
问题是 定义 函数 f(x) = x^(x^x(^x...))))
如果这个函数在实数(或者复数域)上有定义 我们可以按那个解法解
因为 f(x)=x^f(x) 如果 f(x)=2 那么 x^f(x) = x^2 =2
那么 x = sqrt(2).
问题是解法本身没有保证这个函数有定义
f(x)如果是有限的,一定是单调函数 (如果 0 那我们解一下 f(y)=9, 按上述解法 y=9^(1/9)
y f(x)本身更本无法在实数集上定义。一个没有定义的函数哪里来解呢?
g***s
发帖数: 3811
25
来自主题: Quant版 - 一道面试题的疑问
agree what you said.
but sqrt(2) is correct for this question.
里面给的解答只给出了 假设存在的前提。得到sqrt(2)后,需要进一步确认sqrt(2)可
以令f(x)
收敛到2上。

questions-and-answers.437/ 上的第一道
l*******1
发帖数: 113
26
来自主题: Quant版 - today's interview
write |w| as sqrt(w^2)
so w^2 = (sqrt(w^2))^2
so d(w^2)/dw = 2(sqrt(w^2))=2|w|
d|w|/dw= 2w/|w|
use ito on (|w|)^2
we can get
int_0^T |W_t|dW_t = 0.5* W^2 - 0.5 * int_0^T (W_t / |W_t|) dt
note in the case of
int_0^T W_t dW_t = 0.5* W^2 - 0.5 * t (expectation 0)
since W_t / |W_t| <= W_t / W_t = 1
E(int_0^T |W_t|dW_t ) > 0
so this is not a martingale
l***m
发帖数: 920
27
来自主题: Quant版 - 面试经历--MS 篇
well.. in polar system you will see a dog always keeps 45 degrees between
its movement direction and the direction to the origin. So sqrt(2)/2 times
its speed is contributed towards the origin (radial speed) and another sqrt(2)/2 just keeps it circling around (orthoradial speed). If its speed is constantly 1 and a dog stands initially
at (1,1) for example so that it is sqrt(2) away from (0,0) . than after 2
seconds it arrived at the origin.
i**w
发帖数: 71
28
Rigorous proof can be found in Shreve II. But it helps to understand the
discrete version: random walk.
Consider for now a barrier a=1 for a symmetric random walk. Within 2m steps,
around O(1/sqrt(m))of all paths never hit the barrier or X_i < 1 for all i<
=2m.
Given this claim, P( Ta <= 2m ) ~ 1 - O(1/sqrt(m)) approaches 1 as 2m goes
to infinity. In the mean time, E(Ta) > 2m*O(1/sqrt(m)) approaches infinity
as 2m goes to infinity.
Now proof:
1. Given 2m steps, there are a total of 2^(2m) paths,... 阅读全帖
l******i
发帖数: 1404
29
来自主题: Quant版 - 【Probability Problem】面试题
Transformation Method and Accept-Reject Method
are two basic ways to generate random variables.
To summarize:
1. To generate iid uniform firstly:
Most programming languages have the ability to generate pseudo-random
numbers which are effectively distributed according to the standard
uniform distribution.
For instance, In C++, use srand().
2.
Given \rho to generate two N(0,1) with correlation \rho:
From 1, we can easily generate two iid U(0,1)
random variables P and Q;
Use Box-Muller transformati... 阅读全帖
k*****y
发帖数: 744
30
来自主题: Quant版 - 【Brain Teaser】关于计算器
考虑f(x) = sec( arctan( x ) )
f( sqrt{n} ) = sqrt{n+1}。
于是可以生成所有sqrt{n},再平方可以得到所有n。
M*******i
发帖数: 82
31
来自主题: Quant版 - 请教一题brain teaser
以起点为圆心画一个半径为1的圆
1. 沿半径走2/sqrt(3)
2. 沿切线回到圆上,1/sqrt(3)
3. 沿着圆走 7/6 * pi
4. 保持方向走1
加起来 sqrt(3) + 7/6*pi + 1 ~ 6.3972
M*******i
发帖数: 82
32
来自主题: Quant版 - 请教一题brain teaser
以起点为圆心画一个半径为1的圆
1. 沿半径走2/sqrt(3)
2. 沿切线回到圆上,1/sqrt(3)
3. 沿着圆走 7/6 * pi
4. 保持方向走1
加起来 sqrt(3) + 7/6*pi + 1 ~ 6.3972
g****n
发帖数: 6
33
来自主题: Quant版 - 问道题目
why? what is the solution to the question?
hard to understand why it is the case p = K-S_t.
it is a good way to explain. But it is not true.
Because prob( senario 2 ) is not equal to prob(senario 3).
prob(senario 3) = N( d_1)
d_1 = [ log( S_t/ S_t) + (r+ 1/2*vol^2) T ] / [ vol * sqrt( T) ]
= [ 0 + 0 + 1/2*vol^2 T ] / [ vol * sqrt( T) ]
= 1/2 vol * sqrt( T) >0
prob(senario 3) = N( d_1) > 1/2
but prob(senario 2) = 1 - N( d_1) < 1/2
发信人: nevergum (em), 信区: Quant
标 题: Re: 问道题目
发信站: BBS 未名... 阅读全帖
g****n
发帖数: 6
34
来自主题: Quant版 - 问道题目
why? what is the solution to the question?
hard to understand why it is the case p = K-S_t.
it is a good way to explain. But it is not true.
Because prob( senario 2 ) is not equal to prob(senario 3).
prob(senario 3) = N( d_1)
d_1 = [ log( S_t/ S_t) + (r+ 1/2*vol^2) T ] / [ vol * sqrt( T) ]
= [ 0 + 0 + 1/2*vol^2 T ] / [ vol * sqrt( T) ]
= 1/2 vol * sqrt( T) >0
prob(senario 3) = N( d_1) > 1/2
but prob(senario 2) = 1 - N( d_1) < 1/2
发信人: nevergum (em), 信区: Quant
标 题: Re: 问道题目
发信站: BBS 未名... 阅读全帖
c****c
发帖数: 29
35
来自主题: Quant版 - 请问CIR model
我现在又晕了,比如CIR model,如果求rate的volatility,那么不需要考虑drift的部
分,也就是说只需要考虑sigma*sqrt(deltat)*sqrt(rt)*et. et是std为1的正态分布,
不用管。那么就是说只要用historical data求得r(t+1)/sqrt(rt)的std就可以了?

vol
w**********y
发帖数: 1691
36
Without losing generalization, assuming std of x1, x2, y are all 1.
Then you can think in this way,
y = b1*x1 + b2*x2 + sqrt(1 - b1^2 - b2^2)*x3,
where x1, x2, x3 are all i.i.d
cov(y,yhat) = b1^2 + b2^2
var(y) = 1
var(yhat) = b1^2 + b2^2
Thus, cor(y,yat) = cov(y,yhat)/sqrt(var(yhat)) = sqrt(b1^2+b2^2)
c****u
发帖数: 584
37
来自主题: Science版 - Re: 计算分子运动的速度

=sqrt(8kt/PI*m); sqrt=sqrt(3kt/Pi*m)
It depend on the process, I guess if it is adiabatic process
U can calculate the change of temperature and then useing fomula above to
get the speed.
E*****y
发帖数: 33
38
来自主题: Science版 - Re: 一个问题

就老老实实做就可以了,然后用用gamma函数的定义
如:
v(n)=2^n \int_0^1 dx_1 \int_0^\sqrt{1-x_1^2} dx_2...
\int_0^\sqrt{1-x_1^2-...-x_{n-1}^2} dx_n
从后往前一步步做==>
v(n)=2^n \int_0^1 (1-x^2)^{(n-1)/2} dx \int_0^1 (1-x^2)^{(n-2)/2}...
\int_0^{1/2} (1-x^2)^{1/2}
\int_0^1 (1-x^2)^{(n-1)/2}=\sqrt{\pi} \Gamma((1+n)/2)/(n \Gamma(n/2))
.....
v(n)=...
d*z
发帖数: 150
39
来自主题: Science版 - Re: HELP! a algorithm problem!

the len of r and s are no more than 2n
so
First we can get x+y=r-s+1 in O(n)
The time to get u=(x+y)(x+y)-4r is O(nlog(n)).
and the time to find x-y=sqrt(u) should be O(
n*log(n)log(n)log(log(n)) ).
so I think the time is O( n*log(n)*log(n)*log(log(n)) ).
Of course it is less than O(n*n). That's in polynomial time.
But in the fact, the comment algorithm to multiply and divid
is both O(n*n).
As to the sqrt(), we can use
x(n)=(x(n-1)*x(n-1)+a)/(2*x(n-1))
to found the sqrt(a), we only need to iter
d*********a
发帖数: 255
40
来自主题: Statistics版 - 问道ANOVA的题目
yes . there is a formula:
\sqrt{MSE*(1/ni+1/nj)}=\sqrt{18*(1/9+1/9)}=\sqrt{4}=2
d******1
发帖数: 92
41
来自主题: Statistics版 - R code 问题
if I have generate a normal sample A with mean 0, variance 100, and size 100
, which is:
b<-rnorm(100,0,10)
if I want to calculate: sum(A1 to A100 )/sqrt(var(A1 to A100 )) as B1
and then calculate : sum(A2 to A101 )/sqrt(var(A2 to A101 )) as B2
and then calculate : sum(A3 to A102 )/sqrt(var(A3 to A103 )) as B3
as so on until do 100 times to get B100, and create B as vector of length
100
how to write R code , please help, wait to save my life
m**c
发帖数: 88
42
来自主题: Statistics版 - 问个三参数的学生分布的问题?
这个概率是不是这样的呢?
比如 X 是标准的 T 分布 , X~ T(0,1,k), k是自由度。
这个标准T分布的pdf和CDF分别是: f(X)和F(X),这是已知的。
还有一个关于T分布的结论是这样的, 如果有 Y~T(m,V,k), 那么
Z=(Y-m)/sqrt(V)是一个标准的T分布,即Z~T(0,1,k)。
那么我是不是可以这样求Y的pdf和cdf:
Y的pdf:g(Y)=f(Z)=f((Y-m)/sqrt(V))=....
Y的cdf:G(Y)=F(Z)=F((Y-m)/sqrt(V))=....
这样对吗?求出那个表达式是pdf和cdf吧?
A*******s
发帖数: 3942
43
来自主题: Statistics版 - Master毕业三年拿75000是不是很弱?
not normal at all...
sqrt(7.5/5)=1.224
22.4% annual salary increase? too amazing...
even if sqrt(7.5/6)=1.118, very impressive...
if sqrt(7.5/6.5)=1.074, still above average
T*******I
发帖数: 5138
44
来自主题: Statistics版 - 两分法随机模拟试验SAS Code (Part I)
我准备接受goldmember的挑战公布Code。
SAS Code (Part I): Simulation for a Dichotomic Regression wirh Julious's Sample
我要公布的code仅仅是一个关于dichotomic regression simulation的SAS code。是我在4年多前写的。仅仅作了一点小小的更改。我的code写得很笨拙,但it runs good。请大家保存好你的500个随机样本。以备后用。
我将分段公布,这里是第一部分,data generation and random check.
这个例子是想要告诉大家,如果你的分析逻辑正确,根本不需要simulation。
正如我对goldmember说过,在接受这个挑战前,让我问大家几个问题:
如果总体中存在一个临界点,你认为样本临界模型一定在临界点处连续吗?如果你的回答是肯定的,你的哲学的或/和数学和/或统计学的逻辑基础是什么?然后再问问你自己,总体给了你连续性的保证吗?你可以在样本基础上假设总体的连续性吗?为什么?
大家回答了我的这几个问题后我再公布后面的正式算法... 阅读全帖
w*****1
发帖数: 473
45
来自主题: Statistics版 - a question about SAS
我需要用MACRO 语言,用DO LOOP 改变一个模版的5个固定参数创建一些新的DATA,检
测这些新的DATA最大似然值.下面是我的CODE, 但是不能运行,大家能否帮我看看?包子
酬谢!
data parents; set csgl.individs;
keep i QTP pedid dgeno;
if i <=2;
run;
/* Do loops for grid search */
/*Y=g+R(mixed model), where g=Major Gene(latent fixed effect)with 3
values: mudaa, mudab, mudbb and R = Residual(variance component)*/
/*the max, min, and std will be used as grid search ranges */
%macro loops;
proc means data=parents;
var QTP;
output out=range min=min max=max std=std mean=mean;
... 阅读全帖
w*****1
发帖数: 473
46
来自主题: Statistics版 - a question about SAS
Thank you very much for your help!
我改了CODE如下: 现在已运行了1小时还没有停止,大家能否帮我看看? 谢谢!
data parents; set csgl.individs;
keep i QTP pedid dgeno;
if i <=2;
run;
option symbolgen mprint mlogic;
%macro new(mudaa=, mudab=, mudbb=, de=, dq=, indata=, outdata=);
data &outdata; set &indata;
lnl=log(((1-&dq)**2)*(1/sqrt(2*constant('PI'))*&de)*exp(-0.5*(((QTP-&mudaa)/
&de)**2))+
2*&dq*(1-&dq)*(1/sqrt(2*constant('PI'))*&de)*exp(-0.5*(((QTP-&mudaa)/
&de)**2))+
(&dq**2)*(1/sqrt(2*constant('PI'))*&de)*... 阅读全帖
b******s
发帖数: 345
47
运行出现的warning是"starting a module while inside s do group" "finish a
module while inside a do group", 该怎样改正这段出现问题的程序呢,谢谢!下面
是出现问题的部分程序。
do i = 1 to n;
if npf > 3 then do;
WFI = XF[i,3:npf-1];
end;
else WFI = 0;
if npu > 2 then do;
WUI = Z[i,3:npu];
end;
else WUI = 0;
lbyw = byw * WFI`;
lbuw = buw * WUI`;
mux1 = bu0 + bux + lbuw;
mux0 = bu0 + lbuw;
start fun1(u) global(by0, byx, lbyw, byu, mux1);
v = (1/(1+exp(-(by0 + byx + lbyw + byu*u ))))/sqrt(2*constant('pi'))
* exp((-1/2)*(... 阅读全帖
w*******9
发帖数: 1433
48
不好意思你误会了,我绝对不会认为你不知道无偏和方差的意思。想想一下有些式样很
难读,所以individual level variance -- vi---会大些,这时候你可以允许hi-mi比
较大;有些式样比较容易读,所以individual level variance会比较小,就不太能允
许hi-mi比较大。所以就应该对(hi-mi)/sqrt(vi) 用t-test。不同的vi序列会导致不
同的结论,而你只知道500个vi中的一个,所以你要假设这500个vi之间有某种联系(比
如相等) 也就是TankerW说的。
BTW,即使vi不全相等,你不除sqrt(vi)的话,你得到的t-test也是个valid level
alpha test (basically because you can treat these obs as iid in a larger
probability space), but the power is inferior to the test that adjusts the
obs by sqrt(vi)。

for
this
of
c********h
发帖数: 330
49
来自主题: Statistics版 - a question on sample size
Yes.
You first want the margin error. It's 0.01 for your case?
You also want a confidence level, say 0.95
You also want to know what statistic is interested in. I'm not quite sure
what you want to use, so let's just suppose it's some sample mean. The most
commonly used statistics in this situation is either a proportion or a
sample mean.
Then margin error = t(alpha) * s/sqrt(n),
where t(alpha) is the upper quantile of t-dist. s is the standard deviation
for your data, either know or use bootstra... 阅读全帖
c*****1
发帖数: 115
50
来自主题: Statistics版 - a question on sample size
http://en.wikipedia.org/wiki/Margin_of_error
Margin of error at 99% confidence = 1.29/\sqrt{n}\,
Margin of error at 95% confidence = 0.98/\sqrt{n}\,
Margin of error at 90% confidence = 0.82/\sqrt{n}\,
首页 上页 1 2 3 4 5 6 7 8 9 10 下页 末页 (共10页)