[過去ログ] 臨床統計もおもしろいですよ、その1 [無断転載禁止]©2ch.net (747レス)
1-

このスレッドは過去ログ倉庫に格納されています。
次スレ検索 歴削→次スレ 栞削→次スレ 過去ログメニュー
698: 2018/09/15(土)22:29 ID:LVUNnMZD(3/3) AAS
>>490
一般化してみた。

歩行時間:t
歩行距離:l
迎えの車速:rv
同乗の車速:v
出発時刻差:s
到着時刻差:X

通常走行時間:d/rv+d/v
早退時走行時間:(d-l)/rv+(d-l)/v
省7
699: 2018/09/16(日)18:25 ID:MIF83oNx(1/3) AAS
# include<stdio.h>
# include <stdlib.h>
# define N 10

int a[N + 1], key;
int search(int a[],int key,int i);

int main(int argc, char *argv[])
{
int a[]= {0,1,2,3,4,5,6,7,8,9};
key = atoi(argv[1]);

a[N]=key;
省14
700: 2018/09/16(日)19:43 ID:MIF83oNx(2/3) AAS
# 歩行時間:t
# 歩行速度:w
# 迎えの車速:v0
# 同乗の車速:v1
# 出発時刻差:s
# 到着時刻差:X
# l=wt

# 通常走行時間:d/v0+d/v1
# 早退時走行時間:(d-wt)/v0+(d-wt)/v1
# d/v0+d/v1 - ((d-wt)/v0+(d-wt)/v1)= X
省8
701
(1): 2018/09/16(日)21:14 ID:MIF83oNx(3/3) AAS
# The ambulance arrives X hours ealier at hospital,
# when the patient leave clinic s hours earlier than planned
# and encounter the ambulance t hours later,
# ambulance runs with the velocity of v0 without patient, and v1 with patient
# clinic car runs with the velocity of w

Earlier <- # s hour earlier departure, X hour earlier arrival
function(s=NULL,X=NULL,t=NULL,v0=60,v1=45,w=30){
if(is.null(s)) re=c(s=X/(v0/(v0+w)*w*(1/v0+1/v1)),t=X/w/(1/v0+1/v1))
if(is.null(X)) re=c(X=s*v0/(v0+w)*w*(1/v0+1/v1),t=s*v0/(v0+w))
if(!is.null(t)) re=c(s=t + t*w/v0, X = t*w*(1/v0+1/v1))
省5
702: 2018/09/17(月)08:24 ID:Oiy+BYJP(1/2) AAS
こういう計算ができるとdoor to balloon timeが短縮できるから臨床医に必要な能力だな。

診療所から病院に患者を救急搬送する。
病院から医師搭乗の救急車が診療所に向かっており10時到着予定と連絡が入った。
患者の病態が悪化したら、診療所の普通車で病院に向かい救急車と出会ったら
救急車に患者を移して搬送し病院到着を急ぐという計画を立てた。
普通車から救急車への患者の乗り換えで10分余分に時間がかかる。
道路事情から病院から診療所への道は
平均時速60kmで、逆方向は平均時速45kmで定速走行する。診療所の普通車は信号待ちもあり平均時速30kmで定速走行する。
何時以降の病態悪化は診療所の車を使わずに救急車の到着を待つ方が病院に早く着くか?
703: 2018/09/17(月)08:25 ID:Oiy+BYJP(2/2) AAS
こういう計算ができるとdoor to balloon timeが短縮できるから臨床医に必要な能力だな。

診療所から病院に患者を救急搬送する。
病院から医師搭乗の救急車が診療所に向かっており10時到着予定と連絡が入った。
患者の病態が悪化したら、診療所の普通車で病院に向かい救急車と出会ったら
救急車に患者を移して搬送し病院到着を急ぐという計画を立てた。
普通車から救急車への患者の乗り換えで10分余分に時間がかかる。
道路事情から救急車は病院から診療所への道は
平均時速60kmで、逆方向は平均時速45kmで定速走行する。診療所の普通車は信号待ちもあり平均時速30kmで定速走行する。

何時以降の病態悪化は診療所の車を使わずに救急車の到着を待つ方が病院に早く着くか?
704: 2018/09/17(月)20:23 ID:cb+FssaI(1/3) AAS
診療所から病院に患者を救急搬送する。
病院から救急車が診療所に向かっており10時到着予定と連絡が入った。
患者が9時に急変したため診療所の普通車で病院に向かって救急車と出会ったら救急車に患者を移して搬送し病院到着を早めることになった。救急車の方が速く走れる。
9時50分に救急車に乗り移ることができた。
病院到着は予定より何分早まるか述べよ。
車は定速走行とし、乗り換えに要する時間は考慮しない。
705: 2018/09/17(月)22:45 ID:cb+FssaI(2/3) AAS
# How it works
dec2n <- function(num, N, digit = 3){ # decimal to 0,1,..,n-1 vector
if(num <= 0 & digit <= 0) return(NULL)
else{
append(dec2n(num%/%N, N ,digit-1), num%%N)
}
}
dec2n(42,5,4) # 0 1 3 2
N=5
num=42 ; digit=4
省10
706: 2018/09/17(月)22:46 ID:cb+FssaI(3/3) AAS
# while loop version for dec2n
dec2nw <- function(num, N, digit = 4){
r=num%%N
q=num%/%N
while(q > 0 | digit > 1){
r=append(q%%N,r)
q=q%/%N
digit=digit-1
}
return(r)
省1
707: 2018/09/18(火)01:40 ID:jA0T/PMd(1/3) AAS
外部リンク[php]:www.tutorialspoint.com
708: 2018/09/18(火)06:21 ID:jA0T/PMd(2/3) AAS
>>701
外部リンク:tpcg.io
709: 2018/09/18(火)07:43 ID:jA0T/PMd(3/3) AAS
#include<stdlib.h>
#define N 5

int b[N];
//char * u[] = {"0","1","2","3","4"};
char * u[] = {"志学","而立","不惑","知命","耳順","従心"};
void fill(int k){
int i,j;

if(k < N){
for(i=0;i<N;i++){
for(j=0; j < k && b[j]!=i; j++);
省19
710: 2018/09/19(水)22:38 ID:Eiqd7mE7(1) AAS
draft

is.sorted <- function(x){
if(length(x)==1) return(TRUE){
else{
if(x[1]<=x[2]) is.sort(x[-1]){
else return(FALSE)
}
}
}
711
(2): 2018/09/19(水)22:44 ID:QK/Jo93v(1) AAS
is.sorted <- function(x){
if(length(x)==1){ return(TRUE)
}else{
if(x[1]<=x[2]) is.sorted(x[-1])
else return(FALSE)
}
}
712: 2018/09/20(木)20:45 ID:iA1AjZuZ(1) AAS
ニューロン治療できる医療大麻オイルの紹介
外部リンク:plaza.rakuten.co.jp

ニューロン=人工知能のモデルとなっている神経細胞のやりとりするところ
この細胞の伝達する場所に大麻受容体があります この受容体を通って治療効果を得る大麻を医療大麻と呼びます

人間に大麻受容体があったなんて不思議ですよね
713
(1): 2018/09/22(土)08:25 ID:5EtHM4o7(1) AAS
>>711 は国試に23回も落ちてて
くるくるぱーの裏口バカに
なっちゃってるのらぁあぁぁ
Fラン事務員の濃ゆぅぅい生ガキ汁
ド底辺の臭いが落ちないよぉ
んほおぉぉぉおぉぉ
714: 2018/09/22(土)08:33 ID:zrIlwkkB(1/2) AAS
>>713
>711って再帰呼び出ししているけど何をするスクリプトかわかる?
715: 2018/09/22(土)13:39 ID:NI3pjyOo(1) AAS
#include<stdio.h>
#include<stdlib.h>
#define N 8
#define W 2*N-1
int b[N],row[N],up[W],down[W],count=0;
void fill(int k){
int i,j;
if(k < N){
for(i=0;i<N;i++){
if(!row[i] && !up[i+k] && !down[i-k+N-1]){
省21
716: 2018/09/22(土)21:34 ID:zrIlwkkB(2/2) AAS
#include <stdio.h>

int arr[] ={1,2,3,4,5};
int total = (sizeof(arr) / sizeof(arr[0]));

void heapify(int arr[], int i)
{
int lft = i * 2;
int rgt = lft + 1;
int grt = i;
if (lft <= total && arr[lft] > arr[grt]) grt = lft;
if (rgt <= total && arr[rgt] > arr[grt]) grt = rgt;
省12
717: 2018/09/23(日)18:58 ID:edPyfcCi(1/2) AAS
library(gtools)
k=3
perm=unique(permutations(3*k,3*k,rep(1:3,k),set=F,rep=F))
is3 <- function(x){
n=length(x)
y=c(x,x[1])
re=NULL
for(i in 1:(n-1)) re[i]=all((1:3) %in% y[i:(i+2)])
any(re)
}
省20
718: 2018/09/23(日)18:58 ID:edPyfcCi(2/2) AAS
same <- function(x,base){
f=function(a,b=base){ # is equal to base
all(a==b)
}
mat=rbind(rn(x),rn(rev(x))) # rotation and/or symmetric conversion
any(apply(mat,1,f))
}

mat=perm1
tail(perm1)
exvar <- function(row,mat=perm1){
省12
719: 2018/09/24(月)16:11 ID:cwdsebwG(1/7) AAS
same <- function(x,base){
f=function(a,b=base){ # is equal to base
all(a==b)
}
mat=rbind(rn(x),rn(rev(x))) # rotation and/or symmetric conversion
any(apply(mat,1,f))
}

mat=perm1
core=NULL # 基本解を集める行列
while(nrow(mat)){
省12
720: 2018/09/24(月)20:26 ID:cwdsebwG(2/7) AAS
library(compiler)
cuniq=cmpfun(unique)
jperm <- function(n,r,v) {
if (r == 1)
matrix(v, n, 1)
else if (n == 1)
matrix(v, 1, r)
else {
X <- NULL
for (i in 1:n) X <- rbind(X, cbind(v[i], jperm(n - 1, r - 1, v[-i])))
省7
721: 2018/09/24(月)20:44 ID:cwdsebwG(3/7) AAS
#include<stdio.h>
#define N 6

int b[N];
char * u[] = {"P","E","P","P","E","R"};

void p_table(int k){
int i;

if(k < N){
for(i=0;i<N;i++){
b[k] = i;
p_table(k+1);
省13
722: 2018/09/24(月)21:05 ID:cwdsebwG(4/7) AAS
// 外部リンク:www.geeksforgeeks.org

// Program to print all permutations of a string in sorted order.
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdbool.h>

/* Following function is needed for library function qsort(). */
int compare(const void *a, const void * b)
{
return ( *(char *)a - *(char *)b );
省8
723: 2018/09/24(月)21:05 ID:cwdsebwG(5/7) AAS
// This function finds the index of the smallest character
// which is greater than 'first' and is present in str[l..h]
int findCeil(char str[], char first, int l, int h)
{
// initialize index of ceiling element
int ceilIndex = l;

// Now iterate through rest of the elements and find
// the smallest character greater than 'first'
for (int i = l+1; i <= h; i++)
if (str[i] > first && str[i] < str[ceilIndex])
省3
724: 2018/09/24(月)21:05 ID:cwdsebwG(6/7) AAS
// Print all permutations of str in sorted order

void sortedPermutations(char str[])
{
// Get size of string
int size = strlen(str);

// Sort the string in increasing order
qsort(str, size, sizeof( str[0] ), compare);

// Print permutations one by one
bool isFinished = false;
while (!isFinished)
省10
725: 2018/09/24(月)21:06 ID:cwdsebwG(7/7) AAS
// If there is no such chracter, all are sorted in decreasing order,
// means we just printed the last permutation and we are done.
if (i == -1)
isFinished = true;
else
{
// Find the ceil of 'first char' in right of first character.
// Ceil of a character is the smallest character greater than it
int ceilIndex = findCeil(str, str[i], i + 1, size - 1);

// Swap first and second characters
省13
726: 2018/09/26(水)11:07 ID:Rj8Wp2L9(1) AAS
b=0
w=1
bwb=function(x){
n=length(x)
if(n<3) return(F)
else x[n-2]==b & x[n-1]==w & x[n]==b
}
f = function(){
x=NULL
while(!bwb(x)){
省7
727: 2018/09/26(水)22:08 ID:+zbP8/80(1) AAS
library(Rmpfr)
f <- function(NN,prec=1000){
for(k in 1:NN){
for(m in k:NN){
for(n in m:NN){
K=mpfr(factorial(k),prec)
M=mpfr(factorial(m),prec)
N=mpfr(factorial(n),prec)
if(K+M==N) cat(k,'! + ',m,'! = ',n,'!\n')
}
省4
728: 2018/10/02(火)21:03 ID:DMIGI67G(1/2) AAS
print $ foldr (-) 0 [1,2,3]
print $ foldr (-) 0 ( 1:(2:(3:[])) )
print $ 1-(2-(3-0))
729: 2018/10/02(火)22:17 ID:DMIGI67G(2/2) AAS
elem_r y ys = foldr (\x acc -> if x==y then True else acc) False ys

elem_r 39 [3.6..]

elem_l y ys = foldl(\acc x -> if x==y then True else acc) False ys

{- ERROR!!
elem_l 39 [3,6..]
730: 2018/10/03(水)13:45 ID:OGYXL17c(1) AAS
map' f xs = foldr (\x acc -> f x:acc) [] xs

elem_r y ys = foldr (\x acc -> if x==y then True else acc) False ys
elem_l y ys = foldl(\acc x -> if x==y then True else acc) False ys
main = do
print $ zipWith (\x y -> (x*30+3)/y) [5,4,3,2,1] [1..5]
print $ map (\(a, b) -> a+b) [(1,2),(3,5),(6,3),(2,6),(2,5)]
print $ zipWith (flip (++)) ["love you","is an angel"] ["I ","Mei "]
print $ map (flip subtract 20) [1..5]

print $ foldl (\a b -> a+b) 0 [3,5,2,1]
print $ foldl (-) 0 [1,2,3]
省7
731: 2018/10/08(月)17:55 ID:pH+BqnrA(1/5) AAS
import Data.List
divisor n = find (\m -> n `mod` m ==0 )[2..floor.sqrt.fromIntegral $ n]
main = do
print $ divisor $ (10^19-1) `div` 9
732: 2018/10/08(月)18:06 ID:pH+BqnrA(2/5) AAS
import Data.List
divisor n = find (\m -> n `mod` m ==0 )[2..floor.sqrt.fromIntegral $ n]
divisors n = filter (\m -> n `mod` m ==0 )[2..n-1]
main = do
print $ divisor $ (10^19-1) `div` 9
733: 2018/10/08(月)20:25 ID:pH+BqnrA(3/5) AAS
100万個の○が円形に並んでいます。
図のように、まず1つの○に色をぬり、
次にその●から時計回りに108個進んで止まり、そこにある○をぬります。
さらにその●から
時計回りに108個進んで止まり、
そこにある○をぬり、以下同じ作業を くり返していきます。
すでに色がぬられた●に止まったときに終了とするとき、
何個の○をぬることができますか?

foo jump spot = length $ takeWhile (\x -> x*jump `mod` spot /=0) [1..]

1 + foo 108 1000000
734: 2018/10/08(月)20:30 ID:pH+BqnrA(4/5) AAS
m個の○が円形に並んでいます。
図のように、まず1つの○に色をぬり、
次にその●から時計回りにn個進んで止まり、そこにある○をぬります。
さらにその●から
時計回りにn個進んで止まり、
そこにある○をぬり、以下同じ作業を くり返していきます。
すでに色がぬられた●に止まったときに終了とするとき、
何個の○をぬることができますか?

m / gcd(m.n)

m,nが互いに素なら全部塗れる。
735: 2018/10/08(月)20:48 ID:pH+BqnrA(5/5) AAS
gcd a b
| a `mod` b == 0 = b
| otherwise = gcd b $ a `mod` b
736
(1): 2018/10/10(水)08:15 ID:VVThWPPb(1) AAS
事務員 とは?
同一者の別名として国試浪人、統計野郎、自称医科歯科、がある
自称医科歯科卒、実際は九州の駅弁国立出身で、卒業後は実家の東京に帰り国試浪人となり23年間経過、家庭教師バイトなどを経て現在は事務員、とされている
本人は、勤務医でたまに開業医の手伝いと内視鏡バイト、専門医なし、と主張しているが、連日連夜の異常な書き込み数の多さからは、勤務医とは考え難い
彼の職業がたとえ何であったとしても、人としてド底辺なことは間違いがない
自ら事務員であると告白したこともある
2chスレ:hosp
自作自演も頻繁に行なっている、内視鏡バイトの後はステーキハウスに行く妄想話がよく出てくる、実際には食べたこともないんだろうな
病名を挙げて架空の診療報告を行うこともあるが、今どきヒヨッコ研修医でもそんなことやらねーぞW
事務仕事の際に手にした他人の給与明細や同窓会費振込票を盗撮し、自分のものとしてアップロードしたこともある、犯罪なんじゃねーの?
省11
737: 2018/10/12(金)06:12 ID:co72L/r8(1) AAS
知り合いから教えてもらった自宅で稼げる方法
興味がある人はどうぞ
みんながんばろうねぇ『羽山のサユレイザ』で

K5K
738: 2018/10/12(金)20:06 ID:s0yH21ZM(1) AAS
ある医大で合格率の男女比が1.2で男子有意という結果だったという。
定員100で男子800人女子200人が受験して合格率の男女比が
1.2であったときに統計的には有意差があると言えるか?
739: 2018/10/13(土)08:03 ID:cNomfA2G(1/3) AAS
man=900
woman=100
pass=100
total=man+woman
p=pass/total
i=0:100
#
sum((choose(woman,i)*choose(man,pass-i)/choose(total,pass))*(i/woman > (pass-i)/man))
sum((choose(woman,i)*choose(man,pass-i)/choose(total,pass))*(i/woman == (pass-i)/man))
sum((choose(man,i)*choose(woman,pass-i)/choose(total,pass))*(i/man > (pass-i)/woman))
省1
740: 2018/10/13(土)08:04 ID:cNomfA2G(2/3) AAS
> sum((choose(woman,i)*choose(man,pass-i)/choose(total,pass))*(i/woman > (pass-i)/man))
[1] 0.4160339
> sum((choose(woman,i)*choose(man,pass-i)/choose(total,pass))*(i/woman == (pass-i)/man))
[1] 0.1389853
> sum((choose(man,i)*choose(woman,pass-i)/choose(total,pass))*(i/man > (pass-i)/woman))
[1] 0.4449808
> sum((choose(man,i)*choose(woman,pass-i)/choose(total,pass))*(i/man > 1.2*(pass-i)/woman))
[1] 0.3090334
741: 2018/10/13(土)08:28 ID:cNomfA2G(3/3) AAS
ある医大で合格率の男女比が1.2で男子有意という結果だったという。
定員100で男子800人女子200人が受験して合格率の男女比が
1.2であったときに統計的には有意差があると言えるか?

f <- function(ratio=1.2,man=800,woman=200,pass=100){
total=man+woman
i=0:pass
sum((choose(man,i)*choose(woman,pass-i)/choose(total,pass))*(i/man > ratio*(pass-i)/woman))
}
f()
742: 2018/10/13(土)10:57 ID:WXqDSsDl(1) AAS
draft
{-ある医大で合格率の男女比が1.2で男子有意という結果だったという。
定員100で男子800人女子200人が受験して合格率の男女比が
1.2であったときに統計的には有意差があると言えるか?
-}
choose n r = [1..n] `div` [1..n-r] `div` [1..r]
ratio=1.2
pass=100
man=800
woman=200
省6
743
(1): 2018/10/13(土)12:59 ID:PvPTvQgs(1/2) AAS
>>736
ド底辺シリツ医大卒って医療従事者にマウントするのは不可能だから事務員や国試浪人認定するしかないんだなぁ。

こういうのにサクッと答えてド底辺シリツ医大卒でも高卒の基礎学力くらいあるのを示せばいいのに。

ある医大で合格率の男女比が1.2で男子優位という結果だったという。
定員100で男子800人女子200人が受験して合格率の男女比が
1.2であったときに統計的には有意差があると言えるか?
744: 2018/10/13(土)15:21 ID:PvPTvQgs(2/2) AAS
>>743
Rで数えると

f <- function(ratio=1.2,man=800,woman=200,pass=100){
total=man+woman
i=0:pass
sum((choose(man,i)*choose(woman,pass-i)/choose(total,pass))*(i/man > ratio*(pass-i)/woman))
}
f()

Haskellで数えると

ratio=1.2
省14
745: 2018/10/14(日)06:36 ID:+n7lCedi(1/2) AAS
f <- function(ratio=1.2,wm=0.2,total=1000,pass=100){
woman=total*wm
man=total-woman
i=0:pass
sum((choose(man,i)*choose(woman,pass-i)/choose(total,pass))*(i/man > ratio*(pass-i)/woman))
}
f()
r=seq(1,3,length=1000)
p=sapply(r,f)
plot(r,p,pch=19,type='n',bty='l',xlab='M/F ratio',ylab='probability')
省11
746: 2018/10/14(日)07:14 ID:+n7lCedi(2/2) AAS
pass=100
wm=0.2
curve( (x/(1-wm))/((pass-x)/wm),0,pass)
uniroot(function(x,u0=1.2) x*wm/(1-wm)/(pass-x)-u0, c(0,pass))
(83/800)/(17/200)
prop.test(c(83,17),c(800,200))

m_suc = function(rate) (pass* rate * (wm - 1))/(rate* (wm - 1) - wm)
m_suc(1.2)
curve(m_suc(x),1,5)

total=1000
省14
747: 2018/10/17(水)18:14 ID:Bhck6Le9(1) AAS
AA省
1-
スレ情報 赤レス抽出 画像レス抽出 歴の未読スレ AAサムネイル

ぬこの手 ぬこTOP 0.130s*