SlideShare a Scribd company logo
1 of 6
INICIO
Ingresar ∅, 𝜎, 𝑁
𝑛, 𝜇𝑦, 𝜎𝑦
FIN
Mostrar todas las
variables en pantalla
Sum = Sum + RAND
While (i < n)
N= Número de Randoms
n= Número de variables a simular
For j =1
Hasta j < N
j ++
𝑦 =
𝜎𝑦 𝑆𝑢𝑚 − 𝑛∅
𝜎 𝑛
+ 𝜇𝑦
Sum=0.0 , i = i+1
Y
i = 0.0
// CREADO POR ERICK PEÑA
// SIMULACION DE VARIABLES (Y) USANDO EL TEOREAMA DEL LIMETE CENTRAL
// SE USAN DATOS REALES {u MEDIA} Y {s DESVIACION} PARA PODER REALIZAR LA SIMULACION
// SE SIMULARAN USANDO n = 100 NUMEROS ALEATORIOS
// POR CONVENCION:
// MEDIA DE LOS NUMEROS RANDOM = mediarand = 0.5
// DESVIACION DE LOS RANDOM = desviarand = 1/raiz(12)
//
// FORMULA DEL LIMITE CENTRAL
// Y=s((SUMA DE RANDOMS)- (100)*0.5)/(raiz(100/12)) + u
// LOS DATOS A INTRODUCIR POR EL USURARION SERAN c, u, s
// c INDICA CUANTAS VARIABLES SIMULDAS QUIERO OBTENER
#include<iostream>
#include<stdlib.h> //permite el uso de librerias estandar
#include<math.h> //permite incluir formmulas matematicas
#include<time.h> //necesario para la creacion de numeros randoms
#include<fstream> //permite la creacion de un archivo para guardar los datos
#include<stdio.h>
using namespace std;
int main(){
int c; // numero de variables que quiero obtener
double u, s; // media y desviacion reales que el usuario ingresara
cout<<"PROGRAMADO POR ERICK PEÑAn"<<endl;
cout<<"Ingrese el valor de la media"<<endl;
cin>>u;
cout<<"nIngrese el valor de la desviacion"<<endl;
cin>>s;
cout<<"n¿Cuantas simulaciones desea obtener?"<<endl;
cin>>c;
cout<<"nnSu simulacion sera guardada en un archivo excel= VARIABLE SIMULADA"<<endl;
cout<<"en la carpeta donde tenga este ejecutablenn"<<endl;
ofstream file; // variable de archivo llamada file (se usara file para el codigo)
file.open("VARIABLE SIMULADA.csv");
double n=100.00; // es el numero de randoms con el que se hara la suma
double mediarand=0.5;
double desviarand=sqrt(1/12);
double y; // sera la varible simulada
double sum=0; //suma de randoms
double b; //sera cada random creado
int i=0; // me ayudara para el while como contador
int j; // contador par el for
(time(NULL));
file<<"PROGRAMADO POR ERICK PEÑA"<<endl;
file<<"Sus "<<c<<" varibales simuladas"<<endl;
file<<"Con Uy="<<u<<" y Sy="<<s<<" son"<<endl;
file<<endl;
file<<endl;
while(i<c){ // mientras el contador i sea menor que el numero de variables simuladas
// que queremos obtener el proceso se seguira ejecutado
// cuando el contador i sea igual al numero de simulaciones c el proceso acaba
for(j=1; j<n; j++){
b=1+rand()%100; // creara randoms entre 1 y 100
b=b/100; // divide los randoms entre 100 para poder obtener decimales
sum=sum+b;
}
y=s*((sum)-(100)*(0.5))/(sqrt(n/12))+ u;
cout<<y<<endl;
file<<y<<endl;
i++;
sum=0.0;
if(i==c)break; // cuando el contador i sea igual al numero de simulaciones el programa se cierra
}
system("PAUSE");
file.close(); // cierra el archivo creado
return 0;
}
Diagrama de flujo de simulacion de variables

More Related Content

What's hot

