Z*****Z 发帖数: 723 | 1 嗯,看看这样想行不行:
先扫一遍T,把所有字符出现的次数存到一个hashtable(记做ht)里。
然后再弄另外一个hashtable(ht2)用于计数。
接下来用两个指针head和tail同时扫描S,先寻找初始解,再寻找最优解。
(1)在寻找初始解阶段,不停地advance head,每遇到一个S中的T字符就把ht2的相应
count++,直到ht2中每个key的count都比ht中相应key大(至少不小)。
然后不停地advance tail,每遇到一个S中的T字符就把ht2的相应count--,直到ht2中某
一个key的值恰好等于ht中相应key的值。
这就是初始解,记录之。
(2)寻找最优解。这时tail指向的就是T中最靠前的字符,advance head寻找它,同时
更新ht2,逻辑同(1)。找到之后再更新tail,逻辑也同(1)
不知道说清楚了没有。。。 |
|
l****p 发帖数: 397 | 2 我觉得这题主要是考怎么构建树,至于树建起来了,怎么展现比较漂亮那是另一回事了
。这年头很少人会考用ASCII字符在控制台上打图形吧。顺便贴上我的实现:
class TreeNode
attr_accessor :value
attr_accessor :left
attr_accessor :right
def initialize value
@value = value
end
end
def get_trees preorder, head=0, tail=preorder.size
return [nil] if tail <= head
trees = []
for right_root in (head+1..tail)
left_trees = get_trees preorder, head+1, right_root
right_trees = get_trees preorder, right_root, tail
left_trees.each do |lt|
right_tree... 阅读全帖 |
|
t********y 发帖数: 14 | 3 adding a null to the end of each level can be helpful. following is printing
out each level. making link list is just same, creating a new list each
time a null is Dequeued. Tail null is taken care automatically.
public void PrintOutLevel(TreeNode node)
{
// null,check.....
Queue q = new Queue();
q.Enqueue(node);
q.Enqueue(null); // This is the tail of the first levle.
while (!(q.Count == 0))
... 阅读全帖 |
|
j******n 发帖数: 287 | 4 since the coin is fair, P(P2抛到是头的次数大于或等于P1抛到是头的次数) = P(P2
抛到是tail的次数大于或等于P1抛到是tail的次数) and P(P2抛到是头的次数大于或等
于P1抛到是头的次数) + P(P2抛到是头的次数
是tail的次数大于或等于P1抛到是tail的次数) = P(P2抛到是头的次数
次数)
so P(P2抛到是头的次数大于或等于P1抛到是头的次数) = 0.5
率.
X |
|
b*********h 发帖数: 103 | 5 看大家都用优先队列,贴一个 set 的吧 呵呵,用 C++ 的表示声明 priority queue
打字太多。。。继续说 C++ 的 priority queue 又不支持 decrease key,喜欢用 set
当 priority queue 。。。
class Solution {
public:
ListNode *mergeKLists(vector &lists) {
multiset S;
for (int i = 0; i < lists.size(); ++i) {
if (lists[i]) {
S.insert(lists[i]);
}
}
ListNode* head = 0;
ListNode* tail = 0;
while (!S.empty()) {
ListNode* nod... 阅读全帖 |
|
L*********r 发帖数: 9 | 6 public class CircularQueue {
private int size = 0;
private int count = 0;
private int head = 0;
private int tail = 0;
private int[] arr;
public CircularQueue(int size) {
this.size = size;
arr = new int[size];
}
public void enqueue(int n) {
arr[tail] = n;
tail = (tail + 1) % size;
if ( count == size )
head = ( head + 1 ) % size;
else
count++;
}
public i... 阅读全帖 |
|
x*****0 发帖数: 452 | 7 Given a linked list where in addition to the next pointer, each node has a
child pointer, which may or may not point to a separate list. These child
lists may have one or more children of their own, and so on, to produce a
multilevel data structure, as shown in below figure.You are given the head
of the first level of the list. Flatten the list so that all the nodes
appear in a single-level linked list. You need to flatten the list in way
that all nodes at first level should come first, then nod... 阅读全帖 |
|
b********6 发帖数: 97 | 8 神奇的是
Old OJ 大集合通过
new OJ Runtime Error Last executed input: [0,2,3]
百思不得其解, code 如下。
public class Elem {
int index;
int step;
}
public boolean canJump(int[] A) {
// Start typing your Java solution below
// DO NOT write main() function
int len = A.length;
if (len == 0) return false;
if (len == 1) return true;
if (len == 2) return A[0] != 0;
Stack s = new Stack();
... 阅读全帖 |
|
m**********4 发帖数: 774 | 9 多谢LZ分享。试着写了一会儿,花了挺长时间才想清楚。估计要是被面肯定挂了,时间
太长要是三姐再干扰干扰根本没可能想清楚。
JAVA:
Iterative version, 应该和reverse linkedlist差不多,但要多记录几个NODE的值
public TreeNode convert(TreeNode tn){
if (tn == null)
return tn;
TreeNode curr = tn;
TreeNode prevLeft = null;
TreeNode prevRight = null;
while (curr != null){
TreeNode currLeft = curr.left;
TreeNode currRight = curr.right;
curr.left = prevRight;
... 阅读全帖 |
|
w********s 发帖数: 214 | 10 implement linux command tail.
We will focus only on "-n" and "-f" options.
tail FILE 是显示打印文件最后10行。tail -n 5表示打印文件最后五行。
The -f option causes tail to not stop when end of file is
reached, but rather to wait for additional data to be appended
to
the input.
有两个concern,
文件可能很大,所以不能全部读入,问怎么解决。
文件可能大得超过了内存,问怎么读。
(2) Two cases for value of N (A) N is small to fit in memory (B) N is large
to fit in memory
Please email your code and clear instructions to execute your program. |
|
l*****a 发帖数: 14598 | 11
扔2次或多次
ignore head,head/tail,tail
then head,tail/tail,head各返回50% |
|
u***n 发帖数: 117 | 12 不是很明白这里第一题和第二题。
第一轮: offset 和 len 代表的含义是? (binary tree是以array形式存储?这能解
释offset,但len呢?array的总长度?似乎不太make sense)
第二轮: 这里的考点是在call这两个方法时需要对队列加锁来达到正确性吗?
我基本思路是需要设置一个boolean变量 a 来确认是否已经trigger了。
trigger(){
aquire(mutex_a);
a = true;
dispatch all tasks in the queue;
head = null;
tail = null;
release(mutex_a);
}
addtask(){
aquire(mutex_a);
if(a)
dispatch the task;
else{
if(head == null){
head = task;
tail = task;
} else{
tail.next = task;
tail = task;
}
}
release(mute... 阅读全帖 |
|
u***n 发帖数: 117 | 13 不是很明白这里第一题和第二题。
第一轮: offset 和 len 代表的含义是? (binary tree是以array形式存储?这能解
释offset,但len呢?array的总长度?似乎不太make sense)
第二轮: 这里的考点是在call这两个方法时需要对队列加锁来达到正确性吗?
我基本思路是需要设置一个boolean变量 a 来确认是否已经trigger了。
trigger(){
aquire(mutex_a);
a = true;
dispatch all tasks in the queue;
head = null;
tail = null;
release(mutex_a);
}
addtask(){
aquire(mutex_a);
if(a)
dispatch the task;
else{
if(head == null){
head = task;
tail = task;
} else{
tail.next = task;
tail = task;
}
}
release(mute... 阅读全帖 |
|
j********2 发帖数: 82 | 14 我也不知道restore怎么写,贴一下我的flattern. 没用recursion, 用了一个stack:
void flatternAugListWithStack(AugListNode *&node)
{
if (!node) return;
stack st;
AugListNode *p = node; // current node
AugListNode *tail = node; // current tail
while (1)
{
if (!p && st.empty()) break;
// after we go over the children, fetch it from the stack
if (!p) {p = st.top(); st.pop(); tail->next = p; continue;}
if (!p->next) tail = p;
if (!p->child) p = p... 阅读全帖 |
|
n***i 发帖数: 777 | 15 这题有以下几个点
如果 head 是 null,要create 一个node 然后return它作为head。这个node如果prev
和 next 都连到自己,那么 1 item的情况可以被general case 所包括
general case 里面:
先看看要加的key是否大于等于 tail 的key,如果是的话,加入的key应该在tail 和
head 之间。tail 通过 head->prev 得到
如果要加的key比tail小,那么就
curr = head;
while(curr->key < keyToInsert) {
curr = curr -> next;
}
然后while loop停下来,新node要加在 curr 和 curr->prev 之间。
如果curr = head, head还要被update成 新加的new node
最后return head
--------
如果整个过程没有任何问题我觉得这个candidate还是很牛的 |
|
x**********g 发帖数: 44 | 16 markov chain的思想,得到一次tail,start over
假设连续三次head 期望是 T:
1) 掷一枚硬币,if tail,start over: 1+(1-p)T
2) if head,再掷一枚硬币,if tail,start over: p(1+(1-p)T)
3) if head,再掷一枚硬币,if tail,start over: p*p(1+(1-p)T)
4) if head, end
T=1+(1-p)T+p[1+(1-p)T]+p*p[1+(1-p)T]
然后解方程就ok啦,话说应该有公式的,不过我忘了,太久远的知识了 |
|
A*******e 发帖数: 2419 | 17 怎么1的难度是hard,2的难度却是medium?
前面270个例子都过了,最后一个例子总是不行。输入是个很长的数组,只有1,查询值
不详,但预期返回真,我的函数返回假。单机上用1查询,返回是真。难道是溢出了?
已经考虑过二分法查找的问题。
代码:
class Solution {
public:
bool search(const vector& nums, int target) {
min_idx_ = FindMinIdx(nums, 0, nums.size() - 1);
len_ = nums.size();
int head = 0, tail = nums.size() - 1;
while (head <= tail) {
int mid = head + (tail - head) / 2;
if (nums[GetIdx(mid)] == target) {
return true;
... 阅读全帖 |
|
c********t 发帖数: 5706 | 18 多谢,大概思路如下,细节要推敲一下.
rev( head, tail){
one pass find half, half+1, tail-1;
print tail;
rev(half+1, tail-1);
rev(head, half);
} |
|
t******l 发帖数: 10908 | 19 回答这个问题需要超过绝大多数初中娃的 math thinking skill --
formal thinking applied in math modelling。
这不是说娃不能 understand more or less formal thinking,
而是说,这个阶段的娃,无法去 apply 不同的问题,因此无法直接
用来解题。
比如举个例子,一种 formal thinking 的 modeling 是 re-tagging。
Let's have a thought experiment:
We throw the coin, then after it drop, we change the head to
tail, and change the tail to head.
Or, we change head-tail before throw the coin.
Question, are they the same? Or a better word, does head and
tail distinguishable/swappable in term... 阅读全帖 |
|
k********8 发帖数: 7948 | 20 http://www.huffingtonpost.com/david-einhorn/fed-interest-rates_
A Jelly Donut is a yummy mid-afternoon energy boost.
Two Jelly Donuts are an indulgent breakfast.
Three Jelly Donuts may induce a tummy ache.
Six Jelly Donuts -- that's an eating disorder.
Twelve Jelly Donuts is fraternity pledge hazing.
My point is that you can have too much of a good thing and overdoses are
destructive. Chairman Bernanke is presently force-feeding us what seems like
the 36th Jelly Donut of easy money and wondering... 阅读全帖 |
|
f**********e 发帖数: 6 | 21 hi
Here is my cv, it would be appreciated if I can have the chance to review
the article.
Thanks
Hao
Harvard Medical School
Curriculum Vitae
Name: Hao Wang
Office Address: Department of Cancer Immunology and AIDS
Dana-Farber Cancer Institute
Harvard University
3 Blackfan Circle, CLSB 1010
Boston, MA 02215
Home Address: 103 Gordon street,
Boston, MA 02120
Work Phone: (617) 602-6786
W... 阅读全帖 |
|
a*******r 发帖数: 7558 | 22
今天终于找到了:
http://www.youtube.com/watch?v=C4NVg8i8i1Y
De Camptown ladies sing dis song, Doo-dah! doo-dah!
De Camptown race-track five miles long, Oh, doo-dah day!
I come down dah wid my hat caved in, Doo-dah! doo-dah!
I go back home wid a pocket full of tin, Oh, doo-dah day!
Gwine to run all night!
Gwine to run all day!
I'll bet my money on de bob-tail nag,
Somebody bet on de bay.
De long tail filly and de big black hoss, Doo-dah! doo-dah!
Dey fly de track and dey both cut across, Oh, doo-dah-day... 阅读全帖 |
|
s*********t 发帖数: 16647 | 23 p=tail 1-p=head
p next toss is tail, and J wins instantly
+(1-p)*p the next toss is head and the next next toss is tail, and J wins
after 2 rounds
+(1-p)*(1-p)*p the next toss and the next next toss r both head and the 3rd
toss is tail and J wins after 3 rounds
and no fourth round exists that J could win coz M will win first if the 1st/
2nd/3rd toss are all heads
since it is a fair coin, so p=1-p=0.5... |
|
r********n 发帖数: 6979 | 24 一个钓友昨天打电话过来说
他在离我们这一个多小时的一个河边和别人钓鱼
别人用白色的rooster tail几个小时拉上来30多条white bass(一定要是白色的,一定要
是rooster tail,别的颜色和饵的效果都不是太好)
他因为没有rooster tail
只能用些钓SMB和LMB的饵试试
结果只上了3,5条
我从来没钓过white bass
谁给我来科普科普
钓white bass的时候有些什么讲究
什么样的饵比较好(或者为啥白色的rooster tail比较好?) |
|
F**********t 发帖数: 51 | 25 我买的是yamamoto的一款grub,我观察过不加weight的情况下,这个grub自由下沉的时
候tail不会摆动。中等力度拽着在水里走,tail是会摆动的。所以我一直比较困惑,如
果用收收停停的presentation,grub在下沉的时候tail并不会摆动,姿态不够逼真,这
样会吸引SM去bite吗(因为都说鱼一般都喜欢在grub下沉的时候bite)?
是不是如果用了jighead后,grub下沉的深度比较快,tail就会摆动了?这样感觉起来
grub还是要用jighead,或者按WillyBass说的那样用固定的bullet weight.
请高手指正一下,谢谢。 |
|
W********s 发帖数: 1705 | 26 Worm种类多得去了,有Straight Tail,Finesse Worm,Paddle Tail,Curly Tail,
Floating Worm,Senko(其实是Soft Jerkbait),Ring Worm,French Fry,Split
Tail Worm,尺寸从3寸到12寸不等,我最多用7寸,再长这里用没啥信心。上张图看看
是啥样子的。 |
|
W********s 发帖数: 1705 | 27 你试试看,You Will Never Use Weighted Hook On A Fluke。加重Hook对饵伤害大。
Fluke有三种Design。一种是Zoom Super Fluke,Split Tail,一种是Bass Assistant
Rat Tail,还有一种就是Yum Houdini,Paddle Tail,可以把中间的一片扣掉变成Split
Tail。最好用的Strike King 3X ElazTech Z Too 4pk - $3.39。虽然一刀一枚,但是
一枚可以用很久。这饵超软咬不烂,但是不能同其他塑料软饵一起放,会烂的。有个缺
点是用多了之后挂钩的地方Hold不住了,就用一小片Clear小水管套上去固定--Tube小
论有提到。 |
|
r**********n 发帖数: 3914 | 28 昨天(星期二)没打算去钓鱼, 因为今天(星期三)约好与朋友一起去弄些皮皮, 朋
友定好了渔导, 并付了所有费用。 可是休息日, 在家里咸的慌, 决定搞个solo(现
在版上很时兴这个)去DD钓Stripers.
先到Barlows 买点货。 巧不巧朋友Fred 打电话问我去不去钓鱼。 他来Dallas出差,
下午3点后有时间, 想去钓鱼。 Fred 可是高手呀, 能和他一起钓鱼是一件灰常愉快
的事。 跟他说好, 我先走一步, 4点钟在DD见面。
现在天气凉了, top water bites 不会像以前那么猛, 我想现在用plastic 或 buck
tail jig 会有帮助。 星期一晚上下班后, 临时做了三个buck tail jigs (毛鸡哥)
。
这几个毛鸡哥可是立了大功。 Fred 不愧为高人, 第一次到DD钓鱼, 钓到的striper
他自己都记不清楚了。 他也是第一次用我这种buck tail jig, 试了一会会就懂的怎么
用了。 很快他就知道鱼在那里咬钩, 模出道道了。 他看到很多鱼在浅处, 问我能不
能用top water lure, 我说可以, 去车上拿了四个m... 阅读全帖 |
|
t**y 发帖数: 310 | 29 是Kansas的fight song
比扎小人都管用
先弄走Colorado, Nebraska
把aTm加到歌词里一年,也弄走了
还有Mizzou
今年估计还得再改一遍,加上青蛙山人
奇怪的是,前面五十多年居然没提longhorns.
难道是认可texas的老大地位?
By George "Dumpy" Bowles
(Version from 1958 to 2010)
Talk about the Sooners, the Cowboys and the Buffs,
Talk about the Tiger and his tail,
Talk about the Wildcat, and those Cornhuskin' boys,
But I'm the bird to make 'em weep and wail.
'Cause I'm a Jay, Jay, Jay, Jay, Jayhawk
Up at Lawrence on the Kaw
'Cause I'm a Jay, Jay, Jay, Jay, Jayhawk
With a sis-boom, hip ... 阅读全帖 |
|
m**t 发帖数: 1956 | 30 看了10个人的marathon比赛的pace。主要是最近的chicago marathon,原因不用考虑地
形的因素。
处理前,我一般去掉一个最快的,去掉一个最慢的。
一些分析结果
1)不管跑多快,不管split,pace distribution总是这个样子的:
pace在x轴,从左到右,pace是从快到慢
那么bell curve是一点点左倾,右边(慢的)tail是fat tail,左边(快的)tail是
thin tail.
直观描述就是,比avg MP快的pace要多于慢的,但是总是有些较慢的pace,不过较快的
pace很少。
只有一位跑了一个没有skewness的。
(有点像股市的distribution,呵呵)
2) 比2stdev的还快,几乎没有。比2stdev的还慢的,总是有。
3) 大部分自己认为满意的比赛,stdev是2%或者更低,有低到1.5%,具体时间是5-10
秒。如果很不满意的,stdev通常4%以上了。
一点点结论:
稳定的速度看来是最重要的,努力做到速度稳定在MP+/-10秒,或者说速度的变化只有2
%。前半程,或者前20迈有4-5mile跑的太快(不... 阅读全帖 |
|
b*******e 发帖数: 6482 | 31 [北方的] Breckenridge 雪山介绍
山中十日,日出日落,山前山后,受益匪浅。
愈发知道自己的不足,亦更加热爱滑雪这项冬季运动。
一、山
伟大平原的尽头,岩石山脉拔地而起。在三千米高原,穿过世上最高的公路隧道,满眼
一片白雪皑皑的世界,便是十哩山。山中隐着数处村落,其中之一便是曾经的三不管淘
金王国、如今的滑雪胜地,Kingdom Breckenridge。
十哩山中有十峰,以数字为名。Breck得其半:六、七、八、九、十。
峰十全黑,以Mustang, Dark Rider等双黑林道为主,辅以数条不同难度的黑道。
峰八、九全能,从新手区的魔毯到双黑钻的雪碗、高矮Racing Hill、大小Terrain
Park等一经俱全。峰九前山多蓝道,后山有双黑林海,又以Tom's Baby最为有名。百年
前汤姆大叔于此山中偶得金块,包裹入怀谎称得子以避人耳目。金重十三磅,堪称科罗
拉多史上最大。
多舛莫过峰八,上山需乘世界最高的Ski/Chair Lift,再步行数十丈方可登顶。山临绝
顶,群峰环绕,叹为观止。山北另有独特T-Bar上行,可一览雪碗风情。
自峰八山顶北徙,渡双黑谷可达... 阅读全帖 |
|
b*******e 发帖数: 6482 | 32 [北方的] Breckenridge 雪山介绍
山中十日,日出日落,山前山后,受益匪浅。
愈发知道自己的不足,亦更加热爱滑雪这项冬季运动。
一、山
伟大平原的尽头,岩石山脉拔地而起。在三千米高原,穿过世上最高的公路隧道,满眼
一片白雪皑皑的世界,便是十哩山。山中隐着数处村落,其中之一便是曾经的三不管淘
金王国、如今的滑雪胜地,Kingdom Breckenridge。
十哩山中有十峰,以数字为名。Breck得其半:六、七、八、九、十。
峰十全黑,以Mustang, Dark Rider等双黑林道为主,辅以数条不同难度的黑道。
峰八、九全能,从新手区的魔毯到双黑钻的雪碗、高矮Racing Hill、大小Terrain
Park等一经俱全。峰九前山多蓝道,后山有双黑林海,又以Tom's Baby最为有名。百年
前汤姆大叔于此山中偶得金块,包裹入怀谎称得子以避人耳目。金重十三磅,堪称科罗
拉多史上最大。
多舛莫过峰八,上山需乘世界最高的Ski/Chair Lift,再步行数十丈方可登顶。山临绝
顶,群峰环绕,叹为观止。山北另有独特T-Bar上行,可一览雪碗风情。
自峰八山顶北徙,渡双黑谷可达... 阅读全帖 |
|
q*c 发帖数: 17993 | 33 ☆─────────────────────────────────────☆
qmc (qmc) 于 (Thu May 20 01:26:09 2010, 美东) 提到:
http://www.willisskiandboard.com/Wil/pages/Rocker%20Skis%20and%
Every few years an evolutionary shift happens in the world of snow sports.
When snowboarding was first born it changed the industry forever. Shaped
skis had a similar impact and now Rocker Technology has impacted the slopes
by creating a whole new way to relate to the mountain.
To fully understand Rocker Technolgy and how it has effected sk... 阅读全帖 |
|
s***e 发帖数: 122 | 34 来自主题: Programming版 - 问个面试题 。。。希望你不是应聘开发的职位,呵呵
// 从数组构建链表的函数
iNode * buildLinkList(int a[], int n) {
if (a == NULL || n <= 0) return NULL;
iNode* head = new iNode(a[0]);
iNode* tail = head;
for (int i = 1; i < n; ++i) {
tail->next = new iNode(a[i]);
tail = tail->next;
}
return head;
}
// 释放链表内存的函数
void destroyLinkList(iNode* head) {
while (head != NULL) {
iNode* tmp = head->next;
delete head;
head = tmp;
}
}
// 打印链表
void printLinkList(iNode* head) {
if |
|
d****n 发帖数: 130 | 35 在文件里放着一个2D数组数据,想读到一个2D的vector里:
ifstream in("data.dat");
istream_iterator head(in);
istream_iterator tail(head);
vector > data;
for (int i = 0; i < x_size; ++i) {
head = tail;
advance(tail, y_size);
data.push_back(vector());
copy(head, tail, back_inserter(data.back()));
}
不work啊。 |
|
T********i 发帖数: 2416 | 36 今年五月份的访谈。半年多以前了。
截取一段关于ACM (Auto Commit Memory)的描述。也就是9 million IOPS的benchmark。
用脚指头去想。都知道这种东西的性能上限就是PCI bus。他们不做,自然有别人去做
。网卡都能做出来。更何况SSD了。
另外,我已经证明了,即使不用sync IO,单机串联跨DC,除非所有DC一起死掉,否则
consistency and durability都有保证。
最后再强调一遍。搞技术的,丧失了最基本的客观性。到哪里都是被雷的命。早晚而已。
http://www.dcig.com/2012/05/boosting-transactional-performance.
On the other hand, when you write something to Auto Commit Memory, by design
it will be automatically committed. In other words, it is durable across
service interruptions such as... 阅读全帖 |
|
|
|
j******4 发帖数: 6090 | 39 比如我在A文件夹下面有文件 *.batch.new, *.batch.old *.batch.annot,在B文件夹
下面有
相同名字的文件。
现在我想把A文件夹下面所有文件的最后两行(tail -2)添加到B文件夹的对应文件里面
,应该如何实
现?我想应该用循环,但是我不知道具体的语法。。。
比我我的路径现在在B文件夹:
for name in \ls /A/*.batch.new; do
tail -2 $name.annot >> (name)."annot"
tail -2 $name.old >> (name)."old"
tail -2 $name.new >> (name)."new"
done
这个语句肯定不对,但是大概应该是这样,vi编辑器,用的bash,不知道我说清楚了没
有,希望大牛指
点一二,谢谢 |
|
R*****w 发帖数: 447 | 40 你说的用RNA ligase我后来也见过。但直接在RT的时候加一个tail比那种合成cDNA后再加tail更方便、更有效。毕竟合成cDNA后,再加tail不是100%cDNA都会有tail。
我这个方法是我当时自己想到的,但我一直没发表,后来博士毕业了不做测序工作了,也没想过去发表。好多年了不知是否其他有人发表类似的方法,估计也会有其他人想到。 |
|
s******s 发帖数: 13035 | 41 补充一下为什么选了one-tail就不能换了。其实,前面bigsail已经说了,
hypothesis test model是理论作出的,不是根据实验数据作出的。如果你
根据理论选了单尾model,就算实验数据不符合,也不能justify你换model。
这也就是我前面有一片文章里面说的统计哲学问题,同样也是我前面说过
不喜欢经典统计,而喜欢bayesian的原因。bayesian的好处就是简单明了,
而且把这些先前的经验(包括根据数据得出的结果)都整合在model里面,
没有很多对新手来说事实而非容易混淆的东西。
英国著名政治家,维多利亚时期的首相本杰明·迪斯雷利说过“ “There
are three types of liars: liars, damned liars and statisticians.”
我听过的第一门统计课,开场白就是“统计学家要自律”。拿到data以后,
其实不根据这些“统计哲学”来处理,其实想拿到什么结论就能得出什么
结论。对生物学家来说,如果one-tail不对,保证99.9%的人马上变成two-
tail或者换成反方向one-tail,这个... 阅读全帖 |
|
D*a 发帖数: 6830 | 42 我刚做过。。。不是故意的阿-_-!!!
GTT 和ITT基本程序差不多,不知道lz用哪种glucometre; 我用的只需要一滴血,剪尾
巴尖就够了。
我刚写的protocol.
Put one mouse per cage, aline all 15 cages. (like: I I I I I I…I).Then put
each seringe and post-it near each cage. prepare also several scissors and
pens. Inject ??U/kg insulin solution in fed mice, cut the tail to measure
glucose at T0, T15, T30 and T60.
- T0: First i.p. inject insulin, then start the timer from 0' right after,
then cut 1 mm the tail immediately and immediately measure the glucose. (
wi... 阅读全帖 |
|
D*a 发帖数: 6830 | 43 Quick Tail Prep
Collect mice figure/tail in 0.5 ml Eppendorf tube. (4 mm is enough)
Add 100 microliter of quick tail digestion buffer (below).
Incubate at 55 C for 2 hours to overnight.
Vortex and incubate at 95 C for 10 minutes.
Centrifuge for 5 minutes to get rid of the small pieces of undigested sample.
(NOTE: I do neither vortex nor centifuge, and my pcr works
but if you vortex, you have to centifuge)
Use 1-2 microliter aliquot of supernatant for a 25-50 microliter PCR
reaction (or whatever ... 阅读全帖 |
|
D*a 发帖数: 6830 | 44 我理解他说得是如果一只老鼠和一只KO搞的测量,就是n = 1, 如果增大n,要增大老鼠
数量。因此如果一次测量10只老鼠的血液某指标,那么n = 10
We could choose one mutant mouse and one wild type, and perform 20 replicate
measurements of each of their tails. We could calculate the means, SDs, and
SEs of the replicate mea- surements, but these would not permit us to
answer the central question of whether gene deletion affects tail length,
because n would equal 1 for each genotype, no matter how often each tail was
measured. To address the question successfully we ... 阅读全帖 |
|
X*******0 发帖数: 134 | 45 还有,请教补塞tail的办法.我的基因是高GC的,本身就不好P,在引物上加tail造成长引
物更是扩增困难,tail越长越困难.如果能在质粒构建好能后补塞tail最好.有办法吗? |
|
D*a 发帖数: 6830 | 46 Quick Tail Prep
Collect 1 mg skin biopsy (= normal size tail or figure tip) in 0.5 ml
Eppendorf tube.
Add 100 microliter of quick tail digestion buffer (below).
Incubate @ 56 C several hours to overnight.
Vortex and incubate @ 99 C, 10 minutes.
Centrifuge @ max speed, 5 minutes.
(NB i don't vortex so i don't need to centifuge the tube, it works)
Use 1-2 microliter aliquot of supernatant for a 25-50 microliter PCR
reaction (or whatever you routinely do).
Transfer supernatant to a fresh tube for s... 阅读全帖 |
|
D*a 发帖数: 6830 | 47 Quick Tail Prep
Collect 1 mg skin biopsy (= normal size tail or figure tip) in 0.5 ml
Eppendorf tube.
Add 100 microliter of quick tail digestion buffer (below).
Incubate @ 56 C several hours to overnight.
Vortex and incubate @ 99 C, 10 minutes.
Centrifuge @ max speed, 5 minutes.
(NB i don't vortex so i don't need to centifuge the tube, it works)
Use 1-2 microliter aliquot of supernatant for a 25-50 microliter PCR
reaction (or whatever you routinely do).
Transfer supernatant to a fresh tube for s... 阅读全帖 |
|
A***o 发帖数: 351 | 48 Cool, Your guys are too smart!
Another question, supposed you have a coin, you want to toss up. Whenever
you get a Head, you stop.
If you get a Tail, your get 2 dollar, if you get the second Tail, you get 4
dollars; if you get a third Tail, you get 2^3 dollars.
What is the dollar value of this event?
My thoughts:
start from the first round, you get probability of Tail: so, the value is 1/
2 *2
the second round you get 1/4 ; so the value is 1/4*4
.....
The for the n round, we get 1+..+1 =n.
So, t |
|
h*****r 发帖数: 1052 | 49 thanks, but what I mean is the tail distribution, it seems there are many
definitions about tail distritubion outside.like right tail distribution,
heavy-detail distribution, or long-tailed distribution
http://en.wikipedia.org/wiki/Heavy-tailed_distribution
I am wondering which one is easier for binomial RVs to have a close form. |
|
m*n 发帖数: 695 | 50 我有100个样本,对照组和试验组各50 时,我用Mann-whitney U test one- tailed
和T test one-tailed都有统计学意义,试验组比对照组数值低, 但当我增加到124
个样本, 对照组和试验组各62 个时,用Mann-whitney U test one- tailed P>0,05,
T test one-tailed 时P<0,05 。 增加的24个样本,对照组和试验组各12 时, 只
统计这些样本,U test 和T test也有统计学意义。 为何合在一起再统计只有T test
有统计学意义? 我的数据F 检验P=0.896, 方差齐 (无论124 还是100), 所以可以用
T test? 但有些说, 样本大于50时用U test,小样本才用T test。 我到底应该用哪
种检验?
请高手指点!!!谢谢!!! |
|