Tesis de financiamiento y rentabilidad de las mypes de shilla humberto morale...
Tesis de financiamiento y rentabilidad de las mypes de shilla humberto morale...Tesis de financiamiento y rentabilidad de las mypes de shilla humberto morale...
Tesis de financiamiento y rentabilidad de las mypes de shilla humberto morale...Humberto Morales
 
Control interno
Control internoControl interno
Control internojennika58
 
Gestion de-riesgos-empresariales-presentacion
Gestion de-riesgos-empresariales-presentacionGestion de-riesgos-empresariales-presentacion
Gestion de-riesgos-empresariales-presentacionLilia Marmolejo Cobo
 
Fundamentos de la contabilidad.
 Fundamentos de la contabilidad. Fundamentos de la contabilidad.
Fundamentos de la contabilidad.xepser
 
Programa de control interno y auditoria para la empresa
Programa de control interno y auditoria para la empresaPrograma de control interno y auditoria para la empresa
Programa de control interno y auditoria para la empresaladykittie
 
131 4 el informe final del trabajo de auditoria operacional administrativa y ...
131 4 el informe final del trabajo de auditoria operacional administrativa y ...131 4 el informe final del trabajo de auditoria operacional administrativa y ...
131 4 el informe final del trabajo de auditoria operacional administrativa y ...luisdiazvergara
 
Auditoría Continua
Auditoría ContinuaAuditoría Continua
Auditoría ContinuaJorge Amaya
 
Indicadores de-endeudamiento
Indicadores de-endeudamientoIndicadores de-endeudamiento
Indicadores de-endeudamientoKlever Lopez
 
Auditoria administrativa
Auditoria administrativaAuditoria administrativa
Auditoria administrativaDanii Lopez
 
Importancia De La Auditoria De Sistemas
Importancia De La Auditoria De SistemasImportancia De La Auditoria De Sistemas
Importancia De La Auditoria De SistemasAireth Amaya
 
Auditoria de gestion hallazgos
Auditoria de gestion   hallazgosAuditoria de gestion   hallazgos
Auditoria de gestion hallazgosStefania Encalada
 
ANÁLISIS DEL PROCESO METODOLÓGICO SOBRE PLANES FINANCIEROS DE CORTO Y LARGO P...
ANÁLISIS DEL PROCESO METODOLÓGICO SOBRE PLANES FINANCIEROS DE CORTO Y LARGO P...ANÁLISIS DEL PROCESO METODOLÓGICO SOBRE PLANES FINANCIEROS DE CORTO Y LARGO P...
ANÁLISIS DEL PROCESO METODOLÓGICO SOBRE PLANES FINANCIEROS DE CORTO Y LARGO P...AlejandroCabrera724568
 
Repaso-de-casos-practicos-de-ratios-financieros.pptx
Repaso-de-casos-practicos-de-ratios-financieros.pptxRepaso-de-casos-practicos-de-ratios-financieros.pptx
Repaso-de-casos-practicos-de-ratios-financieros.pptxEDVINMANIHUARIRICOPA1
 
NORMAS INTERNACIONALES AUDITORIA
NORMAS INTERNACIONALES AUDITORIANORMAS INTERNACIONALES AUDITORIA
NORMAS INTERNACIONALES AUDITORIAenatorres
 
Fundamentos proceso contable
Fundamentos proceso contableFundamentos proceso contable
Fundamentos proceso contablemarialililiana
 
Administracion del efectivo
Administracion del efectivoAdministracion del efectivo
Administracion del efectivoflora ccama tipo
 
Justificacion Objetivos Marcos
Justificacion Objetivos MarcosJustificacion Objetivos Marcos
Justificacion Objetivos Marcosmelidamesa
 
Presentacion antecedentes auditoria
Presentacion antecedentes auditoriaPresentacion antecedentes auditoria
Presentacion antecedentes auditoriaLenin Quilisimba
 

What's hot (20)

Tesis de financiamiento y rentabilidad de las mypes de shilla humberto morale...
Tesis de financiamiento y rentabilidad de las mypes de shilla humberto morale...Tesis de financiamiento y rentabilidad de las mypes de shilla humberto morale...
Tesis de financiamiento y rentabilidad de las mypes de shilla humberto morale...
 
Control interno
Control internoControl interno
Control interno
 
Gestion de-riesgos-empresariales-presentacion
Gestion de-riesgos-empresariales-presentacionGestion de-riesgos-empresariales-presentacion
Gestion de-riesgos-empresariales-presentacion
 
Fundamentos de la contabilidad.
 Fundamentos de la contabilidad. Fundamentos de la contabilidad.
Fundamentos de la contabilidad.
 
Programa de control interno y auditoria para la empresa
Programa de control interno y auditoria para la empresaPrograma de control interno y auditoria para la empresa
Programa de control interno y auditoria para la empresa
 
131 4 el informe final del trabajo de auditoria operacional administrativa y ...
131 4 el informe final del trabajo de auditoria operacional administrativa y ...131 4 el informe final del trabajo de auditoria operacional administrativa y ...
131 4 el informe final del trabajo de auditoria operacional administrativa y ...
 
Auditoría Continua
Auditoría ContinuaAuditoría Continua
Auditoría Continua
 
Indicadores de-endeudamiento
Indicadores de-endeudamientoIndicadores de-endeudamiento
Indicadores de-endeudamiento
 
Auditoria administrativa
Auditoria administrativaAuditoria administrativa
Auditoria administrativa
 
Importancia De La Auditoria De Sistemas
Importancia De La Auditoria De SistemasImportancia De La Auditoria De Sistemas
Importancia De La Auditoria De Sistemas
 
1. contabilidad general
1. contabilidad general 1. contabilidad general
1. contabilidad general
 
Auditoria de gestion hallazgos
Auditoria de gestion   hallazgosAuditoria de gestion   hallazgos
Auditoria de gestion hallazgos
 
ANÁLISIS DEL PROCESO METODOLÓGICO SOBRE PLANES FINANCIEROS DE CORTO Y LARGO P...
ANÁLISIS DEL PROCESO METODOLÓGICO SOBRE PLANES FINANCIEROS DE CORTO Y LARGO P...ANÁLISIS DEL PROCESO METODOLÓGICO SOBRE PLANES FINANCIEROS DE CORTO Y LARGO P...
ANÁLISIS DEL PROCESO METODOLÓGICO SOBRE PLANES FINANCIEROS DE CORTO Y LARGO P...
 
Repaso-de-casos-practicos-de-ratios-financieros.pptx
Repaso-de-casos-practicos-de-ratios-financieros.pptxRepaso-de-casos-practicos-de-ratios-financieros.pptx
Repaso-de-casos-practicos-de-ratios-financieros.pptx
 
NORMAS INTERNACIONALES AUDITORIA
NORMAS INTERNACIONALES AUDITORIANORMAS INTERNACIONALES AUDITORIA
NORMAS INTERNACIONALES AUDITORIA
 
Fundamentos proceso contable
Fundamentos proceso contableFundamentos proceso contable
Fundamentos proceso contable
 
Administracion del efectivo
Administracion del efectivoAdministracion del efectivo
Administracion del efectivo
 
Justificacion Objetivos Marcos
Justificacion Objetivos MarcosJustificacion Objetivos Marcos
Justificacion Objetivos Marcos
 
Presentacion antecedentes auditoria
Presentacion antecedentes auditoriaPresentacion antecedentes auditoria
Presentacion antecedentes auditoria
 
Nia 500 501 y 505
Nia 500 501 y 505Nia 500 501 y 505
Nia 500 501 y 505
 

Similar to Diagrama de flujo de simulacion de variables

Start with the inclusion of libraries#include iostream .docx
 Start with the inclusion of libraries#include iostream .docx Start with the inclusion of libraries#include iostream .docx
Start with the inclusion of libraries#include iostream .docxMARRY7
 
Please follow the code and comments for description As the requir.pdf
Please follow the code and comments for description As the requir.pdfPlease follow the code and comments for description As the requir.pdf
Please follow the code and comments for description As the requir.pdfssuserd6ce341
 
gptips1.0concrete.matConcrete_Data[1030x9 double array]tr.docx
gptips1.0concrete.matConcrete_Data[1030x9  double array]tr.docxgptips1.0concrete.matConcrete_Data[1030x9  double array]tr.docx
gptips1.0concrete.matConcrete_Data[1030x9 double array]tr.docxwhittemorelucilla
 
PROVIDE COMMENTS TO FELLOW STUDENTS ANSWERS AND PLEASE DON’T SAY G.docx
PROVIDE COMMENTS TO FELLOW STUDENTS ANSWERS AND PLEASE DON’T SAY G.docxPROVIDE COMMENTS TO FELLOW STUDENTS ANSWERS AND PLEASE DON’T SAY G.docx
PROVIDE COMMENTS TO FELLOW STUDENTS ANSWERS AND PLEASE DON’T SAY G.docxamrit47
 
Programación de C++, Función Case
Programación de C++, Función CaseProgramación de C++, Función Case
Programación de C++, Función CaseRamon Lop-Mi
 
ch5_additional.ppt
ch5_additional.pptch5_additional.ppt
ch5_additional.pptLokeshK66
 
Roberto Gallea: Workshop Arduino, giorno #2 Arduino + Processing
Roberto Gallea: Workshop Arduino, giorno #2 Arduino + ProcessingRoberto Gallea: Workshop Arduino, giorno #2 Arduino + Processing
Roberto Gallea: Workshop Arduino, giorno #2 Arduino + ProcessingDemetrio Siragusa
 
Chainer-Compiler 動かしてみた
Chainer-Compiler 動かしてみたChainer-Compiler 動かしてみた
Chainer-Compiler 動かしてみたAkira Maruoka
 
EJERCICIOS DE BORLAND C++ 2DA PARTE.docx
EJERCICIOS DE BORLAND C++ 2DA PARTE.docxEJERCICIOS DE BORLAND C++ 2DA PARTE.docx
EJERCICIOS DE BORLAND C++ 2DA PARTE.docxleovasquez17
 
EJERCICIOS DE BORLAND C++ 2DA PARTE.docx
EJERCICIOS DE BORLAND C++ 2DA PARTE.docxEJERCICIOS DE BORLAND C++ 2DA PARTE.docx
EJERCICIOS DE BORLAND C++ 2DA PARTE.docxleovasquez17
 
3 mathematical challenge_code
3 mathematical challenge_code3 mathematical challenge_code
3 mathematical challenge_codeRussell Childs
 
#ifndef RATIONAL_H   if this compiler macro is not defined #def.pdf
#ifndef RATIONAL_H    if this compiler macro is not defined #def.pdf#ifndef RATIONAL_H    if this compiler macro is not defined #def.pdf
#ifndef RATIONAL_H   if this compiler macro is not defined #def.pdfexxonzone
 
java compilerCompiler1.javajava compilerCompiler1.javaimport.docx
java compilerCompiler1.javajava compilerCompiler1.javaimport.docxjava compilerCompiler1.javajava compilerCompiler1.javaimport.docx
java compilerCompiler1.javajava compilerCompiler1.javaimport.docxpriestmanmable
 

Similar to Diagrama de flujo de simulacion de variables (20)

C++ TUTORIAL 3
C++ TUTORIAL 3C++ TUTORIAL 3
C++ TUTORIAL 3
 
Start with the inclusion of libraries#include iostream .docx
 Start with the inclusion of libraries#include iostream .docx Start with the inclusion of libraries#include iostream .docx
Start with the inclusion of libraries#include iostream .docx
 
C++ TUTORIAL 4
C++ TUTORIAL 4C++ TUTORIAL 4
C++ TUTORIAL 4
 
Please follow the code and comments for description As the requir.pdf
Please follow the code and comments for description As the requir.pdfPlease follow the code and comments for description As the requir.pdf
Please follow the code and comments for description As the requir.pdf
 
Project in programming
Project in programmingProject in programming
Project in programming
 
C++ TUTORIAL 2
C++ TUTORIAL 2C++ TUTORIAL 2
C++ TUTORIAL 2
 
gptips1.0concrete.matConcrete_Data[1030x9 double array]tr.docx
gptips1.0concrete.matConcrete_Data[1030x9  double array]tr.docxgptips1.0concrete.matConcrete_Data[1030x9  double array]tr.docx
gptips1.0concrete.matConcrete_Data[1030x9 double array]tr.docx
 
PROVIDE COMMENTS TO FELLOW STUDENTS ANSWERS AND PLEASE DON’T SAY G.docx
PROVIDE COMMENTS TO FELLOW STUDENTS ANSWERS AND PLEASE DON’T SAY G.docxPROVIDE COMMENTS TO FELLOW STUDENTS ANSWERS AND PLEASE DON’T SAY G.docx
PROVIDE COMMENTS TO FELLOW STUDENTS ANSWERS AND PLEASE DON’T SAY G.docx
 
Programación de C++, Función Case
Programación de C++, Función CaseProgramación de C++, Función Case
Programación de C++, Función Case
 
MUST CS101 Lab11
MUST CS101 Lab11 MUST CS101 Lab11
MUST CS101 Lab11
 
ch5_additional.ppt
ch5_additional.pptch5_additional.ppt
ch5_additional.ppt
 
Roberto Gallea: Workshop Arduino, giorno #2 Arduino + Processing
Roberto Gallea: Workshop Arduino, giorno #2 Arduino + ProcessingRoberto Gallea: Workshop Arduino, giorno #2 Arduino + Processing
Roberto Gallea: Workshop Arduino, giorno #2 Arduino + Processing
 
Chainer-Compiler 動かしてみた
Chainer-Compiler 動かしてみたChainer-Compiler 動かしてみた
Chainer-Compiler 動かしてみた
 
EJERCICIOS DE BORLAND C++ 2DA PARTE.docx
EJERCICIOS DE BORLAND C++ 2DA PARTE.docxEJERCICIOS DE BORLAND C++ 2DA PARTE.docx
EJERCICIOS DE BORLAND C++ 2DA PARTE.docx
 
EJERCICIOS DE BORLAND C++ 2DA PARTE.docx
EJERCICIOS DE BORLAND C++ 2DA PARTE.docxEJERCICIOS DE BORLAND C++ 2DA PARTE.docx
EJERCICIOS DE BORLAND C++ 2DA PARTE.docx
 
Include
IncludeInclude
Include
 
3 mathematical challenge_code
3 mathematical challenge_code3 mathematical challenge_code
3 mathematical challenge_code
 
#ifndef RATIONAL_H   if this compiler macro is not defined #def.pdf
#ifndef RATIONAL_H    if this compiler macro is not defined #def.pdf#ifndef RATIONAL_H    if this compiler macro is not defined #def.pdf
#ifndef RATIONAL_H   if this compiler macro is not defined #def.pdf
 
java compilerCompiler1.javajava compilerCompiler1.javaimport.docx
java compilerCompiler1.javajava compilerCompiler1.javaimport.docxjava compilerCompiler1.javajava compilerCompiler1.javaimport.docx
java compilerCompiler1.javajava compilerCompiler1.javaimport.docx
 
PHP PPT FILE
PHP PPT FILEPHP PPT FILE
PHP PPT FILE
 

Recently uploaded

How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designMIPLM
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Celine George
 
Atmosphere science 7 quarter 4 .........
Atmosphere science 7 quarter 4 .........Atmosphere science 7 quarter 4 .........
Atmosphere science 7 quarter 4 .........LeaCamillePacle
 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxEyham Joco
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Celine George
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 
AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.arsicmarija21
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxAnupkumar Sharma
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPCeline George
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersSabitha Banu
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxRaymartEstabillo3
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxDr.Ibrahim Hassaan
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 

Recently uploaded (20)

How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-design
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
 
Atmosphere science 7 quarter 4 .........
Atmosphere science 7 quarter 4 .........Atmosphere science 7 quarter 4 .........
Atmosphere science 7 quarter 4 .........
 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptx
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERP
 
Rapple "Scholarly Communications and the Sustainable Development Goals"
Rapple "Scholarly Communications and the Sustainable Development Goals"Rapple "Scholarly Communications and the Sustainable Development Goals"
Rapple "Scholarly Communications and the Sustainable Development Goals"
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginners
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptx
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 

Diagrama de flujo de simulacion de variables

  • 1. INICIO Ingresar ∅, 𝜎, 𝑁 𝑛, 𝜇𝑦, 𝜎𝑦 FIN Mostrar todas las variables en pantalla Sum = Sum + RAND While (i < n) N= Número de Randoms n= Número de variables a simular For j =1 Hasta j < N j ++ 𝑦 = 𝜎𝑦 𝑆𝑢𝑚 − 𝑛∅ 𝜎 𝑛 + 𝜇𝑦 Sum=0.0 , i = i+1 Y i = 0.0
  • 2. // CREADO POR ERICK PEÑA // SIMULACION DE VARIABLES (Y) USANDO EL TEOREAMA DEL LIMETE CENTRAL // SE USAN DATOS REALES {u MEDIA} Y {s DESVIACION} PARA PODER REALIZAR LA SIMULACION // SE SIMULARAN USANDO n = 100 NUMEROS ALEATORIOS // POR CONVENCION: // MEDIA DE LOS NUMEROS RANDOM = mediarand = 0.5 // DESVIACION DE LOS RANDOM = desviarand = 1/raiz(12) // // FORMULA DEL LIMITE CENTRAL // Y=s((SUMA DE RANDOMS)- (100)*0.5)/(raiz(100/12)) + u // LOS DATOS A INTRODUCIR POR EL USURARION SERAN c, u, s // c INDICA CUANTAS VARIABLES SIMULDAS QUIERO OBTENER #include<iostream> #include<stdlib.h> //permite el uso de librerias estandar #include<math.h> //permite incluir formmulas matematicas #include<time.h> //necesario para la creacion de numeros randoms #include<fstream> //permite la creacion de un archivo para guardar los datos #include<stdio.h> using namespace std;
  • 3. int main(){ int c; // numero de variables que quiero obtener double u, s; // media y desviacion reales que el usuario ingresara cout<<"PROGRAMADO POR ERICK PEÑAn"<<endl; cout<<"Ingrese el valor de la media"<<endl; cin>>u; cout<<"nIngrese el valor de la desviacion"<<endl; cin>>s; cout<<"n¿Cuantas simulaciones desea obtener?"<<endl; cin>>c; cout<<"nnSu simulacion sera guardada en un archivo excel= VARIABLE SIMULADA"<<endl; cout<<"en la carpeta donde tenga este ejecutablenn"<<endl;
  • 4. ofstream file; // variable de archivo llamada file (se usara file para el codigo) file.open("VARIABLE SIMULADA.csv"); double n=100.00; // es el numero de randoms con el que se hara la suma double mediarand=0.5; double desviarand=sqrt(1/12); double y; // sera la varible simulada double sum=0; //suma de randoms double b; //sera cada random creado int i=0; // me ayudara para el while como contador int j; // contador par el for (time(NULL)); file<<"PROGRAMADO POR ERICK PEÑA"<<endl; file<<"Sus "<<c<<" varibales simuladas"<<endl; file<<"Con Uy="<<u<<" y Sy="<<s<<" son"<<endl; file<<endl; file<<endl;
  • 5. while(i<c){ // mientras el contador i sea menor que el numero de variables simuladas // que queremos obtener el proceso se seguira ejecutado // cuando el contador i sea igual al numero de simulaciones c el proceso acaba for(j=1; j<n; j++){ b=1+rand()%100; // creara randoms entre 1 y 100 b=b/100; // divide los randoms entre 100 para poder obtener decimales sum=sum+b; } y=s*((sum)-(100)*(0.5))/(sqrt(n/12))+ u; cout<<y<<endl; file<<y<<endl; i++; sum=0.0; if(i==c)break; // cuando el contador i sea igual al numero de simulaciones el programa se cierra } system("PAUSE"); file.close(); // cierra el archivo creado return 0; }